Class PrimitiveFieldConstraintGenerator
- java.lang.Object
 - 
- org.apache.tapestry5.internal.beaneditor.PrimitiveFieldConstraintGenerator
 
 
- 
- All Implemented Interfaces:
 ValidationConstraintGenerator
public class PrimitiveFieldConstraintGenerator extends Object implements ValidationConstraintGenerator
Adds a "required" constraint for any property of whose type is a primitive (not a wrapper or reference) type. 
- 
- 
Constructor Summary
Constructors Constructor Description PrimitiveFieldConstraintGenerator() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>buildConstraints(Class<?> propertyType, AnnotationProvider annotationProvider)For a given property, identify all the approprite validation constraints. 
 - 
 
- 
- 
Constructor Detail
- 
PrimitiveFieldConstraintGenerator
public PrimitiveFieldConstraintGenerator()
 
 - 
 
- 
Method Detail
- 
buildConstraints
public List<String> buildConstraints(Class<?> propertyType, AnnotationProvider annotationProvider)
Description copied from interface:ValidationConstraintGeneratorFor 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 avalidate specification. These will ultimately be used to createFieldValidators for the field that edits the property.- Specified by:
 buildConstraintsin interfaceValidationConstraintGenerator- Parameters:
 propertyType- the type of the property for which constraints are neededannotationProvider- provides access to any annotations concerning the property (for implementations that are based on analysis of property annotations)- Returns:
 - a list of constraints
 - See Also:
 FieldValidatorSource
 
 - 
 
 -