net.sf.oval.configuration.annotation
Class BeanValidationAnnotationsConfigurer

java.lang.Object
  extended by net.sf.oval.configuration.annotation.BeanValidationAnnotationsConfigurer
All Implemented Interfaces:
Configurer

public class BeanValidationAnnotationsConfigurer
extends Object
implements Configurer

Constraints configurer that interprets the JSR303 built-in Java Bean Validation annotations:

Author:
Sebastian Thomschke

Constructor Summary
BeanValidationAnnotationsConfigurer()
           
 
Method Summary
protected  void configureConstructorParameterChecks(ClassConfiguration classCfg)
           
protected  void configureFieldChecks(ClassConfiguration classCfg)
           
protected  void configureMethodChecks(ClassConfiguration classCfg)
          configure method return value and parameter checks
 ClassConfiguration getClassConfiguration(Class<?> clazz)
          Returns the constraint configurations for the given class.
 ConstraintSetConfiguration getConstraintSetConfiguration(String constraintSetId)
          Returns the constraint configuration for the constraint set with the given Id.
protected  void initializeChecks(Annotation annotation, Collection<Check> checks)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanValidationAnnotationsConfigurer

public BeanValidationAnnotationsConfigurer()
Method Detail

configureConstructorParameterChecks

protected void configureConstructorParameterChecks(ClassConfiguration classCfg)

configureFieldChecks

protected void configureFieldChecks(ClassConfiguration classCfg)

configureMethodChecks

protected void configureMethodChecks(ClassConfiguration classCfg)
configure method return value and parameter checks


getClassConfiguration

public ClassConfiguration getClassConfiguration(Class<?> clazz)
Returns the constraint configurations for the given class. This method is invoked only once by the Validator, the very first time an object of the given class needs to be validated. The constraint configuration is then translated into an Validator internal format and cached.

Specified by:
getClassConfiguration in interface Configurer
Parameters:
clazz - the class to get the configuration for
Returns:
The constraint configurations for the given class.

getConstraintSetConfiguration

public ConstraintSetConfiguration getConstraintSetConfiguration(String constraintSetId)
Returns the constraint configuration for the constraint set with the given Id.

Specified by:
getConstraintSetConfiguration in interface Configurer
Parameters:
constraintSetId - the ID of the constraint set
Returns:
The constraint configuration for the constraint set with the given Id.

initializeChecks

protected void initializeChecks(Annotation annotation,
                                Collection<Check> checks)


Copyright © 2005–2015 The OVal Development Team. All rights reserved.