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)
           
 void addMethodCascadeConfig(ExecutableConstraintLocation cascade)
           
 void addMethodConstraintConfig(ConfiguredConstraint<?,ExecutableConstraintLocation> constraint)
           
 AnnotationProcessingOptionsImpl 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)
           
 Map<Class<?>,Set<ExecutableConstraintLocation>> getMethodCascadeConfig()
           
 Map<Class<?>,Set<ConfiguredConstraint<?,ExecutableConstraintLocation>>> 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<?,ExecutableConstraintLocation>>> getMethodConstraintConfig()

getCascadeConfig

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

getMethodCascadeConfig

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

getConfiguredClasses

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

getDefaultSequence

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

getAnnotationProcessingOptions

public final AnnotationProcessingOptionsImpl getAnnotationProcessingOptions()

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(ExecutableConstraintLocation cascade)

addDefaultGroupSequence

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

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<?,ExecutableConstraintLocation> constraint)


Copyright © 2007-2013 Red Hat, Inc. All Rights Reserved