public class WhenConstraint extends Object implements Constraint
WhenConstraint
is a child of a CaseConstraint
It provides a specific additional constraint that should be processed when the condition itself is true.
So a case constraint on country, might have a when constraint with value='USA', and another with value='Canada'.
Each of these
WhenConstraint
's would define a constraint of their own that would only be processed when the country was
USA, or when the country
was Canada.
A WhenConstraint
either specifies an attribute path whose value it then provides or a constraint.
The parent @{CaseConstraint} is defined on the field on which the constraints are desired to take effect.
Modifier and Type | Field and Description |
---|---|
protected Constraint |
constraint |
protected String |
valuePath |
protected List<Object> |
values |
Constructor and Description |
---|
WhenConstraint() |
Modifier and Type | Method and Description |
---|---|
void |
completeValidation(ValidationTrace tracer)
Validates different requirements of component compiling a series of reports detailing information on errors
found in the component.
|
Constraint |
getConstraint()
The constraint to apply to the field when the
WhenConstraint value/values match |
Object |
getValue()
The value to check for this when constraint.
|
String |
getValuePath()
Path that can retrieve an attributes value
|
List<Object> |
getValues()
List of values to check for this constraint
|
void |
setConstraint(Constraint constraint)
setter for constraint
|
void |
setValue(Object value)
Sets a single value to check for this constraint.
|
void |
setValuePath(String valuePath)
setter for the value path
|
void |
setValues(List<Object> values)
setter for values
|
protected Constraint constraint
public WhenConstraint()
public List<Object> getValues()
public void setValues(List<Object> values)
values
- - the values to setpublic Object getValue()
public void setValue(Object value)
value
- - a values for which to activate the associated constraintpublic String getValuePath()
public void setValuePath(String valuePath)
valuePath
- - the value path to setpublic Constraint getConstraint()
WhenConstraint
value/values matchpublic void setConstraint(Constraint constraint)
constraint
- - the constraint to setpublic void completeValidation(ValidationTrace tracer)
tracer
- Record of component's locationCopyright © 2005–2015 The Kuali Foundation. All rights reserved.