org.apache.commons.validator

Class ValidatorResult

public class ValidatorResult extends Object implements Serializable

This contains the results of a set of validation rules processed on a JavaBean.
Nested Class Summary
protected classValidatorResult.ResultStatus
Contains the status of the validation.
Field Summary
protected Fieldfield
Field being validated.
protected MaphAction
Map of results.
Constructor Summary
ValidatorResult(Field field)
Constructs a ValidatorResult with the associated field being validated.
Method Summary
voidadd(String validatorName, boolean result)
Add the result of a validator action.
voidadd(String validatorName, boolean result, Object value)
Add the result of a validator action.
booleancontainsAction(String validatorName)
MapgetActionMap()
FieldgetField()
Returns the Field that was validated.
booleanisValid(String validatorName)

Field Detail

field

protected Field field
Field being validated. TODO This variable is not used. Need to investigate removing it.

hAction

protected Map hAction
Map of results. The key is the name of the ValidatorAction and the value is whether or not this field passed or not.

Constructor Detail

ValidatorResult

public ValidatorResult(Field field)
Constructs a ValidatorResult with the associated field being validated.

Method Detail

add

public void add(String validatorName, boolean result)
Add the result of a validator action.

add

public void add(String validatorName, boolean result, Object value)
Add the result of a validator action.

containsAction

public boolean containsAction(String validatorName)

getActionMap

public Map getActionMap()

getField

public Field getField()
Returns the Field that was validated.

isValid

public boolean isValid(String validatorName)
Copyright (c) 2001-2004 Apache Software Foundation