Class MessagesConstraintGenerator

  extended by org.apache.tapestry5.internal.beaneditor.MessagesConstraintGenerator
All Implemented Interfaces:

public class MessagesConstraintGenerator
extends Object
implements ValidationConstraintGenerator

Generates constraints from the containing component's property file. Looks for a key in the form: propertyId-validate.

Constructor Summary
MessagesConstraintGenerator(Environment environment)
Method Summary
 List<String> buildConstraints(Class propertyType, AnnotationProvider annotationProvider)
          For a given property, identify all the approprite validation constraints.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public MessagesConstraintGenerator(Environment environment)
Method Detail


public List<String> buildConstraints(Class propertyType,
                                     AnnotationProvider annotationProvider)
Description copied from interface: ValidationConstraintGenerator
For a given property, identify all the approprite validation constraints. Each returned value is the name of a validator (i.e., "required") or a validator name and configuration (i.e., "minlength=5"). These contraints are exactly the individual terms in a validate specification. These will ultimately be used to create FieldValidators for the field that edits the property.

Specified by:
buildConstraints in interface ValidationConstraintGenerator
propertyType - the type of the property for which constraints are needed
annotationProvider - provides access to any annotations concerning the property (for implementations that are based on analysis of property annotations)
a list of constraints
See Also:

Copyright © 2003-2012 The Apache Software Foundation.