java.io.Serializable
public class ValidatorResult
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class | Description |
---|---|---|
protected static class |
ValidatorResult.ResultStatus |
Contains the status of the validation.
|
Modifier and Type | Field | Description |
---|---|---|
protected Field |
field |
Field being validated. |
protected java.util.Map<java.lang.String,ValidatorResult.ResultStatus> |
hAction |
Map of results.
|
Constructor | Description |
---|---|
ValidatorResult(Field field) |
Constructs a
ValidatorResult with the associated field being
validated. |
Modifier and Type | Method | Description |
---|---|---|
void |
add(java.lang.String validatorName,
boolean result) |
Add the result of a validator action.
|
void |
add(java.lang.String validatorName,
boolean result,
java.lang.Object value) |
Add the result of a validator action.
|
boolean |
containsAction(java.lang.String validatorName) |
Indicate whether a specified validator is in the Result.
|
java.util.Map<java.lang.String,ValidatorResult.ResultStatus> |
getActionMap() |
Deprecated.
Use getActions() to return the set of actions
the isValid(name) and getResult(name) methods
to determine the contents of ResultStatus.
|
java.util.Iterator<java.lang.String> |
getActions() |
Return an Iterator of the action names contained in this Result.
|
Field |
getField() |
Returns the Field that was validated.
|
java.lang.Object |
getResult(java.lang.String validatorName) |
Return the result of a validation.
|
boolean |
isValid(java.lang.String validatorName) |
Indicate whether a specified validation passed.
|
protected java.util.Map<java.lang.String,ValidatorResult.ResultStatus> 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.public ValidatorResult(Field field)
ValidatorResult
with the associated field being
validated.field
- Field that was validated.public void add(java.lang.String validatorName, boolean result)
validatorName
- Name of the validator.result
- Whether the validation passed or failed.public void add(java.lang.String validatorName, boolean result, java.lang.Object value)
validatorName
- Name of the validator.result
- Whether the validation passed or failed.value
- Value returned by the validator.public boolean containsAction(java.lang.String validatorName)
validatorName
- Name of the validator.public boolean isValid(java.lang.String validatorName)
validatorName
- Name of the validator.public java.lang.Object getResult(java.lang.String validatorName)
validatorName
- Name of the validator.public java.util.Iterator<java.lang.String> getActions()
@Deprecated public java.util.Map<java.lang.String,ValidatorResult.ResultStatus> getActionMap()
public Field getField()
Copyright © 2002–2018. All rights reserved.