public class RequestCheckUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ERROR_CODE_ARGUMENTS_INVALID
The constant ERROR_CODE_ARGUMENTS_INVALID.
|
static String |
ERROR_CODE_ARGUMENTS_MISS
The constant ERROR_CODE_ARGUMENTS_MISS.
|
Constructor and Description |
---|
RequestCheckUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
checkMaxLength(FileItem fileItem,
int maxLength,
String fieldName)
Check max length.
|
static void |
checkMaxLength(String value,
int maxLength,
String fieldName)
Check max length.
|
static void |
checkMaxListSize(String value,
int maxSize,
String fieldName)
Check max list size.
|
static void |
checkMaxValue(Long value,
long maxValue,
String fieldName)
Check max value.
|
static void |
checkMinValue(Long value,
long minValue,
String fieldName)
Check min value.
|
static void |
checkNotEmpty(Object value,
String fieldName)
Check not empty.
|
public static final String ERROR_CODE_ARGUMENTS_MISS
public static final String ERROR_CODE_ARGUMENTS_INVALID
public static void checkNotEmpty(Object value, String fieldName) throws AlipayApiException
value
- the valuefieldName
- the field nameAlipayApiException
- the alipay api exceptionpublic static void checkMaxLength(String value, int maxLength, String fieldName) throws AlipayApiException
value
- the valuemaxLength
- the max lengthfieldName
- the field nameAlipayApiException
- the alipay api exceptionpublic static void checkMaxLength(FileItem fileItem, int maxLength, String fieldName) throws AlipayApiException
fileItem
- the file itemmaxLength
- the max lengthfieldName
- the field nameAlipayApiException
- the alipay api exceptionpublic static void checkMaxListSize(String value, int maxSize, String fieldName) throws AlipayApiException
value
- the valuemaxSize
- the max sizefieldName
- the field nameAlipayApiException
- the alipay api exceptionpublic static void checkMaxValue(Long value, long maxValue, String fieldName) throws AlipayApiException
value
- the valuemaxValue
- the max valuefieldName
- the field nameAlipayApiException
- the alipay api exceptionpublic static void checkMinValue(Long value, long minValue, String fieldName) throws AlipayApiException
value
- the valueminValue
- the min valuefieldName
- the field nameAlipayApiException
- the alipay api exceptionCopyright © 2018. All rights reserved.