org.hibernate.validator.internal.cfg.context
Class ConstraintMappingContext

java.lang.Object
  extended by org.hibernate.validator.internal.cfg.context.ConstraintMappingContext

public class ConstraintMappingContext
extends Object

Context which collects constraints, cascades etc. configured via the programmatic API.

Author:
Hardy Ferentschik, Gunnar Morling, Kevin Pollet (C) 2011 SERLI

Constructor Summary
ConstraintMappingContext()
           
 
Method Summary
 void addCascadeConfig(BeanConstraintLocation cascade)
           
 void addConstraintConfig(ConfiguredConstraint<?,BeanConstraintLocation> constraint)
           
 void addDefaultGroupSequence(Class<?> beanClass, List<Class<?>> defaultGroupSequence)
           
<T> void
addDefaultGroupSequenceProvider(Class<T> beanClass, Class<? extends DefaultGroupSequenceProvider<? super T>> defaultGroupSequenceProviderClass)
           
<T> void
addDeprecatedDefaultGroupSequenceProvider(Class<T> beanClass, Class<? extends DefaultGroupSequenceProvider<? super T>> defaultGroupSequenceProviderClass)
           
 void addMethodCascadeConfig(MethodConstraintLocation cascade)
           
 void addMethodConstraintConfig(ConfiguredConstraint<?,MethodConstraintLocation> constraint)
           
 AnnotationProcessingOptions getAnnotationProcessingOptions()
           
 Map<Class<?>,Set<BeanConstraintLocation>> getCascadeConfig()
           
 Collection<Class<?>> getConfiguredClasses()
           
 Map<Class<?>,Set<ConfiguredConstraint<?,BeanConstraintLocation>>> getConstraintConfig()
          Returns all constraint definitions registered with this mapping.
<T> Class<? extends DefaultGroupSequenceProvider<? super T>>
getDefaultGroupSequenceProvider(Class<T> beanType)
          Returns the class of the default group sequence provider defined for the given bean type.
 List<Class<?>> getDefaultSequence(Class<?> beanType)
           
<T> Class<? extends DefaultGroupSequenceProvider<? super T>>
getDeprecatedDefaultGroupSequenceProvider(Class<T> beanType)
          Returns the class of the default group sequence provider defined for the given bean type.
 Map<Class<?>,Set<MethodConstraintLocation>> getMethodCascadeConfig()
           
 Map<Class<?>,Set<ConfiguredConstraint<?,MethodConstraintLocation>>> getMethodConstraintConfig()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstraintMappingContext

public ConstraintMappingContext()
Method Detail

getConstraintConfig

public final Map<Class<?>,Set<ConfiguredConstraint<?,BeanConstraintLocation>>> getConstraintConfig()
Returns all constraint definitions registered with this mapping.

Returns:
A map with this mapping's constraint definitions. Each key in this map represents a bean type, for which the constraint definitions in the associated map value are configured.

getMethodConstraintConfig

public Map<Class<?>,Set<ConfiguredConstraint<?,MethodConstraintLocation>>> getMethodConstraintConfig()

getCascadeConfig

public final Map<Class<?>,Set<BeanConstraintLocation>> getCascadeConfig()

getMethodCascadeConfig

public final Map<Class<?>,Set<MethodConstraintLocation>> getMethodCascadeConfig()

getConfiguredClasses

public final Collection<Class<?>> getConfiguredClasses()

getDefaultSequence

public final List<Class<?>> getDefaultSequence(Class<?> beanType)

getAnnotationProcessingOptions

public final AnnotationProcessingOptions getAnnotationProcessingOptions()

getDeprecatedDefaultGroupSequenceProvider

public final <T> Class<? extends DefaultGroupSequenceProvider<? super T>> getDeprecatedDefaultGroupSequenceProvider(Class<T> beanType)
Returns the class of the default group sequence provider defined for the given bean type.

Parameters:
beanType - The bean type.
Returns:
The default group sequence provider defined class or null if none.

getDefaultGroupSequenceProvider

public final <T> Class<? extends DefaultGroupSequenceProvider<? super T>> getDefaultGroupSequenceProvider(Class<T> beanType)
Returns the class of the default group sequence provider defined for the given bean type.

Parameters:
beanType - The bean type.
Returns:
The default group sequence provider defined class or null if none.

toString

public String toString()
Overrides:
toString in class Object

addCascadeConfig

public final void addCascadeConfig(BeanConstraintLocation cascade)

addMethodCascadeConfig

public final void addMethodCascadeConfig(MethodConstraintLocation cascade)

addDefaultGroupSequence

public final void addDefaultGroupSequence(Class<?> beanClass,
                                          List<Class<?>> defaultGroupSequence)

addDeprecatedDefaultGroupSequenceProvider

public final <T> void addDeprecatedDefaultGroupSequenceProvider(Class<T> beanClass,
                                                                Class<? extends DefaultGroupSequenceProvider<? super T>> defaultGroupSequenceProviderClass)

addDefaultGroupSequenceProvider

public final <T> void addDefaultGroupSequenceProvider(Class<T> beanClass,
                                                      Class<? extends DefaultGroupSequenceProvider<? super T>> defaultGroupSequenceProviderClass)

addConstraintConfig

public final void addConstraintConfig(ConfiguredConstraint<?,BeanConstraintLocation> constraint)

addMethodConstraintConfig

public final void addMethodConstraintConfig(ConfiguredConstraint<?,MethodConstraintLocation> constraint)


Copyright © 2012 Oracle Corporation. All Rights Reserved.