Class ValidatorType
java.lang.Object
com.aquima.interactions.framework.validator.ValidatorType
- All Implemented Interfaces:
Serializable
This class holds the static definitions of the default supported validation types.
- Since:
- 5.0
- Author:
- O. Kerpershoek
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ValidatorType
Static definition of the bank account validation typestatic final ValidatorType
Static definition of the date validation typestatic final ValidatorType
Static definition of the Iban (International Bank Account Number) validation typestatic final ValidatorType
Static definition of the number validation typestatic final ValidatorType
Static definition of the regular expression validation typestatic final ValidatorType
This member defines the Required (not empty) validator type.static final ValidatorType
Static definition of the social security number validation typestatic final ValidatorType
Static definition of the string validation typestatic final ValidatorType[]
Static member holding all the defined validation types. -
Constructor Summary
ModifierConstructorDescriptionprotected
ValidatorType
(String name, String[] optionalParameters) Constructs a validation type with the specified name. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getName()
This method returns the name of the validation type.int
hashCode()
boolean
isOptional
(String name) This method returns a boolean indicating if the parameter is considered optional for this type.toString()
static ValidatorType
This method will return the validation type for the specified name.
-
Field Details
-
BANK_ACCOUNT
Static definition of the bank account validation type -
IBAN
Static definition of the Iban (International Bank Account Number) validation type- Since:
- 9.0
-
DATE
Static definition of the date validation type -
NUMBER
Static definition of the number validation type -
REGEXP
Static definition of the regular expression validation type -
REQUIRED
This member defines the Required (not empty) validator type. -
SSN
Static definition of the social security number validation type -
STRING
Static definition of the string validation type -
TYPES
Static member holding all the defined validation types.
-
-
Constructor Details
-
ValidatorType
Constructs a validation type with the specified name.- Parameters:
name
- The name of the validation type.optionalParameters
- optional parameters
-
-
Method Details
-
valueOf
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
This method returns the name of the validation type.- Returns:
- the name of the validation type.
-
isOptional
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() -
equals
-
toString
-