|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gsm.oneapi.server.ValidationRule
public class ValidationRule
Internally used to assist with OneAPI server request parameter validation.
OneAPIServlet
Field Summary | |
---|---|
static int |
VALIDATION_TYPE_MANDATORY
Require a parameter value to be supplied |
static int |
VALIDATION_TYPE_MANDATORY_DOUBLE_GE_ZERO
The parameter must be supplied and formatted as a number (double format) greater than or equal to zero |
static int |
VALIDATION_TYPE_MANDATORY_DOUBLE_GT_ZERO
The parameter must supplied and formatted as a number (double format) greater than zero |
static int |
VALIDATION_TYPE_MANDATORY_INT_GE_ZERO
The parameter must supplied and formatted as a number (integer format) greater than or equal to zero |
static int |
VALIDATION_TYPE_MANDATORY_INT_GT_ONE
The parameter must supplied and formatted as a number (integer format) greater than 1 |
static int |
VALIDATION_TYPE_MANDATORY_JSON
The parameter must supplied and specify 'JSON' |
static int |
VALIDATION_TYPE_MANDATORY_PAYMENT_CHANNEL
The parameter must supplied and match one of the valid channel types ('Wap', 'Web', 'SMS') |
static int |
VALIDATION_TYPE_MANDATORY_TEL
The parameter must be supplied and formatted as a telephone number |
static int |
VALIDATION_TYPE_MANDATORY_URL
The parameter must be supplied and formatted as a URL |
static int |
VALIDATION_TYPE_OPTIONAL
Effectively means no validation is required |
static int |
VALIDATION_TYPE_OPTIONAL_DOUBLE_GE_ZERO
The parameter may be omitted but if supplied must have a (double) value greater than or equal to zero |
static int |
VALIDATION_TYPE_OPTIONAL_DOUBLE_GT_ZERO
The parameter may be omitted but if supplied must have a (double) value greater than zero |
static int |
VALIDATION_TYPE_OPTIONAL_INT_GE_ZERO
The parameter may be omitted but if supplied must have an (integer) value greater than or equal to zero |
static int |
VALIDATION_TYPE_OPTIONAL_INT_GT_ONE
The parameter may be omitted but if supplied must have an (integer) value greater than 1 |
static int |
VALIDATION_TYPE_OPTIONAL_JSON
The parameter may be omitted but if supplied must match the string 'JSON' |
static int |
VALIDATION_TYPE_OPTIONAL_PAYMENT_CHANNEL
The parameter may be omitted but if supplied must match one of the valid channel types ('Wap', 'Web', 'SMS') |
static int |
VALIDATION_TYPE_OPTIONAL_TEL
The parameter may be omitted but if supplied must be in a correct telephone number format |
static int |
VALIDATION_TYPE_OPTIONAL_URL
The parameter may be omitted but if supplied must be in a correct URL format |
Constructor Summary | |
---|---|
ValidationRule(int validationType,
java.lang.String parameterName,
java.lang.Object parameterValue)
Normal constructor where specific value matching is not required |
|
ValidationRule(int validationType,
java.lang.String parameterName,
java.lang.Object parameterValue,
java.lang.String specificValue)
Extended constructor where specific value matching is required |
Method Summary | |
---|---|
static boolean |
isMandatory(int type)
Identifies which validation types are mandatory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int VALIDATION_TYPE_OPTIONAL
public static final int VALIDATION_TYPE_MANDATORY
public static final int VALIDATION_TYPE_MANDATORY_DOUBLE_GT_ZERO
public static final int VALIDATION_TYPE_MANDATORY_DOUBLE_GE_ZERO
public static final int VALIDATION_TYPE_MANDATORY_TEL
public static final int VALIDATION_TYPE_MANDATORY_URL
public static final int VALIDATION_TYPE_MANDATORY_INT_GE_ZERO
public static final int VALIDATION_TYPE_MANDATORY_INT_GT_ONE
public static final int VALIDATION_TYPE_MANDATORY_JSON
public static final int VALIDATION_TYPE_MANDATORY_PAYMENT_CHANNEL
public static final int VALIDATION_TYPE_OPTIONAL_DOUBLE_GT_ZERO
public static final int VALIDATION_TYPE_OPTIONAL_DOUBLE_GE_ZERO
public static final int VALIDATION_TYPE_OPTIONAL_TEL
public static final int VALIDATION_TYPE_OPTIONAL_URL
public static final int VALIDATION_TYPE_OPTIONAL_INT_GE_ZERO
public static final int VALIDATION_TYPE_OPTIONAL_INT_GT_ONE
public static final int VALIDATION_TYPE_OPTIONAL_JSON
public static final int VALIDATION_TYPE_OPTIONAL_PAYMENT_CHANNEL
Constructor Detail |
---|
public ValidationRule(int validationType, java.lang.String parameterName, java.lang.Object parameterValue)
validationType
- parameterName
- parameterValue
- public ValidationRule(int validationType, java.lang.String parameterName, java.lang.Object parameterValue, java.lang.String specificValue)
validationType
- parameterName
- parameterValue
- specificValue
- Method Detail |
---|
public static boolean isMandatory(int type)
type
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |