|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bankframe.fe.statemachine.ext.validation.StandardValidations
The BFA Standard Validations
Field Summary | |
static boolean |
EXACT_LENGTH
|
static boolean |
EXTACT_LENGTH
|
static boolean |
MANADATORY
|
static boolean |
MANDATORY
|
static int |
NO_LENGTH
If no maximum length is required use this constant to indicate the fact. |
static boolean |
NOT_EXACT_LENGTH
|
static boolean |
NOT_EXTACT_LENGTH
|
static boolean |
NOT_MANADATORY
|
static boolean |
NOT_MANDATORY
|
Constructor Summary | |
StandardValidations()
|
Method Summary | |
static void |
validateAttribute(boolean mandatory,
boolean exactLength,
int minimumLength,
int maximumLength,
Validate validate,
java.lang.Object value,
java.lang.String valuesName)
This method is used to validate an attribute. |
static void |
validateAttribute(boolean mandatory,
boolean exactLength,
int maximumLength,
Validate validate,
java.lang.Object value,
java.lang.String valuesName)
This method is used to validate an attribute. |
static void |
validateForLettersDigitsOrWhitespaceOnly(java.lang.String value,
java.lang.String valuesName)
This method validates values letters, digits and whitespace only. |
static void |
validateForMandatory(java.lang.Object value,
java.lang.String valuesName)
This method validates values for mandatory. |
static void |
validateForMandatoryAndForValue(boolean isMandatory,
java.lang.String key,
java.lang.Object value,
java.lang.String valuesName)
This method validates values for mandatory and validates values against the Constants class. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NO_LENGTH
public static final boolean MANDATORY
public static final boolean NOT_MANDATORY
public static final boolean EXACT_LENGTH
public static final boolean NOT_EXACT_LENGTH
public static final boolean MANADATORY
public static final boolean NOT_MANADATORY
public static final boolean EXTACT_LENGTH
public static final boolean NOT_EXTACT_LENGTH
Constructor Detail |
public StandardValidations()
Method Detail |
public static void validateAttribute(boolean mandatory, boolean exactLength, int minimumLength, int maximumLength, Validate validate, java.lang.Object value, java.lang.String valuesName) throws ValidationException
mandatory
- booleanexactLength
- booleanminimumLength
- int if the attribute has no minimum length use -1 (StandardValidations.NO_LENGTH) to indicate.maximumLength
- int if the attribute has no maximum length use -1 (StandardValidations.NO_LENGTH) to indicate.validate
- Validate if null then the value will not be validated for certain values.value
- Object to be validatedvaluesName
- String attribute's name
ValidationException
- thrown if validation fails.public static void validateAttribute(boolean mandatory, boolean exactLength, int maximumLength, Validate validate, java.lang.Object value, java.lang.String valuesName) throws ValidationException
mandatory
- booleanexactLength
- booleanmaximumLength
- int if the attribute has no maximum length use -1 (StandardValidations.NO_LENGTH) to indicate.validate
- Validate if null then the value will not be validated for certain values.value
- Object to be validatedvaluesName
- String attribute's name
ValidationException
- thrown if validation fails.public static void validateForLettersDigitsOrWhitespaceOnly(java.lang.String value, java.lang.String valuesName) throws ValidationException
value
- String if null then this test is ignored.valuesName
- String
ValidationException
public static void validateForMandatory(java.lang.Object value, java.lang.String valuesName) throws ValidationException
value
- ObjectvaluesName
- String
ValidationException
public static void validateForMandatoryAndForValue(boolean isMandatory, java.lang.String key, java.lang.Object value, java.lang.String valuesName) throws ValidationException
key
- String if null then this test is ignored.value
- Object if null then this test is ignored.valuesName
- String
ValidationException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |