|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.barracuda.core.forms.AbstractFormValidator
org.enhydra.barracuda.core.forms.And
This validator ensures that all of the given validators are valid, (effectively acting as an "AND" or "&&") or a ValidationException will be generated.
The sub-validators can be specified as array, list or by using the convenience constructors.
Field Summary | |
protected FormValidator[] |
_fv
|
Fields inherited from class org.enhydra.barracuda.core.forms.AbstractFormValidator |
localLogger |
Constructor Summary | |
And(FormValidator[] fv)
Public constructor. |
|
And(FormValidator[] fv,
String ierrmsg)
Public constructor. |
|
And(FormValidator fv1,
FormValidator fv2)
Public constructor. |
|
And(FormValidator fv1,
FormValidator fv2,
FormValidator fv3)
Public constructor. |
|
And(FormValidator fv1,
FormValidator fv2,
FormValidator fv3,
FormValidator fv4)
Public constructor. |
|
And(FormValidator fv1,
FormValidator fv2,
FormValidator fv3,
FormValidator fv4,
String ierrmsg)
Public constructor. |
|
And(FormValidator fv1,
FormValidator fv2,
FormValidator fv3,
String ierrmsg)
Public constructor. |
|
And(FormValidator fv1,
FormValidator fv2,
String ierrmsg)
Public constructor. |
|
And(List fv)
Public constructor. |
|
And(List fv,
String ierrmsg)
Public constructor. |
Method Summary | |
FormValidator[] |
getSubValidators()
Return the sub-validators that are or'ed together Do not assume this array is of length 2, in order to allow for future use. |
void |
validate(FormElement element,
FormMap map,
boolean deferExceptions)
Rather than calling all the sub validate methods, we make sure at least one of the sub-validators is valid |
Methods inherited from class org.enhydra.barracuda.core.forms.AbstractFormValidator |
generateException, getErrorMessage, isNull, setErrorMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected FormValidator[] _fv
Constructor Detail |
public And(List fv)
fv
- the list of validatorspublic And(List fv, String ierrmsg)
fv
- the list of validatorsierrmsg
- the message associated with this errorpublic And(FormValidator[] fv)
fv
- the array of validatorspublic And(FormValidator[] fv, String ierrmsg)
fv
- the array of validatorsierrmsg
- the message associated with this errorpublic And(FormValidator fv1, FormValidator fv2)
fv1
- the first subvalidatorfv2
- the second subvalidatorpublic And(FormValidator fv1, FormValidator fv2, String ierrmsg)
fv1
- the first subvalidatorfv2
- the second subvalidatorierrmsg
- the message associated with this errorpublic And(FormValidator fv1, FormValidator fv2, FormValidator fv3)
fv1
- the first subvalidatorfv2
- the second subvalidatorfv3
- the third subvalidatorpublic And(FormValidator fv1, FormValidator fv2, FormValidator fv3, String ierrmsg)
fv1
- the first subvalidatorfv2
- the second subvalidatorfv3
- the third subvalidatorierrmsg
- the message associated with this errorpublic And(FormValidator fv1, FormValidator fv2, FormValidator fv3, FormValidator fv4)
fv1
- the first subvalidatorfv2
- the second subvalidatorfv3
- the third subvalidatorfv4
- the fourth subvalidatorpublic And(FormValidator fv1, FormValidator fv2, FormValidator fv3, FormValidator fv4, String ierrmsg)
fv1
- the first subvalidatorfv2
- the second subvalidatorfv3
- the third subvalidatorfv4
- the fourth subvalidatorierrmsg
- the message associated with this errorMethod Detail |
public FormValidator[] getSubValidators()
public void validate(FormElement element, FormMap map, boolean deferExceptions) throws ValidationException
element
- the form element to be validated (null indicates
we want to perform form level validation)map
- the map to which the element belongs (sometimes necessary
to validate elements by comparing them with other elements)deferExceptions
- do we want to deferValidation exceptions
and attempt to validate all elements so that we can process
all the exceptions at once
ValidationException
- if the element is not valid
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |