package com.eactive.eai.rms.onl.manage.rule.upload;

import com.eactive.eai.common.util.StringUtil;

public interface IoMapLoaderKey {
	public static String CM_CONFIG ="CM_CONFIG";
	public static String LAYOUT ="layout";
	public static String TRANSFORM ="transform";
	public static String INTERFACE ="interface";
	//public static String INTERFACE_INFO ="interfaceInfo";
	
	
	//요청 변환관련
	public static String  REQ_TRAN="ChngMsgIDName";
	public static String  REQ_TRAN_UPPER=REQ_TRAN.toUpperCase();
	public static String  REQ_TRAN_YN="ChngEonot";
	public static String  REQ_TRAN_YN_UPPER=REQ_TRAN_YN.toUpperCase();

	//응답 변환관련
	public static String  RES_TRAN="BascRspnsChngMsgIDName";
	public static String  RES_TRAN_UPPER=RES_TRAN.toUpperCase();
	public static String  RES_TRAN_YN="BascRspnsChngEonot";
	public static String  RES_TRAN_YN_UPPER=RES_TRAN_YN.toUpperCase();

	//에러 변환관련
	public static String  ERR_TRAN="ErrRspnsChngMsgIDName";
	public static String  ERR_TRAN_UPPER=ERR_TRAN.toUpperCase();
	public static String  ERR_TRAN_YN="ErrRspnsChngEonot";
	public static String  ERR_TRAN_YN_UPPER=ERR_TRAN_YN.toUpperCase();
	
	//parameters
	public static String CONFIGPATH ="configPath";// Config File Path //1번 파라미터  <=== DB정보 TOBE에서는 사용하지 않음
	public static String WORKDAY    ="workDay";   // 영업일자                   //2번 파라미터                     
	public static String APCODE     ="apCode";    // 업무코드                   //3번 파라미터                     
	public static String PKGNUMBER  ="pkgNumber"; // 패키지번호                //4번 파라미터                       
	public static String RUNTIME    ="runTime";   // 실행시간                   //5번 파라미터                     
	public static String MIDNIGHT   ="midNight";  // 일자전환속성 Y/P/N  //6번 파라미터                              
	
	//cmKind
	public static String CM_MIDNIGHT  ="D";
	public static String CM_IPL       ="P";
	public static String CM_RESERV    ="R";
	public static String CM_EMERGENCY ="E";
	
    public static String getEaiSevrName(String eaiSevrDstcd){
    	String eaiSevrName ="";
		switch (StringUtil.getNullStr(eaiSevrDstcd)) {
			case "1":
				eaiSevrName = "NSG";
				break;
			case "2":
				eaiSevrName = "DSG";
				break;
			case "3":
				eaiSevrName = "GSG";
				break;
			case "4":
				eaiSevrName = "ZSG";
				break;
			case "5":
				eaiSevrName = "ASG";
				break;
			case "9":
				eaiSevrName = "ALL";
				break;
			default:
		}
		return eaiSevrName;
    }
    public static String getEaiServerPrefix(String eaiSevrDstcd){
    	String eaiServerPrefix ="";
    	switch (StringUtil.getNullStr(eaiSevrDstcd)) {
    	case "1":
    		eaiServerPrefix = "EAINS";
    		break;
    	case "2":
    		eaiServerPrefix = "EAIDS";
    		break;
    	case "3":
    		eaiServerPrefix = "EAIGS";
    		break;
    	case "4":
    		eaiServerPrefix = "EAIZS";
    		break;
    	case "5":
    		eaiServerPrefix = "EAIAS";
    		break;
    	default:
    	}
    	return eaiServerPrefix;
    }
    public static String[] getAllEaiSevrName(){
    	return new String[]{"NSG","DSG","GSG","ZSG","ASG"};
    }
    public static String getEaiSevrDstcd(String eaiSevrName){
    	String eaiSevrDstcd ="";
		switch (StringUtil.getNullStr(eaiSevrName)) {
			case "NSG":
				eaiSevrDstcd = "1";
				break;
			case "DSG":
				eaiSevrDstcd = "2";
				break;
			case "GSG":
				eaiSevrDstcd = "3";
				break;
			case "ZSG":
				eaiSevrDstcd = "4";
				break;
			case "ASG":
				eaiSevrDstcd = "5";
				break;
			case "ALL":
				eaiSevrDstcd = "9";
				break;
			default:
		}
		return eaiSevrDstcd;
    }
	public static String getSysCdNm(String code) {
		switch(code) {
			case "NSG": return "내부";
			case "DSG": return "대외";
			case "GSG": return "공동";
			case "ZSG": return "DMZ";
			case "ASG": return "API";
			default: return "";
		}
	}

}
