Class CharsetPatternConstraint
java.lang.Object
org.kuali.rice.krad.datadictionary.DictionaryBeanBase
org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint
org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersPatternConstraint
org.kuali.rice.krad.datadictionary.validation.constraint.CharsetPatternConstraint
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,Constraint
Pattern for matching any character in the given list (String)
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
FieldsFields inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint
valueFields inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
applyClientSide, constraintStateOverrides, messageComponentCode, messageKey, messageNamespaceCode, states, validationMessageParamsFields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompleteValidation(ValidationTrace tracer) Validates different requirements of component compiling a series of reports detailing information on errors found in the component.A key that is used to retrieve the constraint message text (used with the namespace and component code if specified)protected StringEscapes every special character I could think of, to limit potential misuse of this pattern.Parameters to be used in the string retrieved by this constraint's messageKeyvoidsetValidChars(String validChars) Methods inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersPatternConstraint
getValue, setValueMethods inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
getApplyClientSide, getConstraintStateOverrides, getMessageComponentCode, getMessageNamespaceCode, getStates, getValidationMessageParamsArray, setApplyClientSide, setConstraintStateOverrides, setMessageComponentCode, setMessageKey, setMessageNamespaceCode, setStates, setValidationMessageParamsMethods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
clone, copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
-
Field Details
-
validChars
-
-
Constructor Details
-
CharsetPatternConstraint
public CharsetPatternConstraint()
-
-
Method Details
-
getValidChars
- Returns:
- String containing all valid chars for this charset
-
setValidChars
- Parameters:
validChars- for this charset
-
getRegexString
Escapes every special character I could think of, to limit potential misuse of this pattern. This method returns a string representing a regex with characters to match, this string should not include the start(^) and end($) symbols or any length related symbols (*, {0,}, etc)- Specified by:
getRegexStringin classValidCharactersPatternConstraint- Returns:
- regular expression
-
getMessageKey
Description copied from class:BaseConstraintA key that is used to retrieve the constraint message text (used with the namespace and component code if specified)- Overrides:
getMessageKeyin classBaseConstraint- Returns:
- String message key
- See Also:
-
getValidationMessageParams
Parameters to be used in the string retrieved by this constraint's messageKey- Overrides:
getValidationMessageParamsin classBaseConstraint- Returns:
- the validationMessageParams
-
completeValidation
Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.- Overrides:
completeValidationin classValidCharactersConstraint- Parameters:
tracer- Record of component's location
-