|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.validator.ValidatorResult
public class ValidatorResult
This contains the results of a set of validation rules processed on a JavaBean.
Nested Class Summary | |
---|---|
protected class |
ValidatorResult.ResultStatus
Contains the status of the validation. |
Field Summary | |
---|---|
protected Field |
field
Field being validated. |
protected Map |
hAction
Map of results. |
Constructor Summary | |
---|---|
ValidatorResult(Field field)
Constructs a ValidatorResult with the associated field being
validated. |
Method Summary | |
---|---|
void |
add(String validatorName,
boolean result)
Add the result of a validator action. |
void |
add(String validatorName,
boolean result,
Object value)
Add the result of a validator action. |
boolean |
containsAction(String validatorName)
Indicate whether a specified validator is in the Result. |
Map |
getActionMap()
Deprecated. Use getActions() to return the set of actions the isValid(name) and getResult(name) methods to determine the contents of ResultStatus. |
Iterator |
getActions()
Return an Iterator of the action names contained in this Result. |
Field |
getField()
Returns the Field that was validated. |
Object |
getResult(String validatorName)
Return the result of a validation. |
boolean |
isValid(String validatorName)
Indicate whether a specified validation passed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map hAction
ValidatorAction
and the value is whether or not this field passed or not.
protected Field field
Field
being validated.
TODO This variable is not used. Need to investigate removing it.
Constructor Detail |
---|
public ValidatorResult(Field field)
ValidatorResult
with the associated field being
validated.
field
- Field that was validated.Method Detail |
---|
public void add(String validatorName, boolean result)
validatorName
- Name of the validator.result
- Whether the validation passed or failed.public void add(String validatorName, boolean result, Object value)
validatorName
- Name of the validator.result
- Whether the validation passed or failed.value
- Value returned by the validator.public boolean containsAction(String validatorName)
validatorName
- Name of the validator.
public boolean isValid(String validatorName)
validatorName
- Name of the validator.
public Object getResult(String validatorName)
validatorName
- Name of the validator.
public Iterator getActions()
public Map getActionMap()
public Field getField()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |