public class RequestCheckUtils extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
ERROR_CODE_ARGUMENTS_INVALID |
static String |
ERROR_CODE_ARGUMENTS_MISSING |
| 构造器和说明 |
|---|
RequestCheckUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
checkMaxLength(FileItem fileItem,
int maxLength,
String fieldName) |
static void |
checkMaxLength(String value,
int maxLength,
String fieldName) |
static void |
checkMaxListSize(List<String> list,
int maxSize,
String fieldName) |
static void |
checkMaxListSize(String value,
int maxSize,
String fieldName) |
static void |
checkMaxValue(Long value,
long maxValue,
String fieldName) |
static void |
checkMinValue(Long value,
long minValue,
String fieldName) |
static void |
checkNotEmpty(Object value,
String fieldName) |
static void |
checkObjectMaxListSize(String value,
int maxSize,
String fieldName) |
public static void checkNotEmpty(Object value, String fieldName) throws ApiRuleException
ApiRuleExceptionpublic static void checkMaxLength(String value, int maxLength, String fieldName) throws ApiRuleException
ApiRuleExceptionpublic static void checkMaxLength(FileItem fileItem, int maxLength, String fieldName) throws ApiRuleException
ApiRuleExceptionpublic static void checkMaxListSize(String value, int maxSize, String fieldName) throws ApiRuleException
ApiRuleExceptionpublic static void checkMaxListSize(List<String> list, int maxSize, String fieldName) throws ApiRuleException
ApiRuleExceptionpublic static void checkObjectMaxListSize(String value, int maxSize, String fieldName) throws ApiRuleException
ApiRuleExceptionpublic static void checkMaxValue(Long value, long maxValue, String fieldName) throws ApiRuleException
ApiRuleExceptionpublic static void checkMinValue(Long value, long minValue, String fieldName) throws ApiRuleException
ApiRuleExceptionCopyright © 2020. All rights reserved.