Class ValidatorType

java.lang.Object
com.aquima.interactions.framework.validator.ValidatorType
All Implemented Interfaces:
Serializable

public class ValidatorType extends Object implements Serializable
This class holds the static definitions of the default supported validation types.
Since:
5.0
Author:
O. Kerpershoek
See Also:
  • Field Details

    • BANK_ACCOUNT

      public static final ValidatorType BANK_ACCOUNT
      Static definition of the bank account validation type
    • IBAN

      public static final ValidatorType IBAN
      Static definition of the Iban (International Bank Account Number) validation type
      Since:
      9.0
    • DATE

      public static final ValidatorType DATE
      Static definition of the date validation type
    • NUMBER

      public static final ValidatorType NUMBER
      Static definition of the number validation type
    • REGEXP

      public static final ValidatorType REGEXP
      Static definition of the regular expression validation type
    • REQUIRED

      public static final ValidatorType REQUIRED
      This member defines the Required (not empty) validator type.
    • SSN

      public static final ValidatorType SSN
      Static definition of the social security number validation type
    • STRING

      public static final ValidatorType STRING
      Static definition of the string validation type
    • TYPES

      public static final ValidatorType[] TYPES
      Static member holding all the defined validation types.
  • Constructor Details

    • ValidatorType

      protected ValidatorType(String name, String[] optionalParameters)
      Constructs a validation type with the specified name.
      Parameters:
      name - The name of the validation type.
      optionalParameters - optional parameters
  • Method Details

    • valueOf

      public static ValidatorType valueOf(String name)
      This method will return the validation type for the specified name. When no validation type can be found for the specified name, a null value will be returned.
      Parameters:
      name - The name of the validation type that is requested.
      Returns:
      The validation type for the specified name.
    • getName

      public String getName()
      This method returns the name of the validation type.
      Returns:
      the name of the validation type.
    • isOptional

      public boolean isOptional(String name)
      This method returns a boolean indicating if the parameter is considered optional for this type. By default all parameters are considered required, unless the type specifies otherwise.
      Parameters:
      name - The name of the parameter that should be checked.
      Returns:
      boolean indicating if the parameter is considered optional for this type.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object