| java.lang.Object org.apache.beehive.controls.runtime.bean.AnnotationConstraintValidator
All known Subclasses: org.apache.beehive.controls.runtime.generator.apt.AnnotationConstraintAptValidator,
AnnotationConstraintValidator | public class AnnotationConstraintValidator (Code) | | This class offers methods for validating values assigned to a control property.
The validation process will ensure
1. The value is appropriate for the property's property type
2. The value satisfies the constraints defined on the property type
3. The value satisfies the constraints defined on the property set that the property is defined in.
Refer to
org.apache.beehive.controls.api.bean.AnnotationMemberTypes AnnotationMemberTypes and
org.apache.beehive.controls.api.bean.AnnotationConstraints AnnotationConstraints for more
information on property constraints.
|
AnnotationConstraintValidator | public AnnotationConstraintValidator()(Code) | | |
parseDate | public static Date parseDate(String format, String value) throws ParseException(Code) | | Parse a date value into the specified format. Pay special attention to the case of the value
having trailing characters, ex. 12/02/2005xx which will not cause the parse of the date to fail
but should be still treated as an error for our purposes.
Parameters: format - Format string for the date. Parameters: value - A String containing the date value to parse. A Date instance if the parse was successful. throws: ParseException - If the value is not a valid date. |
validate | public static void validate(PropertyKey key, Object value) throws IllegalArgumentException(Code) | | This method ensures that any control property value assignment satisfies
all property constraints. This method should be called by control
property setters to ensure values assigned to properties at runtime are
validated.
Parameters: key - The property that the specified key is assigned to Parameters: value - The value assigned to the specified property key throws: IllegalArgumentException - when the value assigned to the specified property key doesnot satisfy a property constraint. |
validateMembership | public static void validateMembership(Annotation propertySet)(Code) | | This method ensures the membership constraints defined on a property set
is satisfied.
Parameters: propertySet - the property set to validate |
|
|