org.kuali.rice.krad.datadictionary.validation.constraint.provider
Class BaseConstraintProvider<T extends Constrainable>
java.lang.Object
org.kuali.rice.krad.datadictionary.validation.constraint.provider.BaseConstraintProvider<T>
- All Implemented Interfaces:
- ConstraintProvider<T>
- Direct Known Subclasses:
- AttributeDefinitionConstraintProvider, CollectionDefinitionConstraintProvider, ComplexAttributeDefinitionConstraintProvider, DataObjectEntryConstraintProvider
public abstract class BaseConstraintProvider<T extends Constrainable>
- extends Object
- implements ConstraintProvider<T>
BaseConstraintProvider implements a simple in memory storage map of constraint resolvers
This provides a convenient base class
from which other constraint providers can be derived.
- Since:
- 1.1
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resolverMap
protected Map<String,ConstraintResolver<T extends Constrainable>> resolverMap
BaseConstraintProvider
public BaseConstraintProvider()
init
public void init()
- initializes the constraints
By doing initialization here, and not in a constructor, constraints are only placed in memory when they are
utilized.
getConstraints
public List<Constraint> getConstraints(T definition,
Class<? extends Constraint> constraintType)
- Description copied from interface:
ConstraintProvider
- gets the constraints provided
- Specified by:
getConstraints
in interface ConstraintProvider<T extends Constrainable>
- Parameters:
definition
- - a Data Dictionary definition e.g. ComplexAttributeDefinition
or CollectionDefinition
constraintType
- - a java class that represents the constraint
- Returns:
- the list of constraints
- See Also:
ConstraintProvider.getConstraints(org.kuali.rice.krad.datadictionary.validation.capability.Constrainable,
java.lang.Class)
getResolverMap
public Map<String,ConstraintResolver<T>> getResolverMap()
- Returns:
- the resolverMap
setResolverMap
public void setResolverMap(Map<String,ConstraintResolver<T>> resolverMap)
- Parameters:
resolverMap
- the resolverMap to set
Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.