Package org.apache.commons.validator
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.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Contains the status of the validation. -
Field Summary
-
Constructor Summary
ConstructorDescriptionValidatorResult
(Field field) Constructs aValidatorResult
with the associated field being validated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the result of a validator action.void
Add the result of a validator action.boolean
containsAction
(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.Gets an Iterator of the action names contained in this Result.getField()
Returns the Field that was validated.Gets the result of a validation.boolean
Indicate whether a specified validation passed.
-
Field Details
-
hAction
Map of results. The key is the name of theValidatorAction
and the value is whether or not this field passed or not. -
field
Field
being validated. TODO This variable is not used. Need to investigate removing it.
-
-
Constructor Details
-
ValidatorResult
Constructs aValidatorResult
with 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
Add the result of a validator action.- Parameters:
validatorName
- Name of the validator.result
- Whether the validation passed or failed.value
- Value returned by the validator.
-
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.
-
getActionMap
Deprecated.Use getActions() to return the set of actions the isValid(name) and getResult(name) methods to determine the contents of ResultStatus.Gets a Map of the validator actions in this Result.- Returns:
- Map of validator actions.
-
getActions
Gets an Iterator of the action names contained in this Result.- Returns:
- The set of action names.
-
getField
Returns the Field that was validated.- Returns:
- The Field associated with this result.
-
getResult
Gets the result of a validation.- Parameters:
validatorName
- Name of the validator.- Returns:
- The validation result.
-
isValid
Indicate whether a specified validation passed.- Parameters:
validatorName
- Name of the validator.- Returns:
- true if the validation passed.
-