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)

Author:
Kuali Rice Team (rice.collab@kuali.org)
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, messageComponentCode, messageKey, messageNamespaceCode, states, validationMessageParams
 
Constructor Summary
CharsetPatternConstraint()
           
 
Method Summary
 void completeValidation(ValidationTrace tracer)
          Validates different requirements of component compiling a series of reports detailing information on errors found in the component.
 String getMessageKey()
          A key that is used to retrieve the constraint message text (used with the namespace and component code if specified)
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 messageKey
 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, getMessageComponentCode, getMessageNamespaceCode, getStates, 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
 

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()

getMessageKey

public String getMessageKey()
Description copied from class: BaseConstraint
A key that is used to retrieve the constraint message text (used with the namespace and component code if specified)

Overrides:
getMessageKey in class BaseConstraint
Returns:
String message key
See Also:
BaseConstraint.getMessageKey()

getValidationMessageParams

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

Overrides:
getValidationMessageParams in class BaseConstraint
Returns:
the validationMessageParams

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:
completeValidation in class ValidCharactersConstraint
Parameters:
tracer - Record of component's location


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