org.kuali.rice.krad.datadictionary.validation.constraint
Class BaseConstraint

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
All Implemented Interfaces:
Serializable, Constraint
Direct Known Subclasses:
CaseConstraint, MustOccurConstraint, PrerequisiteConstraint, SimpleConstraint, ValidCharactersConstraint

public class BaseConstraint
extends Object
implements Constraint

A class that implements the required accessor for label keys. This provides a convenient base class from which other constraints can be derived. 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:
Serialized Form

Field Summary
protected  Boolean applyClientSide
           
protected  String labelKey
           
 
Constructor Summary
BaseConstraint()
           
 
Method Summary
 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.
 String getLabelKey()
          LabelKey should be a single word key.
 List<String> getValidationMessageParams()
          Parameters to be used in the string retrieved by this constraint's labelKey, ordered by number of the param
 String[] getValidationMessageParamsArray()
          Parameters to be used in the string retrieved by this constraint's labelKey, ordered by number of the param
 void setApplyClientSide(Boolean applyClientSide)
           
 void setLabelKey(String labelKey)
           
 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

labelKey

protected String labelKey

applyClientSide

protected Boolean applyClientSide
Constructor Detail

BaseConstraint

public BaseConstraint()
Method Detail

getLabelKey

public String getLabelKey()
LabelKey should be a single word key. This key is used to find a message to use for this constraint from available messages. The key is also used for defining/retrieving validation method names when applicable for ValidCharactersContraints. If a comma separated list of keys is used, a message will be generated that is a comma separated list of the messages retrieved for each key.

Returns:
See Also:
ValidCharactersConstraint

setLabelKey

public void setLabelKey(String labelKey)

getApplyClientSide

public 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. Default is true.

Returns:
the applyClientSide

setApplyClientSide

public void setApplyClientSide(Boolean applyClientSide)
Parameters:
applyClientSide - the applyClientSide to set

getValidationMessageParams

public List<String> getValidationMessageParams()
Parameters to be used in the string retrieved by this constraint's labelKey, ordered by number of the param

Returns:
the validationMessageParams

getValidationMessageParamsArray

public String[] getValidationMessageParamsArray()
Parameters to be used in the string retrieved by this constraint's labelKey, ordered by number of the param

Returns:
the validationMessageParams

setValidationMessageParams

public void setValidationMessageParams(List<String> validationMessageParams)
Parameters:
validationMessageParams - the validationMessageParams to set


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.