com.ca.jcs.validator.meta
Class EnumValueValidator
java.lang.Object
com.ca.jcs.validator.meta.EnumValueValidator
- All Implemented Interfaces:
- AttributeValidator
public class EnumValueValidator
- extends Object
- implements AttributeValidator
Validate that all of an attribute's values are valid against an enum
defined in metadata. This class is the odd one out in this package, as it
needs access to the DataModelProperty in its constructor but
is only a humble AttributeValidator.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnumValueValidator
public EnumValueValidator(DataModelValue val)
validate
public ErrorMessages validate(Attribute attr)
- Description copied from interface:
AttributeValidator
- Validate the provided value.
- Specified by:
validate in interface AttributeValidator
- Parameters:
attr - Attribute whose values are to be validated.
- Returns:
- Null if all value have desired format, and otherwise one or
more error messages where only their
msgFormatId field
needs to be set.
Created 2011-07-14 13:27 EST