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

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.ValidDataPatternConstraint
              extended by org.kuali.rice.krad.datadictionary.validation.constraint.ConfigurationBasedRegexPatternConstraint
All Implemented Interfaces:
Serializable, Constraint
Direct Known Subclasses:
FloatingPointPatternConstraint

public class ConfigurationBasedRegexPatternConstraint
extends ValidDataPatternConstraint

ConfigurationBasedRegexPatternConstraint uses a patternTypeKey to get the regex used for validation by key from the KualiConfigurationService

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Field Summary
protected  String patternTypeKey
           
 
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
ConfigurationBasedRegexPatternConstraint()
           
 
Method Summary
 String getMessageKey()
          MessageKey in used in this class have the patternTypeKey appended to the VALIDATION_MSG_KEY_PREFIX by default, if it is not explicitly set to something else
 String getPatternTypeKey()
          Message key used to identify the validation pattern
protected  String getRegexString()
          Uses the key returned by getPatternTypeKey() to fetch the validationPattern's regex string from the ConfigurationService which should not include the start(^) and end($) symbols
 void setPatternTypeKey(String patternTypeKey)
          Setter for the pattern message key
 
Methods inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.ValidDataPatternConstraint
getValue, setValue
 
Methods inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint
completeValidation
 
Methods inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
getApplyClientSide, getConstraintStateOverrides, getMessageComponentCode, getMessageNamespaceCode, getStates, getValidationMessageParams, 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

patternTypeKey

protected String patternTypeKey
Constructor Detail

ConfigurationBasedRegexPatternConstraint

public ConfigurationBasedRegexPatternConstraint()
Method Detail

getPatternTypeKey

public String getPatternTypeKey()
Message key used to identify the validation pattern

Returns:
the patternTypeKey

setPatternTypeKey

public void setPatternTypeKey(String patternTypeKey)
Setter for the pattern message key

Parameters:
patternTypeKey - the patternTypeKey to set

getMessageKey

public String getMessageKey()
MessageKey in used in this class have the patternTypeKey appended to the VALIDATION_MSG_KEY_PREFIX by default, if it is not explicitly set to something else

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

getRegexString

protected String getRegexString()
Uses the key returned by getPatternTypeKey() to fetch the validationPattern's regex string from the ConfigurationService which should not include the start(^) and end($) symbols

Specified by:
getRegexString in class ValidDataPatternConstraint
Returns:
String regex validation string


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