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

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
      extended by org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint
          extended by org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersPatternConstraint
              extended by org.kuali.rice.krad.datadictionary.validation.constraint.CharsetPatternConstraint
All Implemented Interfaces:
Serializable, Constraint

public class CharsetPatternConstraint
extends ValidCharactersPatternConstraint

Pattern for matching any character in the given list (String)

See Also:
Serialized Form

Field Summary
protected  String validChars
           
 
Fields inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint
value
 
Fields inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
applyClientSide, constraintStateOverrides, labelKey, states, validationMessageParams
 
Constructor Summary
CharsetPatternConstraint()
           
 
Method Summary
 String getLabelKey()
          LabelKey should be a single word key.
protected  String getRegexString()
          Escapes every special character I could think of, to limit potential misuse of this pattern.
 List<String> getValidationMessageParams()
          Parameters to be used in the string retrieved by this constraint's labelKey
 String getValidChars()
           
 void setValidChars(String validChars)
           
 
Methods inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersPatternConstraint
getValue, setValue
 
Methods inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
getApplyClientSide, getConstraintStateOverrides, getStates, getValidationMessageParamsArray, setApplyClientSide, setConstraintStateOverrides, setLabelKey, setStates, setValidationMessageParams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

validChars

protected String validChars
Constructor Detail

CharsetPatternConstraint

public CharsetPatternConstraint()
Method Detail

getValidChars

public String getValidChars()
Returns:
String containing all valid chars for this charset

setValidChars

public void setValidChars(String validChars)
Parameters:
validChars - for this charset

getRegexString

protected String getRegexString()
Escapes every special character I could think of, to limit potential misuse of this pattern.

Specified by:
getRegexString in class ValidCharactersPatternConstraint
Returns:
See Also:
ValidationPattern.getRegexString()

getLabelKey

public String getLabelKey()
Description copied from class: BaseConstraint
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.

Overrides:
getLabelKey in class BaseConstraint
Returns:
See Also:
BaseConstraint.getLabelKey()

getValidationMessageParams

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

Overrides:
getValidationMessageParams in class BaseConstraint
Returns:
the validationMessageParams


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