Class BaseConstraintProvider<T extends Constrainable>
java.lang.Object
org.kuali.rice.krad.datadictionary.validation.constraint.provider.BaseConstraintProvider<T>
- Type Parameters:
T- constrainable type
- All Implemented Interfaces:
ConstraintProvider<T>
- Direct Known Subclasses:
AttributeDefinitionConstraintProvider,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)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetConstraints(T definition, Class<? extends Constraint> constraintType) gets the constraints providedvoidinit()initializes the constraintsvoidsetResolverMap(Map<String, ConstraintResolver<T>> resolverMap) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.datadictionary.validation.constraint.provider.ConstraintProvider
isSupported
-
Field Details
-
resolverMap
-
-
Constructor Details
-
BaseConstraintProvider
public BaseConstraintProvider()
-
-
Method Details
-
init
public void init()initializes the constraintsBy doing initialization here, and not in a constructor, constraints are only placed in memory when they are utilized.
-
getConstraints
Description copied from interface:ConstraintProvidergets the constraints provided- Specified by:
getConstraintsin interfaceConstraintProvider<T extends Constrainable>- Parameters:
definition- - a Data Dictionary definition e.g.ComplexAttributeDefinitionorCollectionDefinitionconstraintType- - a java class that represents the constraint- Returns:
- the list of constraints
- See Also:
-
getResolverMap
- Returns:
- the resolverMap
-
setResolverMap
- Parameters:
resolverMap- the resolverMap to set
-