|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
public class BaseConstraint
A class that implements the required accessor for label keys. This provides a convenient base class from which other constraints can be derived. Only BaseConstraints can have state validation. This class is a direct copy of one that was in Kuali Student.
Field Summary | |
---|---|
protected Boolean |
applyClientSide
|
protected List<? extends BaseConstraint> |
constraintStateOverrides
|
protected String |
messageComponentCode
|
protected String |
messageKey
|
protected String |
messageNamespaceCode
|
protected List<String> |
states
|
protected List<String> |
validationMessageParams
|
Constructor Summary | |
---|---|
BaseConstraint()
|
Method Summary | |
---|---|
void |
completeValidation(ValidationTrace tracer)
Validates different requirements of component compiling a series of reports detailing information on errors found in the component. |
Boolean |
getApplyClientSide()
If this is true, the constraint should be applied on the client side when the user interacts with a field - if this constraint can be interpreted for client side use. |
List<? extends BaseConstraint> |
getConstraintStateOverrides()
Get the list of constraintStateOverrides which represent constraints that will replace THIS constraint when their state is matched during validation. |
String |
getMessageComponentCode()
A code within the namespace that identifies a component or group the constraint message is associated with |
String |
getMessageKey()
A key that is used to retrieve the constraint message text (used with the namespace and component code if specified) |
String |
getMessageNamespaceCode()
Namespace code (often an application or module code) the constraint failure message is associated with |
List<String> |
getStates()
A list of states to apply this constraint for, this will effect when a constraint is applied. |
List<String> |
getValidationMessageParams()
Parameters to be used in the string retrieved by this constraint's messageKey, ordered by number of the param |
String[] |
getValidationMessageParamsArray()
Parameters to be used in the string retrieved by this constraint's messageKey, ordered by number of the param |
void |
setApplyClientSide(Boolean applyClientSide)
|
void |
setConstraintStateOverrides(List<? extends BaseConstraint> constraintStateOverrides)
Set the constraintStateOverrides to be used when a state is matched during validation |
void |
setMessageComponentCode(String messageComponentCode)
Setter for the constraint message associated component code |
void |
setMessageKey(String messageKey)
Setter for the constraint message key |
void |
setMessageNamespaceCode(String messageNamespaceCode)
Setter for the constraint message associated namespace code |
void |
setStates(List<String> states)
Set the states for this contraint to be applied on |
void |
setValidationMessageParams(List<String> validationMessageParams)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String messageNamespaceCode
protected String messageComponentCode
protected String messageKey
protected Boolean applyClientSide
protected List<String> validationMessageParams
protected List<String> states
protected List<? extends BaseConstraint> constraintStateOverrides
Constructor Detail |
---|
public BaseConstraint()
Method Detail |
---|
public String getMessageNamespaceCode()
Used with the component code and error key for retrieving the constraint. If null, the default namespace code will be used
public void setMessageNamespaceCode(String messageNamespaceCode)
messageNamespaceCode
- public String getMessageComponentCode()
Used with the namespace and error key for retrieving the constraint text. If null, the default component code will be used
public void setMessageComponentCode(String messageComponentCode)
messageComponentCode
- public String getMessageKey()
public void setMessageKey(String messageKey)
messageKey
- public Boolean getApplyClientSide()
public void setApplyClientSide(Boolean applyClientSide)
applyClientSide
- the applyClientSide to setpublic List<String> getValidationMessageParams()
public String[] getValidationMessageParamsArray()
public void setValidationMessageParams(List<String> validationMessageParams)
validationMessageParams
- the validationMessageParams to setpublic List<String> getStates()
Each state this constraint is applied for needs to be declared with few additional options:
Example state list may be: ["state1", "state3>state5", "state6+"]. In this example, note that this constraint is never applied to "state2" (assuming these example states represent a state order by number)
public void setStates(List<String> states)
states
- public List<? extends BaseConstraint> getConstraintStateOverrides()
ConstraintStateOverrides always take precedence over this constraint if they apply to the state being evaluated during validation. These settings have no effect if there is no stateMapping represented on the entry/view being evaluated.
public void setConstraintStateOverrides(List<? extends BaseConstraint> constraintStateOverrides)
constraintStateOverrides
- public void completeValidation(ValidationTrace tracer)
tracer
- Record of component's location
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |