|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AttributeValidator
An interface to a Variable attribute validator.
| Method Summary | |
|---|---|
Object |
validateValue(Variable var,
String attributeName,
Object attributeValue,
Map modifiedAttributes)
Validates the specified attribute value. |
void |
validateValues(Variable var,
Map modifiedAttributes)
Validates the attribute values in the specified map. |
| Method Detail |
|---|
Object validateValue(Variable var,
String attributeName,
Object attributeValue,
Map modifiedAttributes)
throws InvalidAttributeValueException
The variable contains always the current values of the attributes. The attribute map contains new values of related attributes that have been modified at the same time as the specified one. The map will be updated according to the validated value.
var - the variable owning the attribute.attributeName - the name of the attribute.attributeValue - the value to be validated.modifiedAttributes - a read-only map of modified attributes.
InvalidAttributeValueException - if the value is not valid.
void validateValues(Variable var,
Map modifiedAttributes)
throws AttributeNotFoundException,
InvalidAttributeValueException
Note that it is also allowed to add new values to the map e.g. for dependent read-only attributes.
The method may throw InvalidAttributeValueException specifying the name of the invalid attribute as the message argument, or InvalidAttributeValuesException for for multiple attributes with any validation specific exception as the wrapped exception argument.
var - the variable owning the attributes.modifiedAttributes - a map of modified attribute values.
AttributeNotFoundException - for missing attributes.
InvalidAttributeValueException - if the values are not valid.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||