Class ConfigurationBasedRegexPatternConstraint

All Implemented Interfaces:
Serializable, Cloneable, Copyable, DictionaryBean, 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:
  • Field Details

    • patternTypeKey

      protected String patternTypeKey
  • Constructor Details

    • ConfigurationBasedRegexPatternConstraint

      public ConfigurationBasedRegexPatternConstraint()
  • Method Details

    • 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:
    • 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