2017-12-19 14:55:52 +08:00
|
|
|
|
package com.nis.restful;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
* 服务业务编码
|
|
|
|
|
|
*/
|
|
|
|
|
|
public enum RestBusinessCode {
|
|
|
|
|
|
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 服务内部异常
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
service_runtime_error (5000000, "服务内部异常!"),
|
2017-12-19 14:55:52 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 未知错误
|
|
|
|
|
|
*/
|
|
|
|
|
|
unknow_error (998, "未知错误!"),
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 需要权限
|
|
|
|
|
|
*/
|
|
|
|
|
|
need_permission (1000 ,"该操作需要权限"),
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 资源不存在
|
|
|
|
|
|
*/
|
|
|
|
|
|
uri_not_found (1001,"uri地址不存在,检查uri拼写"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 参数不全
|
|
|
|
|
|
*/
|
|
|
|
|
|
missing_args (1002,"缺少必要的参数信息"),
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 操作行为错误,1-插入2-更新 3-删除4-查询 ,插入时选择了删除这种错误返回该异常代码
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
op_action_error (1003,"不正确的操作行为"),
|
|
|
|
|
|
|
|
|
|
|
|
config_integrity_error (1004,"配置完整性错误或数据格式错误"),
|
|
|
|
|
|
|
|
|
|
|
|
param_formate_error (1005,"服务器请求参数格式错误"),
|
|
|
|
|
|
|
|
|
|
|
|
insert_data_repeat (1006,"新增数据重复"),
|
|
|
|
|
|
|
|
|
|
|
|
log_range_undefined (1007,"服务器请求日志范围不明确"),
|
|
|
|
|
|
|
|
|
|
|
|
not_unique (1008,"数据违反唯一性"),
|
|
|
|
|
|
|
|
|
|
|
|
wrong_range (1009,"数据不在有效范围"),
|
|
|
|
|
|
|
|
|
|
|
|
query_success(2000, "数据获取操作成功"),
|
|
|
|
|
|
|
|
|
|
|
|
add_success(2001, "数据添加操作成功"),
|
|
|
|
|
|
|
|
|
|
|
|
update_success(2002, "数据更新操作成功"),
|
|
|
|
|
|
|
2018-07-04 17:03:04 +08:00
|
|
|
|
delete_success(2003, "数据删除操作成功"),
|
|
|
|
|
|
/**
|
2018-07-10 17:24:42 +08:00
|
|
|
|
* 完整性异常 4001000 编译:4001000 分组:4001100 数值类:4001200 IP类:4001300 字符串类:4001400 摘要类:4001500 回调类:4001600
|
|
|
|
|
|
* 业务格式异常 4002000 编译:4002000 分组:4002100 数值类:4002200 IP类:4002300 字符串类:4002400 摘要类:4002500 回调类:4002600
|
2018-07-04 17:03:04 +08:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
CompileIsNull(4001001, "Maat配置不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的的compileId不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
CompileIdIsNull(4001002, "Maat配置的compileId字段不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的的service不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
ServiceIsNull(4001003, "配置的service属性不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的action不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
ActionIsNull(4001004, "Maat配置的action不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的的compileId不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
DoBlacklistIsNull(4001005, "Maat配置的doBlacklist不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的的compileId不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
DoBlacklistIsWrongRange(4001006, "Maat配置的doBlacklist的值不在有效范围"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的的doLog不能为空
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
DoLogIsNull(4001007, "Maat编译配置的doLog不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的的doLog不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
DoLogIsWrongRange(4001008, "Maat配置的doLog的值不在有效范围"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的effectiveRange不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
EffectiveRangeIsNull(4001009, "Maat配置的effectiveRange不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的startTime不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
StartTimeIsNull(4001010, "Maat配置的startTime不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的的endTime不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
EndTimeIsNull(4001011, "Maat配置的endTime不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 配置的isValid不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
IsValidIsNull(4001013, "配置isValid属性不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的groupNum不能为空
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
GroupNumIsNull(4001016, "Maat配置groupNum属性不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的的fatherCfgId不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
FatherCfgIdIsNull(4001017, "Maat配置的fatherCfgId不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的缺少配置分组信息
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
CompileGroupIsNull(4001018, "Maat配置缺少groupRelationList"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的opTime不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
OpTimeIsNull(4001019, "Maat配置的opTime不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
//分组配置数据完整性业务码10100~
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的的配置分组的CompileId不能为空
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
GroupsCompileIdIsNull(4001100, "MAAT配置分组关系中compileId不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的的配置分组的groupId不能为空
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
GroupIdIsNull(4001101, "MAAT配置分组关系中groupId不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的的配置分组的isValid不能为空
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
GroupsIsValidIsNull(4001102, "MAAT配置分组关系中isValid不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
|
// * 编译配置的的配置分组的opTime不能为空
|
|
|
|
|
|
// */
|
2018-07-10 17:24:42 +08:00
|
|
|
|
// GroupsOpTimeIsNull(400137, "编译配置的的配置分组的opTime不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 域配置的groupid在配置分组关系中不存在
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
RegionsGroupIdIsNotFound(4001103, "域配置的groupid在配置分组关系中不存在"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
*域配置的regionId不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
RegionIdIsNull(4001104, "域配置的regionId不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
*域配置的groupId不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
RegionsGroupIdIsNull(4001105, "域配置的groupId不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
//数值类域数据完整性业务码10200~
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置中缺少数值类域配置信息
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
NumRegionIsNull(4001200, "Maat配置中不能缺少数值类域配置信息"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
*数值域配置的lowBoundary不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
LowBoundaryIsNull(4001201, "数值域配置的lowBoundary不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
*数值域配置的upBoundary不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
UpBoundaryIsNull(4001202, "数值域配置的upBoundary不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
//数值类域数据完整性业务码10300~
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置中缺少IP类域配置信息
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
IpRegionIsNull(4001300, "Maat配置中不能缺少IP类域配置信息"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* IP类域配置的addrType不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
AddrTypeIsNull(4001301,"IP类域配置的addrType不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* IP类域配置的srcIp不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
SrcIpIsNull(4001302,"IP类域配置的srcIp不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* IP类域配置的maskSrcIp不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
MaskSrcIpIsNull(4001303,"IP类域配置的maskSrcIp不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* IP类域配置的srcPort不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
SrcPortIsNull(4001304,"IP类域配置的srcPort不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* IP类域配置的maskSrcPort不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
MaskSrcPortIsNull(4001305,"IP类域配置的maskSrcPort不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* IP类域配置的dstIp不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
DstIpIsNull(4001306,"IP类域配置的dstIp不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* IP类域配置的maskDstIp不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
MaskDstIpIsNull(4001307,"IP类域配置的maskDstIp不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* IP类域配置的dstPort不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
DstPortIsNull(4001308,"IP类域配置的dstPort不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* IP类域配置的maskDstPort不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
MaskDstPortIsNull(4001309,"IP类域配置的maskDstPort不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* IP类域配置的protocol不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
ProtocolIsNull(4001310,"IP类域配置的protocol不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* IP类域配置的direction不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
DirectionIsNull(4001311,"IP类域配置的direction不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
//数值类域数据完整性业务码10400~
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置中缺少字符串类域配置信息
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
StrRegionIsNull(4001400, "Maat配置中不能缺少字符串类域配置信息"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 字符串类域配置的keywords不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
KeywordsIsNull(4001401,"字符串类域配置的keywords不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 字符串类域配置的district不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
DistrictIsNull(4001402,"字符串类域配置的district不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 字符串类域配置的exprType不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
ExprTypeIsNull(4001403,"字符串类域配置的keywords不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 字符串类域配置的matchMethod不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
MatchMethodIsNull(4001404,"字符串类域配置的matchMethod不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 字符串类域配置的isHexbin不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
IsHexbinIsNull(4001405,"字符串类域配置的isHexbin不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
//摘要类域数据完整性业务码10500~
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 摘要类域配置的rawLen不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
RawLenIsNull(4001500,"摘要类域配置的rawLen不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 摘要类域配置的digest的值只能是1到10
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
DigestIsNull(4001501,"摘要类域配置的digest不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 摘要类域配置的cfdsLevel不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
CfdsLevelIsNull(4001502,"摘要类域配置的cfdsLevel不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 回调类配置的cfgId字段不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
CfgIdIsNull(4001600,"配置的cfgId字段不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 回调类配置的属性不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
FieldIsNull(4001601,"配置属性不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 回调类上传文件不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
FileIsNull(4001602,"上传文件不能为空"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 回调类checksum与文件MD5值不一致
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
CheckSumIsWrong(4001603,"checksum与文件MD5值不一致"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
//配置业务格式验证 20000
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的groupNum属性值等于0
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
GroupNumIsZero(4002001, "Maat配置groupNum不能等于0"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的groupNum属性值大于8
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
GroupNumGtEight(4002002, "Maat配置的groupNum不能大于8"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的groupNum属性值与groupRelationList长度不相等
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
GroupNumNEQGroupList(4002003, "Maat配置的groupNum数量与groupRelationList大小需一致"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的的fatherCfgId不能为空
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
FatherCfgIdIsWrongRange(4002004, "Maat配置的fatherCfgId值不在有效范围"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
2018-07-06 18:07:16 +08:00
|
|
|
|
* 配置的service与action不匹配
|
2018-07-04 17:03:04 +08:00
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
ServiceUnmatchAction(4002005, "配置的service与action不匹配"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 编译配置的的startTime不能晚于endTime
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
EndTimeGTStartTime(4002006, "Maat配置的startTime不能晚于endTime"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 配置的isValid在添加时不能为无效
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
IsValidIsT(4002007, "配置增加操作,isValid值不能无效"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 配置的isValid在配置取消时不能为有效
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
IsValidIsF(4002008, "配置取消操作,isValid值不能为有效"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
// /**
|
|
|
|
|
|
// * 编译配置的groupRelationList的配置在添加时不能为无效
|
|
|
|
|
|
// */
|
2018-07-10 17:24:42 +08:00
|
|
|
|
// GroupRegionIsValid(400121, "编译配置的分组配置在添加时不能为无效"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
//
|
|
|
|
|
|
// /**
|
|
|
|
|
|
// * 编译配置的groupRelationList的配置在添加时不能为有效
|
|
|
|
|
|
// */
|
2018-07-10 17:24:42 +08:00
|
|
|
|
// GroupRegionIsNotValid(400121, "编译配置的分组配置在修改时不能为有效"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 配置分组与编译配置的compileId不一致
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
CompileIdIsNeq(4002009,"Maat配置分组与编译配置的compileId不一致"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
2018-07-13 12:06:34 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 配置的service与action关系不存在
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
Service2ActionIsNull(4002010, "当前service与action关系不存在"),
|
2018-07-17 17:59:07 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 状态更新操作,所有配置的isValid值必须相同
|
|
|
|
|
|
*/
|
|
|
|
|
|
IsValidNonUniq(4002011, "状态更新操作,所有配置的isValid值必须相同"),
|
2018-07-13 12:06:34 +08:00
|
|
|
|
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 配置分组中同一groupId出现多次
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
GroupIdIsRepeat(4002100,"Maat配置分组groupId不能重复"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* tableName与编译配置业务类型不一致
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
TableNameUnmatchService(4002101, "当前编译配置service与域配置tableName的关系不存在"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
*数值域配置的lowBoundary值不在有效范围内
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
LowBoundaryIsWrongRange(4002200, "数值域-配置lowBoundary值不在有效范围内"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
*数值域配置的upBoundary值不在有效范围内
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
UpBoundaryIsWrongRange(4002201, "数值域-配置upBoundary值不在有效范围内"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
*数值域配置的lowBoundary大于upBoundary值
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
LowBoundaryGTUpBoundary(4002202, "数值域-配置lowBoundary必须小于upBoundary"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* IP类域配置的direction的值不在有效范围
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
DirectionIsWrongRange(4002300,"IP类域-direction的值只能是0或1"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* IP类域配置的IP或IpMask与addrType不一致
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
IPUnMatchAddrType(4002301,"IP类域-IP地址或掩码与addrType不一致"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* IP类域配置的port格式不正确
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
PortIsNotVal(4002302,"IP类域-端口或端口掩码格式不正确"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* IP类域配置的srcIp和dstIp不能相同
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
SrcIpEQDstIp(4002303,"IP类域-srcIp和dstIp不能相同"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 字符串域配置的exprType的值只能是0(无表达式)或者1(与表达式)
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
ExprTypeIsWrongRange(4002400,"字符域-exprType的值只能是0(无表达式)或1(与表达式)"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 字符串域配置的matchMethod的值只能是0(无表达式)或者1(与表达式)
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
MatchMethodIsWrongRange(4002401,"字符域-matchMethod的值只能是0(子串匹配),1(右匹配),2(左匹配),3(完全匹配)"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 字符串域配置的isHexbin的值只能是0(大小写不敏感,且非HEX)或者1(HEX)或者2(大小写敏感,且非HEX)
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
IsHexbinIsWrongRange(4002402,"字符域-isHexbin的值只能是0(大小写不敏感,且非HEX)或者1(HEX)或者2(大小写敏感,且非HEX)"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 摘要类域配置的cfdsLevel的值只能是1到10
|
|
|
|
|
|
*/
|
2018-07-19 16:09:22 +08:00
|
|
|
|
CfdsLevelIsWrongRange(4002500,"摘要域-cfdsLevel的值只能是1到10"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//回调类
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 回调类service配置不正确
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
ServiceIsWrong(4002600,"service的值配置不正确"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 回调类ipType属性只能为4(IPV4)、6(IPV6)
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
IpTypeIsWrong(4002601,"ipType属性只能为4(IPV4)、6(IPV6)"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 回调类的XX属性不是数值类型
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
MastNumberic(4002602,"属性值不是数值类型"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 回调类的XX属性不是数值类型
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
MastDate(4002602,"属性值不是日期类型"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 回调类的XX属性不是数值类型
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
IpIsUnMatchType(4002603,"配置IP或Mask与addrType不一致"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 回调类的XX属性取值不在Range范围内
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
ValueInWrongRange(4002604,"属性取值不在Range范围内"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 回调类的XX属性取值符合正则表达式验证
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
ValueInWrongRegexp(4002605,"属性值与正则表达式不匹配"),
|
2018-07-04 17:03:04 +08:00
|
|
|
|
|
2018-08-03 18:08:46 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* isValid属性格式不正确
|
|
|
|
|
|
*/
|
2018-07-10 17:24:42 +08:00
|
|
|
|
IsValidInWrongRange(4002606,"isValid属性格式不正确"),
|
2017-12-19 14:55:52 +08:00
|
|
|
|
|
2018-08-03 18:08:46 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 回调类配置请求参数格式不正确
|
|
|
|
|
|
*/
|
|
|
|
|
|
CBParamFormateError(4002607,"回调类配置请求参数格式不正确"),
|
|
|
|
|
|
|
|
|
|
|
|
//服务内部异常业务码
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 回调类配置Service不存在或未配置tableName
|
|
|
|
|
|
*/
|
|
|
|
|
|
CBServiceOrTableNameNotFound(5001001,"回调类配置Service不存在或未配置tableName"),
|
|
|
|
|
|
/**
|
|
|
|
|
|
* service与写入数据库序号映射关系不存在
|
|
|
|
|
|
*/
|
|
|
|
|
|
ServiceNoFoundDBIndex(5001002,"service与写入数据库序号映射关系不存在"),
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 向服务器上传文件失败
|
|
|
|
|
|
*/
|
|
|
|
|
|
FileUploadFailure(5001003,"向服务器上传文件失败"),
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* FastDfs文件服务器出现异常
|
|
|
|
|
|
*/
|
|
|
|
|
|
FastDfsServerException(5001004,"FastDfs文件服务器出现异常"),
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 摘要获取失败
|
|
|
|
|
|
*/
|
|
|
|
|
|
GetFileDigestFailure(5001005,"摘要获取失败"),
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Redis数据库编号不在有效范围内
|
|
|
|
|
|
*/
|
|
|
|
|
|
DbIndexNotInRange(5002001,"Redis数据库编号不在有效范围内"),
|
2017-12-19 14:55:52 +08:00
|
|
|
|
|
2018-08-03 18:08:46 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 配置信息不能为空
|
|
|
|
|
|
*/
|
|
|
|
|
|
ConfigSourceIsNull(5002002,"配置信息不能为空"),
|
2017-12-19 14:55:52 +08:00
|
|
|
|
|
2018-08-03 18:08:46 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 无法连接Redis数据库
|
|
|
|
|
|
*/
|
|
|
|
|
|
CannotConnectionRedis(5002003,"无法连接Redis数据库"),
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 向Redis数据库保存配置时发生错误
|
|
|
|
|
|
*/
|
|
|
|
|
|
SaveDataInError(5002004,"向Redis数据库保存配置时发生错误"),
|
2017-12-19 14:55:52 +08:00
|
|
|
|
|
2018-08-03 18:08:46 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* key在Redis中不存在
|
|
|
|
|
|
*/
|
|
|
|
|
|
KeyNotExistsInRedis(5002005,"key在Redis中不存在"),
|
2017-12-19 14:55:52 +08:00
|
|
|
|
|
2018-08-03 18:08:46 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 删除Redis数据库中配置时发生错误
|
|
|
|
|
|
*/
|
|
|
|
|
|
DeleteDataInError(5002006,"删除Redis数据库中配置时发生错误"),
|
2017-12-19 14:55:52 +08:00
|
|
|
|
|
2018-08-03 18:08:46 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 向Redis数据库中设置值失败
|
|
|
|
|
|
*/
|
|
|
|
|
|
ZsetFailed(5002007,"向Redis数据库中设置值失败"),
|
2017-12-19 14:55:52 +08:00
|
|
|
|
|
2018-08-03 18:08:46 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* redisTemplate为空
|
|
|
|
|
|
*/
|
|
|
|
|
|
RedisTemplateIsNull(5002008,"redisTemplate为空"),
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 判断key是否存在失败
|
|
|
|
|
|
*/
|
|
|
|
|
|
ExistsKeyFailed(5002008,"判断key是否存在失败"),
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 无法从Map中获取配置的属性值
|
|
|
|
|
|
*/
|
|
|
|
|
|
GetMaatVersionFailure(5003001,"无法从Map中获取配置的属性值"),
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 在配置文件中未找到service对应的表名
|
|
|
|
|
|
*/
|
|
|
|
|
|
NotFoundTableName(5003002,"未找到service对应的表名"),
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 在配置文件中未找到service对应的Redis入库规则
|
|
|
|
|
|
*/
|
|
|
|
|
|
NotFoundRedisRule(5003003,"未找到service对应的Redis入库规则"),
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Redis数据库中MAAT配置的对应关系不存在
|
|
|
|
|
|
*/
|
|
|
|
|
|
RelationNotExistsInRedis(5003004,"Redis数据库中MAAT配置的对应关系不存在"),
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Map中缺少编译配置信息
|
|
|
|
|
|
*/
|
|
|
|
|
|
NotFoundCompileInfo(5004001,"Map中缺少编译配置信息"),
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Map中缺少分组配置信息
|
|
|
|
|
|
*/
|
|
|
|
|
|
NotFoundGroupInfo(5004002,"Map中缺少分组配置信息"),
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 无法从Map中获取配置的属性值
|
|
|
|
|
|
*/
|
|
|
|
|
|
NotFoundValueByKey(5004003,"无法从Map中获取配置的属性值"),
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 状态更新操作中service与配置ID的应对关系不能为空
|
|
|
|
|
|
*/
|
|
|
|
|
|
ServiceAndCompileMapIsNull(5004004,"状态更新操作中service与配置Id的应对关系不能为空"),
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 状态更新操作中与service对应的配置Id列表不能为空
|
|
|
|
|
|
*/
|
|
|
|
|
|
CompileIdListIsNull(5004005,"状态更新操作中与service对应的配置Id列表不能为空"),
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 状态更新操作中更新内容Map不能为空
|
|
|
|
|
|
*/
|
|
|
|
|
|
ConfigInfoMapIsNull(5004005,"状态更新操作中更新内容Map不能为空"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;
|
2017-12-19 14:55:52 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final int value; //错误码
|
|
|
|
|
|
private final String errorReason; //错误原因
|
|
|
|
|
|
|
|
|
|
|
|
public int getValue() {
|
|
|
|
|
|
return value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public String getErrorReason() {
|
|
|
|
|
|
return errorReason;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private RestBusinessCode(int value, String errorReason) {
|
|
|
|
|
|
this.value = value;
|
|
|
|
|
|
this.errorReason = errorReason;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static RestBusinessCode valueOf(int errorCode) {
|
|
|
|
|
|
for (RestBusinessCode status : values()) {
|
|
|
|
|
|
if (status.value == errorCode) {
|
|
|
|
|
|
return status;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
throw new IllegalArgumentException("No matching constant for [" + errorCode + "]");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|