org.kuali.rice.krad.datadictionary.validation.constraint
Class MustOccurConstraint
java.lang.Object
   org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
       org.kuali.rice.krad.datadictionary.validation.constraint.MustOccurConstraint
org.kuali.rice.krad.datadictionary.validation.constraint.MustOccurConstraint
- All Implemented Interfaces: 
- Serializable, Constraint
- public class MustOccurConstraint 
- extends BaseConstraint
Must occur constraints are constraints that indicate some range of acceptable valid results. So a must occur
 constraint
 might indicate that between 1 and 3 prequisite constraints must be valid. For example, on a person object, it might
 be
 that one of three fields must be filled in:
 1. username
 2. email
 3. phone number
 By imposing a must occur constraint on the person object iself, and setting three prequisite constraints below it,
 with a min of 1
 and a max of 3, this requirement can be enforced.
 A more complicated example might be that a US address is only valid if it provides either:
 (a) a city and state, or
 (b) a postal code
 To enforce this, a single must occur constraint would have two children: (1) a prequisite constraint on postal code,
 and (2) a must occur constraint
 with two child prequisite constraints, on city and state, respectively. By setting min=1/max=2 at the top must occur
 constraint,
 and min=2/max=2 at the leaf constraint, this requirement can be enforced.
- Since:
- 1.1
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
- Serialized Form
 
 
 
 
| Methods 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, setValidationMessageParams | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
MustOccurConstraint
public MustOccurConstraint()
getPrerequisiteConstraints
public List<PrerequisiteConstraint> getPrerequisiteConstraints()
- 
 
setPrerequisiteConstraints
public void setPrerequisiteConstraints(List<PrerequisiteConstraint> prerequisiteConstraints)
- 
 
getMustOccurConstraints
public List<MustOccurConstraint> getMustOccurConstraints()
- 
 
setMustOccurConstraints
public void setMustOccurConstraints(List<MustOccurConstraint> occurs)
- 
 
getMin
public Integer getMin()
- 
 
setMin
public void setMin(Integer min)
- 
 
getMax
public Integer getMax()
- 
 
setMax
public void setMax(Integer max)
- 
 
completeValidation
public void completeValidation(ValidationTrace tracer)
- Validates different requirements of component compiling a series of reports detailing information on errors
 found in the component.  Used by the RiceDictionaryValidator.
 
- 
- Overrides:
- completeValidationin class- BaseConstraint
 
- 
- Parameters:
- tracer- Record of component's location
 
Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.