org.hibernate.validator.internal.cfg.context
Class ConstraintMappingContext
java.lang.Object
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
|
Method Summary |
void |
addCascadeConfig(BeanConstraintLocation cascade)
|
void |
addConstraintConfig(ConfiguredConstraint<?,BeanConstraintLocation> constraint)
|
void |
addDefaultGroupSequence(Class<?> beanClass,
List<Class<?>> defaultGroupSequence)
|
|
addDefaultGroupSequenceProvider(Class<T> beanClass,
Class<? extends DefaultGroupSequenceProvider<? super T>> defaultGroupSequenceProviderClass)
|
|
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. |
|
getDefaultGroupSequenceProvider(Class<T> beanType)
Returns the class of the default group sequence provider defined
for the given bean type. |
List<Class<?>> |
getDefaultSequence(Class<?> beanType)
|
|
getDeprecatedDefaultGroupSequenceProvider(Class<T> beanType)
Returns the class of the default group sequence provider defined
for the given bean type. |
static ConstraintMappingContext |
getFromMapping(ConstraintMapping mapping)
Returns the constraint mapping context from the given constraint mapping. |
Map<Class<?>,Set<MethodConstraintLocation>> |
getMethodCascadeConfig()
|
Map<Class<?>,Set<ConfiguredConstraint<?,MethodConstraintLocation>>> |
getMethodConstraintConfig()
|
String |
toString()
|
ConstraintMappingContext
public ConstraintMappingContext()
getFromMapping
public static ConstraintMappingContext getFromMapping(ConstraintMapping mapping)
- Returns the constraint mapping context from the given constraint mapping.
- Parameters:
mapping - the programmatic constraint mapping
- Returns:
- returns the constraint mapping context from the given constraint mapping
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.