Class ValidationPattern

java.lang.Object
org.kuali.rice.krad.datadictionary.validation.ValidationPattern
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CharacterLevelValidationPattern, FieldLevelValidationPattern

@Deprecated public abstract class ValidationPattern extends Object implements Serializable
Deprecated.
Abstraction of the regular expressions used to validate attribute values. The validationPattern element defines the allowable character-level or field-level values for an attribute. JSTL: validationPattern is a Map which is accessed using a key of "validationPattern". Each entry may contain some of the keys listed below. The keys that may be present for a given attribute are dependent upon the type of validationPattern. maxLength (String) exactLength type allowWhitespace allowUnderscore allowPeriod validChars precision scale allowNegative The allowable keys (in addition to type) for each type are: ***Type**** ***Keys*** alphanumeric exactLength maxLength allowWhitespace allowUnderscore allowPeriod alpha exactLength maxLength allowWhitespace anyCharacter exactLength maxLength allowWhitespace charset validChars numeric exactLength maxLength fixedPoint allowNegative precision scale floatingPoint allowNegative date n/a emailAddress n/a javaClass n/a month n/a phoneNumber n/a timestamp n/a year n/a zipcode n/a Note: maxLength and exactLength are mutually exclusive. If one is entered, the other may not be entered. Note: See ApplicationResources.properties for exact regex patterns. e.g. validationPatternRegex.date for regex used in date validation.
See Also:
  • Constructor Details

    • ValidationPattern

      public ValidationPattern()
      Deprecated.
  • Method Details

    • getRegexPattern

      public abstract Pattern getRegexPattern()
      Deprecated.
      Returns:
      regular expression Pattern generated by the individual ValidationPattern subclass
    • getRegexString

      protected abstract String getRegexString()
      Deprecated.
      Returns:
      String version of regular expression base, suitable for modification with length-specifiers and used internally by getRegexPattern
    • matches

      public boolean matches(String input)
      Deprecated.
      Determines if an input string matches the pattern.
      Parameters:
      input - input string
      Returns:
      true if the given String matches this pattern
    • buildExportMap

      public abstract ExportMap buildExportMap(String exportKey)
      Deprecated.
      Builds an export map describing the subclass instance.
      Parameters:
      exportKey -
      Returns:
      export map
    • getValidationErrorMessageKey

      public abstract String getValidationErrorMessageKey()
      Deprecated.
    • getValidationErrorMessageParameters

      public String[] getValidationErrorMessageParameters(String attributeLabel)
      Deprecated.
    • completeValidation

      public void completeValidation() throws ValidationPattern.ValidationPatternException
      Deprecated.
      This method throws an exception if it is not configured properly
      Throws:
      ValidationPattern.ValidationPatternException