Class SimpleExceptionCodeDescriptor
- java.lang.Object
-
- net.cofcool.chaos.server.core.support.SimpleExceptionCodeDescriptor
-
- All Implemented Interfaces:
ExceptionCodeDescriptor,org.springframework.beans.factory.InitializingBean
public class SimpleExceptionCodeDescriptor extends Object implements ExceptionCodeDescriptor, org.springframework.beans.factory.InitializingBean
ExceptionCodeDescriptor 的默认实现, 处理默认信息, 包括ExceptionCodeDescriptor.SERVER_ERR等, 应用可使用ResourceExceptionCodeDescriptor, 该类可读取"Spring"配置的"message"信息- Author:
- CofCool
- See Also:
ResourceExceptionCodeDescriptor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.cofcool.chaos.server.common.core.ExceptionCodeDescriptor
ExceptionCodeDescriptor.CodeMessage
-
-
Field Summary
-
Fields inherited from interface net.cofcool.chaos.server.common.core.ExceptionCodeDescriptor
AUTH_ERROR, CAPTCHA_ERROR, DATA_ERROR, DATA_EXISTS, DENIAL_AUTH, DENIAL_DEVICE, DENIAL_OPERATING, LOWEST_LEVEL_API, NO_ACCESS, NO_LOGIN, OPERATION_ERR, PARAM_ERROR, PARAM_NULL, SERVER_ERR, SERVER_OK, USER_NOT_EXITS, USER_PASSWORD_ERROR, USERNAME_ERROR
-
-
Constructor Summary
Constructors Constructor Description SimpleExceptionCodeDescriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()Stringcode(String type)protected Map<String,ExceptionCodeDescriptor.CodeMessage>customize()添加自定义描述信息Stringdescription(String type)
-
-
-
Field Detail
-
SERVER_OK_VAL
public static final String SERVER_OK_VAL
成功- See Also:
- Constant Field Values
-
SERVER_OK_DESC_VAL
public static final String SERVER_OK_DESC_VAL
- See Also:
- Constant Field Values
-
SERVER_ERR_VAL
public static final String SERVER_ERR_VAL
内部错误- See Also:
- Constant Field Values
-
SERVER_ERR_DESC_VAL
public static final String SERVER_ERR_DESC_VAL
- See Also:
- Constant Field Values
-
NO_LOGIN_VAL
public static final String NO_LOGIN_VAL
未登录, 或登录过期- See Also:
- Constant Field Values
-
NO_LOGIN_DESC_VAL
public static final String NO_LOGIN_DESC_VAL
- See Also:
- Constant Field Values
-
NO_ACCESS_VAL
public static final String NO_ACCESS_VAL
没有权限- See Also:
- Constant Field Values
-
NO_ACCESS_DESC_VAL
public static final String NO_ACCESS_DESC_VAL
- See Also:
- Constant Field Values
-
DENIAL_AUTH_VAL
public static final String DENIAL_AUTH_VAL
禁止登录- See Also:
- Constant Field Values
-
DENIAL_AUTH_DESC_VAL
public static final String DENIAL_AUTH_DESC_VAL
- See Also:
- Constant Field Values
-
USER_PASSWORD_ERROR_VAL
public static final String USER_PASSWORD_ERROR_VAL
密码错误- See Also:
- Constant Field Values
-
USER_PASSWORD_ERROR_DESC_VAL
public static final String USER_PASSWORD_ERROR_DESC_VAL
- See Also:
- Constant Field Values
-
CAPTCHA_ERROR_VAL
public static final String CAPTCHA_ERROR_VAL
验证码错误- See Also:
- Constant Field Values
-
CAPTCHA_ERROR_DESC_VAL
public static final String CAPTCHA_ERROR_DESC_VAL
- See Also:
- Constant Field Values
-
USER_NOT_EXITS_VAL
public static final String USER_NOT_EXITS_VAL
用户不存在- See Also:
- Constant Field Values
-
USER_NOT_EXITS_DESC_VAL
public static final String USER_NOT_EXITS_DESC_VAL
- See Also:
- Constant Field Values
-
USERNAME_ERROR_VAL
public static final String USERNAME_ERROR_VAL
用户名错误- See Also:
- Constant Field Values
-
USERNAME_ERROR_DESC_VAL
public static final String USERNAME_ERROR_DESC_VAL
- See Also:
- Constant Field Values
-
DENIAL_DEVICE_VAL
public static final String DENIAL_DEVICE_VAL
拒绝设备- See Also:
- Constant Field Values
-
DENIAL_DEVICE_DESC_VAL
public static final String DENIAL_DEVICE_DESC_VAL
- See Also:
- Constant Field Values
-
LOWEST_LEVEL_API_VAL
public static final String LOWEST_LEVEL_API_VAL
API版本低- See Also:
- Constant Field Values
-
LOWEST_LEVEL_API_DESC_VAL
public static final String LOWEST_LEVEL_API_DESC_VAL
- See Also:
- Constant Field Values
-
AUTH_ERROR_VAL
public static final String AUTH_ERROR_VAL
授权错误- See Also:
- Constant Field Values
-
AUTH_ERROR_DESC_VAL
public static final String AUTH_ERROR_DESC_VAL
- See Also:
- Constant Field Values
-
PARAM_NULL_VAL
public static final String PARAM_NULL_VAL
存在不能为空的参数- See Also:
- Constant Field Values
-
PARAM_NULL_DESC_VAL
public static final String PARAM_NULL_DESC_VAL
- See Also:
- Constant Field Values
-
PARAM_ERROR_VAL
public static final String PARAM_ERROR_VAL
参数错误- See Also:
- Constant Field Values
-
PARAM_ERROR_DESC_VAL
public static final String PARAM_ERROR_DESC_VAL
- See Also:
- Constant Field Values
-
OPERATION_ERR_VAL
public static final String OPERATION_ERR_VAL
操作失败- See Also:
- Constant Field Values
-
OPERATION_ERR_DESC_VAL
public static final String OPERATION_ERR_DESC_VAL
- See Also:
- Constant Field Values
-
DENIAL_OPERATING_VAL
public static final String DENIAL_OPERATING_VAL
拒绝操作- See Also:
- Constant Field Values
-
DENIAL_OPERATING_DESC_VAL
public static final String DENIAL_OPERATING_DESC_VAL
- See Also:
- Constant Field Values
-
DATA_EXISTS_VAL
public static final String DATA_EXISTS_VAL
数据已存在- See Also:
- Constant Field Values
-
DATA_EXISTS_DESC_VAL
public static final String DATA_EXISTS_DESC_VAL
- See Also:
- Constant Field Values
-
DATA_ERROR_VAL
public static final String DATA_ERROR_VAL
数据错误- See Also:
- Constant Field Values
-
DATA_ERROR_DESC_VAL
public static final String DATA_ERROR_DESC_VAL
- See Also:
- Constant Field Values
-
DEFAULT_DESCRIPTOR
public static final ExceptionCodeDescriptor DEFAULT_DESCRIPTOR
获取默认的 ExceptionCodeDescriptor
-
-
Method Detail
-
code
public String code(String type)
- Specified by:
codein interfaceExceptionCodeDescriptor
-
description
public String description(String type)
- Specified by:
descriptionin interfaceExceptionCodeDescriptor
-
customize
protected Map<String,ExceptionCodeDescriptor.CodeMessage> customize()
添加自定义描述信息- Returns:
- 描述信息
-
-