package com.aiahk.xgwf.common.enums;
import java.util.HashMap;
import java.util.Map;
public enum ErrorEnums implements BaseEnum<String, String> {
CASE_CREATE_ERROR("ERR200", "Case create error."),
INTERNAL_SERVER_ERROR("SYS999", "Internal Server Error"),
POLICY_NO_IS_EMPTY("ERR100", "Policy No is empty"),
BATCH_ID_IS_EMPTY("ERR101", "Batch Id is empty"),
REINDEX_TYPE_IS_EMPTY("ERR102", "Reindex type is empty"),
BATCH_TYPE_IS_EMPTY("ERR103", "Batch type is empty."),
FUNCTION_CODE_IS_EMPTY("ERR104", "Function Code is empty"),
INVALID_FUNCTION_CODE("ERR105", "Invalid Function Code"),
HNW_CASE_FLAG_IS_EMPTY("ERR106", "HNW Flag is empty"),
RECEIVE_DATE_EMPTY("ERR107", "Receive Date is empty."),
DOCUMENT_NOT_FOUND("ERR108", "Document Not Found"),
INVALID_DOCUMENT_ID("ERR109", "Invalid Document/Repository ID"),
COMPANY_CASE_IS_EMPTY("ERR110", "Company Case is empty."),
FILE_NAME_EMPTY("ERR111", "FileName is empty"),
REPOSITORY_ID_MISSING("ERR112", "Document/Repository ID is missing"),
PAGE_NUM_EMPTY("ERR113", "PageNumbers is empty"),
DOCUMENT_CONTENT_IS_EMPTY("ERR114", "Document Content is empty"),
DOC_ID_IS_EMPTY("ERR115", "Doc ID is empty/not found"),
SUB_CHANNEL_IS_EMPTY("ERR116", "Sub Channel is empty."),
SOURCE_IS_INCORRECT("ERR117", "Source Value Is Incorrect"),
SOURCE_IS_EMPTY("ERR118", "Source Value Is empty"),
LAN_ID_IS_EMPTY("ERR119", "LanId Value Is empty"),
EMAIL_ID_IS_EMPTY("ERR120", "Email ID Value Is empty"),
EXIST_DUMMY_DOCUMENT("ERR123", "Dummy folder/form name is found,please check"),
SROWID_EMAPTY("ERR124", "sRowId IS EMPTY"),
INVALID_SROWID("ERR125", "Invalid sRow Id."),
CASEMANAGER_EMAPTY("ERR126", "Case Manager is empty."),
DOCUMENT_LIST_EMPTY("ERR127", "Document list is empty."),
EMAIL_SUBJECT_EMPTY("ERR128", "Email subject is empty."),
EMAIL_CONTENT_EMPTY("ERR129", "Email content is empty."),
EMAIL_RECEIVE_LIST_EMPTY("ERR130", "Email receive list is empty."),
PREMIUM_RECEIVE_DATE_EMPTY("ERR131", "Premium receive date is empty."),
NOT_HNW_CASE("ERR132", "This policy not HNW case."),
INVALID_POLICY_NO("ERR133", "Invalid policy No."),
INVALID_BATCH_TYPE("ERR134", "Invalid batch type."),
NOTIFY_BEWS_RELEASE_FAUILURE("ERR135", "Send message to kafka failure for notify BEWS to release pend date."),
NOTIFY_XGFE_UPDATE_FAUILURE("ERR136", "Send message to kafka failure for notify XGFE to update policy status"),
INVALID_ROUTEID("ERR137", "Invalid route id."),
FILE_INVALID("ERR138", "File is not exist or not Tiff file."),
NO_ACTIVE_TASK("ERR139", "No active task."),
SEND_JOB_FAILURE("ERR140", "Send Job failure."),
KAFKATRANSACTIONLOG_EMPTY("ERR141","kafkatransactionlog empty"),
CANOTFINDEMAIL("ERR142", "can not find email"),
FILE_IS_INCORRECT("ERR200", "Only Tiff file is supported!"),
FILE_SIZE_OVER_LIMITE("ERR201", "Not allow to import file size bigger than 50MB."),
EMAILLIST_IS_EMPTY("ERR203", "email list is empty!"),
INPUT_INCORRECT("ERR204", "please input correct sort"),
CASE_NOT_EXIST("ERR205", "Case don't exist"),
BRMS_RETURN_ERROR("ERR206", "brms return error"),
BRMS_RETURN_ID_ERROR("ERR207", "brms return route Id error"),
POLICY_NOT_EXIST("ERR208", "Policy not exists!"),
LOGIN_FAILED("ERR209", "Login failed,please check account/password"),
NETWORK_FAILED("ERR210", "Call sag failed,please check with support"),
ERROR_USER("ERR211", "Task Owner have changed"),
PRE_ASSIGN_PARAMS_ERROR("ERR213", ""),
ERROR_ACCTI("ERR212", "Case is already processed and moved to other activity.!"),
TASK_NOT_EXIST("ERR214", "task don't exist"),
INVALID_Close_CASE("ERR215", "Case could only be closed at Data Entry or Doc Check activity."),
CASE_INACTIVE("ERR216", "Case is completed,can't closed."),
UPDATE_TASK_FAILURE("ERR217", "Update case failure."),
TASK_LIST_EMPTY("ERR218", "Task list is empty."),
CASE_IS_CLOSED("ERR219", "Case was closed."),
CASE_TYPE_INCORRECT("ERR220", "Case type is incorrect."),
MEDICAL_FLAG_NOT_EXIST("ERR221", "Medical flag value is empty."),
INVALID_EMAIL_FORMAT("ERR222", "Can't support this format."),
MOVE_EMAIL_FAILD("ERR223", "Move email faild."),
CASE_NB_NOT_CLOSED("ERR224", "The case is not NB or active."),
CASE_FINALIZED_EXIST("ERR225", "The finalized has been existed."),
REQUEST_TYPE_PROPERTIES_EMPTY("ERR226","The request type properties is empty."),
NOT_SUPPORT_CASE_TYPE("ERR227","Can't support this case type."),
USER_HAS_NO_PERMISSION("ERR228","You’re not authorized to handle this task!"),
LOGIN_ID_IS_EMPTY("ERR229","LanId is empty!"),
CASE_CO_EXIST("ERR230", "The CO has been existed."),
TASK_LOCKED_BY_OTHERS("ERR231","Case was locked by %s and not allow user to get job!"),
UNREAD_DOCUMENT_EXIST("ERR232","There is still unread document for this case!"),
USER_ID_IS_EMTPRY("ERR233","Current User Id is empty!"),
INVALID_EMAIL_ADDRESS("ERR234","Email Address can't find any record in Account Mapping!"),
POLICY_EXISTED("ERR235", "Policy already existed!"),
UAM_NETWORK_FAILED("ERR236", "Call UAM API failed,please check with support"),
TASK_LOCKED_BY_OTHERS_IF_OVVERIDE("ERR237", "Case was locked by %s, do you wish to override the task"),
ALREADY_EXIST("ERR238", "Assignment for this broker has already exist, please check!"),
NO_CASE_FOUND("ERR239", "There is no case found, thanks!"),
SUBMISSIONMODULE_NETWORK_FAILED("ERR240", "Call SubmissionModule api failed,please check with support"),
SUBMISSIONMODULE_FAILED("ERR241", "Import failed!"),
BUSINESS_NETWORK_FAILED("ERR242", "Call bussiness failed,please check with support"),
CASE360_NETWORK_FAILED("ERR243", "Call case360 failed,please check with support"),
MESSAGE_ID_EMPTY("ERR244", "Message Id is empty."),
INVALID_MESSAGE_ID("ERR245", "Message Id is invalid.");
private String code;
private String desc;
private static Map<String, String> errorMap = new HashMap<>();
ErrorEnums(String code, String desc) {
this.code = code;
this.desc = desc;
}
static {
for(ErrorEnums enums : ErrorEnums.values()){
errorMap.put(enums.code, enums.desc);
}
}
public static String desc(String code) {
return errorMap.get(code);
}
@Override
public String code() {
return code;
}
@Override
public String desc() {
return desc;
}
}