Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5.services
Interface ValidationConstraintGenerator

All Known Implementing Classes:
  MessagesConstraintGenerator, PrimitiveFieldConstraintGenerator, ValidateAnnotationConstraintGenerator, ValidationConstraintGeneratorImpl

    @UsesOrderedConfiguration(value=ValidationConstraintGenerator.class)
    public interface ValidationConstraintGenerator

Invoked to generate a list of validation constraint strings for a property. This typically involves scanning the property for annotations or naming conventions that confer the desired validation. The constraint strings are ultimately handed to `FieldValidatorSource.createValidator(org.apache.tapestry5.Field, String, String, String, org.apache.tapestry5.ioc.Messages, java.util.Locale)`.

Method Summary
`java.util.List<java.lang.String>` | `buildConstraints(java.lang.Class propertyType, AnnotationProvider annotationProvider)` For a given property, identify all the approprite validation constraints.

Method Detail

### buildConstraints

    java.util.List<java.lang.String> buildConstraints(java.lang.Class propertyType,
                                                      AnnotationProvider annotationProvider)

  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 `FieldValidator`s for the field that edits the property.

  Parameters:
    `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)
  Returns:
    a list of constraints
  See Also:
    `FieldValidatorSource`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.