Class ValidatorResult
java.lang.Object
org.apache.commons.validator.ValidatorResult
- All Implemented Interfaces:
Serializable
This contains the results of a set of validation rules processed
on a JavaBean.
- Version:
- $Revision: 1652498 $
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classContains the status of the validation. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FieldFieldbeing validated.protected Map<String, ValidatorResult.ResultStatus> Map of results.private static final long -
Constructor Summary
ConstructorsConstructorDescriptionValidatorResult(Field field) Constructs aValidatorResultwith the associated field being validated. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the result of a validator action.voidAdd the result of a validator action.booleancontainsAction(String validatorName) Indicate whether a specified validator is in the Result.Deprecated.Use getActions() to return the set of actions the isValid(name) and getResult(name) methods to determine the contents of ResultStatus.Return an Iterator of the action names contained in this Result.getField()Returns the Field that was validated.Return the result of a validation.booleanIndicate whether a specified validation passed.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
hAction
Map of results. The key is the name of theValidatorActionand the value is whether or not this field passed or not. -
field
Fieldbeing validated. TODO This variable is not used. Need to investigate removing it.
-
-
Constructor Details
-
ValidatorResult
Constructs aValidatorResultwith the associated field being validated.- Parameters:
field- Field that was validated.
-
-
Method Details
-
add
Add the result of a validator action.- Parameters:
validatorName- Name of the validator.result- Whether the validation passed or failed.
-
add
-
containsAction
Indicate whether a specified validator is in the Result.- Parameters:
validatorName- Name of the validator.- Returns:
- true if the validator is in the result.
-
isValid
Indicate whether a specified validation passed.- Parameters:
validatorName- Name of the validator.- Returns:
- true if the validation passed.
-
getResult
-
getActions
-
getActionMap
Deprecated.Use getActions() to return the set of actions the isValid(name) and getResult(name) methods to determine the contents of ResultStatus.Return a Map of the validator actions in this Result.- Returns:
- Map of validator actions.
-
getField
Returns the Field that was validated.- Returns:
- The Field associated with this result.
-