Class CaseConstraint
java.lang.Object
org.kuali.rice.krad.datadictionary.DictionaryBeanBase
org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
org.kuali.rice.krad.datadictionary.validation.constraint.CaseConstraint
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,Constraint
CaseConstraint is imposed only when a certain condition is met
For example, if the country attribute value is "USA", then a prerequisite constraint may be imposed that the 'State' attribute is non-null.
This class is a direct copy of one that was in Kuali Student.
- Since:
- 1.1
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Stringprotected Stringprotected List<WhenConstraint> Fields inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
applyClientSide, constraintStateOverrides, messageComponentCode, messageKey, messageNamespaceCode, states, validationMessageParamsFields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompleteValidation(ValidationTrace tracer) Validates different requirements of component compiling a series of reports detailing information on errors found in the component.specifies the kind of relationship to be checked between the actual value and the ones defined in thegetWhenConstraint()gets the property name for the attribute to which the case constraint is applied toget theWhenConstraint's defined by this case constraintbooleanchecks whether string comparison will be carried out in a case sensitive fashionvoidsetCaseSensitive(boolean caseSensitive) setter for case sensitivevoidsetOperator(String operator) setter for the operatorvoidsetPropertyName(String propertyName) setter for property namevoidsetWhenConstraint(List<WhenConstraint> whenConstraint) sets theWhenConstraint's defined by this case constraintMethods inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
getApplyClientSide, getConstraintStateOverrides, getMessageComponentCode, getMessageKey, getMessageNamespaceCode, getStates, getValidationMessageParams, getValidationMessageParamsArray, setApplyClientSide, setConstraintStateOverrides, setMessageComponentCode, setMessageKey, setMessageNamespaceCode, setStates, setValidationMessageParamsMethods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
clone, copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
-
Field Details
-
propertyName
-
operator
-
caseSensitive
protected boolean caseSensitive -
whenConstraint
-
-
Constructor Details
-
CaseConstraint
public CaseConstraint()
-
-
Method Details
-
getWhenConstraint
get theWhenConstraint's defined by this case constraint- Returns:
- a list of constraints, null if not initialized
-
setWhenConstraint
sets theWhenConstraint's defined by this case constraint- Parameters:
whenConstraint- - the list of constraints
-
getPropertyName
gets the property name for the attribute to which the case constraint is applied to- Returns:
- the property name
-
setPropertyName
setter for property name- Parameters:
propertyName- a valid property name
-
getOperator
specifies the kind of relationship to be checked between the actual value and the ones defined in thegetWhenConstraint()- Returns:
- an operator name
- See Also:
-
setOperator
setter for the operator- Parameters:
operator-- See Also:
-
isCaseSensitive
public boolean isCaseSensitive()checks whether string comparison will be carried out in a case sensitive fashion- Returns:
- true if string comparison is case sensitive, false if not
-
setCaseSensitive
public void setCaseSensitive(boolean caseSensitive) setter for case sensitive- Parameters:
caseSensitive- - the case sensitive value to set
-
completeValidation
Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.- Overrides:
completeValidationin classBaseConstraint- Parameters:
tracer- Record of component's location
-