|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.validator.Rule
org.sapia.validator.CompositeRule
public class CompositeRule
An instance of this class is intended to hold other validation rules.
| Field Summary | |
|---|---|
protected boolean |
_stop
|
| Constructor Summary | |
|---|---|
CompositeRule()
Constructor for CompositeRule. |
|
| Method Summary | |
|---|---|
void |
addValidatable(Validatable v)
Adds a Validatable to this instance. |
RuleSet |
createRuleSet()
Creates a rule set and returns it. |
void |
handleObject(String name,
Object validatable)
|
void |
setStop(boolean stop)
Sets the "stop" flag to true or false. |
void |
validate(ValidationContext ctx)
Validates this instance. |
| Methods inherited from class org.sapia.validator.Rule |
|---|
createMessage, getErrorMessageFor, getErrorMessages, getId, initName, localName, onCreate, prefix, qualifiedName, setErrorMessages, setId |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean _stop
| Constructor Detail |
|---|
public CompositeRule()
| Method Detail |
|---|
public void addValidatable(Validatable v)
Validatable to this instance.
a - Validatable.public void setStop(boolean stop)
true or false. This
flag meaning is as follows: when an instance of this class processes
its nested rules, it will continue with the next rule even if the
previous one generated an error, provided this flag is set to
false.
This feature allows for subsequent rules to be processed even if
validation errors have previously been created; thus, in such a case,
the ValidationContext could potentially contain more
than one instance of ValidationErr.
stop - this instance's "stop" flag.ValidationContext,
ValidationErrpublic RuleSet createRuleSet()
RuleSet.
public void handleObject(String name,
Object validatable)
throws org.sapia.util.xml.confix.ConfigurationException
handleObject in interface org.sapia.util.xml.confix.ObjectHandlerIForg.sapia.util.xml.confix.ConfigurationExceptionObjectHandlerIF.handleObject(String, Object)public void validate(ValidationContext ctx)
Validatable
validate in interface Validatablevalidate in class RuleRule.validate(ValidationContext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||