init
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package com.eactive.eai.common.message;
|
||||
|
||||
public interface AdapterType {
|
||||
// SNA Response
|
||||
public static final String SNAR = "SNAR";
|
||||
|
||||
// SNA No Response
|
||||
public static final String SNAN = "SNAN";
|
||||
|
||||
// SNA Unsolicited
|
||||
public static final String SNAU = "SNAU";
|
||||
|
||||
// IMS
|
||||
public static final String IMSR = "IMSR";
|
||||
|
||||
// Socket Sync
|
||||
public static final String SCKR = "SCKR";
|
||||
|
||||
// Socket Async
|
||||
public static final String SCKN = "SCKN";
|
||||
|
||||
// MQ
|
||||
public static final String MQIN = "MQIN";
|
||||
|
||||
// TUXEDO
|
||||
public static final String TUXR = "TUXR";
|
||||
|
||||
// EJB
|
||||
public static final String EJBR = "EJBR";
|
||||
|
||||
// HTTP
|
||||
public static final String HTTP = "HTTP";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.eactive.eai.common.message;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class CondPerRtgInfo implements Serializable {
|
||||
|
||||
private String ruleGrpNm; // 규칙필드그룹명[TSEAIFR01.RuleFldGroupName] - RuleGroupName
|
||||
private String ruleColNm; // 규칙필드명[TSEAIFR01.RuleFldName] - RuleColumnName
|
||||
private String ruleCprTxt; // 비교내용[TSEAIFR01.CmprCtnt] - ServiceTimeExistenceOrNot - [Y|N]
|
||||
|
||||
private String rsultPrcssNo; // 결과처리번호[TSEAIFR01.RsultPrcssNo] - ResultProcessNumber
|
||||
|
||||
public CondPerRtgInfo() {
|
||||
}
|
||||
|
||||
public CondPerRtgInfo(String rsultPrcssNo, String ruleGrpNm, String ruleColNm, String ruleCprTxt) {
|
||||
this.rsultPrcssNo = rsultPrcssNo;
|
||||
this.ruleGrpNm = ruleGrpNm;
|
||||
this.ruleColNm = ruleColNm;
|
||||
this.ruleCprTxt = ruleCprTxt;
|
||||
}
|
||||
|
||||
public void setRuleGrpNm(String ruleGrpNm) {
|
||||
this.ruleGrpNm = ruleGrpNm;
|
||||
}
|
||||
|
||||
public String getRuleGrpNm() {
|
||||
return this.ruleGrpNm;
|
||||
}
|
||||
|
||||
public void setRuleColNm(String ruleColNm) {
|
||||
this.ruleColNm = ruleColNm;
|
||||
}
|
||||
|
||||
public String getRuleColNm() {
|
||||
return this.ruleColNm;
|
||||
}
|
||||
|
||||
public void setRuleCprTxt(String ruleCprTxt) {
|
||||
this.ruleCprTxt = ruleCprTxt;
|
||||
}
|
||||
|
||||
public String getRuleCprTxt() {
|
||||
return this.ruleCprTxt;
|
||||
}
|
||||
|
||||
public String getRsultPrcssNo() {
|
||||
return this.rsultPrcssNo;
|
||||
}
|
||||
|
||||
public void setRsultPrcssNo(String rsultPrcssNo) {
|
||||
this.rsultPrcssNo = rsultPrcssNo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,662 @@
|
||||
package com.eactive.eai.common.message;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.eactive.eai.message.StandardMessage;
|
||||
import com.eactive.eai.message.manager.StandardMessageManager;
|
||||
import com.eactive.eai.message.service.InterfaceMapper;
|
||||
import com.ext.eai.common.stdmessage.STDMessageKeys;
|
||||
|
||||
public class EAIMessage implements EAIMessageKeys, Serializable, Comparable<EAIMessage>, Cloneable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String eaiSvrInstNm; // EAI서버인스턴스명[Runtime 정보] - EAIServerInstanceName
|
||||
private String eaiSvcCd; // EAI서비스명[TSEAIHE01.EAISvcName] - EAIServiceCode
|
||||
private String svcTmEn; // 서비스시각유무[TSEAIHE01.SvcHMSEonot] - ServiceTimeExistenceOrNot - [Y|N]
|
||||
private String svcOgNo; // 서비스고유번호 - ServiceOriginNumber - [UUID]
|
||||
private String svcTsmtUsgTp; // 서비스동기사용구분코드[TSEAIHE01.SvcMotivUseDstcd] - ServiceTheSameTimeUsgaeType - [SYNC|ASYN|AKON]
|
||||
private String svcPssTp; // 서비스프로세스구분명[TSEAIHE01.SvcPrcesDsticName] - ServiceProcessType - [SINGLE|COMPLEX|PCOMPLEX]
|
||||
private String flwCntlRtnNm; // 흐름통제라우팅명[TSEAIHE01.FlowCtrlRoutName] - FlowControlRoutingName
|
||||
private String unifTp; // 통합구분명[TSEAIHE01.IntgraDsticName] - UnificationType - [ONLINE|BATCH|FTP]
|
||||
private String sngSvcCls; // 기동서비스구분 - StartingServiceClassification - [TIMER|EXCEPTION]
|
||||
private int svcPssSeq = 1; // 서비스처리순서 - ServiceProcessSequence - [1,2,3, etc]
|
||||
private int logPssSno; // 로그처리일련번호 - LogProcessSequenceNUmber - [100,200,300,400 | 100,211,212,221,222,...,400]
|
||||
private String svcWlColLogYn; // 서비스전컬럼로그여부[TSEAIHE01.SvcBfClmnLogYn] - ServiceWholeColumnLogYesOrNo - [Y|N]
|
||||
private String internalExternalDvcd; // 서비스전컬럼로그여부[TSEAIHE01.internalExternalDvcd] - [1|2]
|
||||
private String bwkCls; // EAI업무구분코드[TSEAIHE01.EAIBzwkDstcd] - BusinessWorkClassification - 3|4자리 KB표준업무구분코드 사용
|
||||
private String stdMsgUsgCls; // 표준메시지사용구분[Runtime 정보] - StandardMessageUsageClassification - [Y|N]
|
||||
private String sngSysItfTp; // 기동시스템어댑터업무그룹명[TSEAIHE01.GstatSysAdptrBzwkGroupName] - StartingSystemInterfaceType - [Adapter_업무명_IN]
|
||||
private String lydMsgID; // 레이어메시지ID - vlf
|
||||
private String rspErrCd; // 응답에러코드 - ResponseErrorCode - [12 BYTE EAI에러코드]
|
||||
private String rspErrMsg; // 응답에러메시지 - ResponseErrorMessage - [ 200 BYTE ]
|
||||
private long msgRcvTm; // 메시지수신시각 - MessageReceiveTime - RequestProcessor에서 설정한다.
|
||||
private long msgPssTm; // 메시지처리시각 - MessageProcessTime - LOGGER에서 로깅전 설정한다. Queue로 Push하기전에...
|
||||
private int svrLogLvl; // 서버로그레벨번호[TSEAIHE01.SevrLogLvelNo] - ServerLogLevel - DEFAULT(WARNING, ERROR, FATAL)-0, INFO-1, DEBUG-2
|
||||
private int svcLogLvl; // 서비스로그레벨번호[TSEAIHE01.SvcLogLvelNo] - ServiceLogLevel - [0|1|2|3]
|
||||
private List<ServiceMessage> svcMsgs; // 서비스처리정보리스트-ArrayList
|
||||
|
||||
private InterfaceMapper mapper;
|
||||
private StandardMessage standardMessage;
|
||||
private StandardMessage subMessage;
|
||||
|
||||
private String errEAISvcName; //오류EAI서비스명[TSEAIHE01.ErrEAISvcName] -ErrorEAIServiceName
|
||||
private String dmndErrChngIDName; //요청오류변환ID명[TSEAIHE01.DmndErrChngIDName] -RequestErrorConversionID
|
||||
private String dmndErrFldName; //요청에러필드명[TSEAIHE01.DmndErrFldName] -RequestErrorColumnName
|
||||
private String rspnsErrChngIDName; //응답오류변환ID명[TSEAIHE01.RspnsErrChngIDName] -ResponseErrorConversionID
|
||||
private String rspnsErrFldName; //응답에러필드명[TSEAIHE01.RspnsErrFldName] -ResponseErrorColumnName
|
||||
|
||||
private String eaiSvcDesc; //EAI서비스 설명 [ TSEAIHE01.EAISvcDesc]
|
||||
private String extBizCd; //대외업무구분코드[ TSEAIHE01.ExtBizCd] //경우에따라서는 다른컬럼이 아니라 인터페이스 앞3자리일수 있음 //TODO ※JBBEXT※ 인터페이스앞3자리
|
||||
|
||||
private String clientIp; // 요청 시스템 IP 주소
|
||||
|
||||
/**
|
||||
* EAI서버구분코드 (내부-1/대외-2/공동망-3/DMZ-4/OPEN-5)
|
||||
*/
|
||||
private String sevrDstcd;
|
||||
|
||||
/**
|
||||
* 그룹회사코드 (KB0/KC0)
|
||||
*/
|
||||
private String groupCoCd;
|
||||
|
||||
/**
|
||||
* 거래처리구분 (R 실제거래/T TAS/S EAI중단거래/F TAS 기동거래/D 더미단말거래 라우팅됨)
|
||||
*/
|
||||
private String tranType;
|
||||
|
||||
/**
|
||||
* 응답변환유형(0 기본응답변환, 1 에러응답변환)
|
||||
*/
|
||||
private String rspnsChngMsgType;
|
||||
|
||||
/**
|
||||
* 거래로그때문에 추가됨 로그용 휘발성 데이터 companyCode : 업체코드 splizLength : 전문길이 adptrInstiCode
|
||||
* : 어댑터기관코드명
|
||||
*
|
||||
*/
|
||||
private String companyCode;
|
||||
private int splizLength;
|
||||
private String adptrInstiCode;
|
||||
private String useYn;
|
||||
/**
|
||||
* NexCore 용 으로 인터페이스 조회시 참조 txid : 계정계 거래코드 refKey : 대외
|
||||
* 거래코드(대외업무구분코드+전문종별+거래구분코드+기타)
|
||||
*/
|
||||
private String txId; // 거래ID[ TSEAIHE01.TxId]
|
||||
private String refKey;// 참조KEY[ TSEAIHE01.RefKey]
|
||||
|
||||
/**
|
||||
* Open API 서비스시 client 별 통계용 추가
|
||||
*/
|
||||
private String clientId;
|
||||
|
||||
private String authType;
|
||||
|
||||
private String apiEnabledYn;
|
||||
|
||||
private String apiCacheYn;
|
||||
|
||||
private String apiCacheType;
|
||||
|
||||
private String authkeyfieldname;
|
||||
|
||||
private String authCheckdYn;
|
||||
|
||||
public EAIMessage() {
|
||||
this.svcMsgs = new ArrayList<>();
|
||||
this.svcPssSeq = 1;
|
||||
}
|
||||
|
||||
public String getBwkCls() {
|
||||
return bwkCls;
|
||||
}
|
||||
|
||||
public void setBwkCls(String bwkCls) {
|
||||
this.bwkCls = bwkCls;
|
||||
}
|
||||
|
||||
public String getEAISvcCd() {
|
||||
return eaiSvcCd;
|
||||
}
|
||||
|
||||
public void setEAISvcCd(String svcCd) {
|
||||
eaiSvcCd = svcCd;
|
||||
}
|
||||
|
||||
public String getEAISvrInstNm() {
|
||||
return eaiSvrInstNm;
|
||||
}
|
||||
|
||||
public void setEAISvrInstNm(String svrInstNm) {
|
||||
eaiSvrInstNm = svrInstNm;
|
||||
}
|
||||
|
||||
public String getFlwCntlRtnNm() {
|
||||
return flwCntlRtnNm;
|
||||
}
|
||||
|
||||
public void setFlwCntlRtnNm(String flwCntlRtnNm) {
|
||||
this.flwCntlRtnNm = flwCntlRtnNm;
|
||||
}
|
||||
|
||||
public int getLogPssSno() {
|
||||
return logPssSno;
|
||||
}
|
||||
|
||||
public void setLogPssSno(int logPssSno) {
|
||||
this.logPssSno = logPssSno;
|
||||
}
|
||||
|
||||
public String getLydMsgID() {
|
||||
return lydMsgID;
|
||||
}
|
||||
|
||||
public void setLydMsgID(String lydMsgID) {
|
||||
this.lydMsgID = lydMsgID;
|
||||
}
|
||||
|
||||
public long getMsgPssTm() {
|
||||
return msgPssTm;
|
||||
}
|
||||
|
||||
public void setMsgPssTm(long msgPssTm) {
|
||||
this.msgPssTm = msgPssTm;
|
||||
}
|
||||
|
||||
public long getMsgRcvTm() {
|
||||
return msgRcvTm;
|
||||
}
|
||||
|
||||
public void setMsgRcvTm(long msgRcvTm) {
|
||||
this.msgRcvTm = msgRcvTm;
|
||||
}
|
||||
|
||||
public String getRspErrCd() {
|
||||
return rspErrCd;
|
||||
}
|
||||
|
||||
public void setRspErrCd(String rspErrCd) {
|
||||
this.rspErrCd = rspErrCd;
|
||||
// --------------------------------------------
|
||||
// 에러메시지는 뒤의 9자리를 짤라서 설정한다.
|
||||
// 에러코드가 아닌경우에는 설정하지 않는다 (RE ,RF )
|
||||
// 2008.04.29
|
||||
// 2008.07.10 : 8자리로 수정
|
||||
// 'S9' + 뒤에 6자리
|
||||
// 20080919 - 업무에러일 경우에도 메시지에 설정하도록 수정
|
||||
// --------------------------------------------
|
||||
|
||||
if (this.mapper != null && this.standardMessage != null && rspErrCd != null && rspErrCd.length() == 12) {
|
||||
if (rspErrCd.startsWith("RE") || rspErrCd.startsWith("RF") || rspErrCd.equals(BWK_FAILMSG_CODE)) {
|
||||
|
||||
// migration ExtMessage to StandardMessage
|
||||
//getMapper().setErrorCode(standardMessage, rspErrCd);
|
||||
StandardMessageManager standardManager = StandardMessageManager.getInstance();
|
||||
standardManager.getMessageCoordinator().coordinateSetStandardMessageError(standardMessage, getMapper(), rspErrCd, null);
|
||||
getMapper().setResponseType(standardMessage, STDMessageKeys.RESPONSE_TYPE_CODE_E);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public String getRspErrMsg() {
|
||||
return rspErrMsg;
|
||||
}
|
||||
|
||||
public void setRspErrMsg(String rspErrMsg) {
|
||||
this.rspErrMsg = rspErrMsg;
|
||||
|
||||
if (this.mapper != null && this.standardMessage != null && rspErrMsg != null) {
|
||||
//getMapper().setErrorMsg(standardMessage, rspErrMsg);
|
||||
StandardMessageManager standardManager = StandardMessageManager.getInstance();
|
||||
standardManager.getMessageCoordinator().coordinateSetStandardMessageError(standardMessage, getMapper(), null, rspErrMsg);
|
||||
}
|
||||
}
|
||||
|
||||
public void setRspErr(String rspErrCd, String rspErrMsg) {
|
||||
this.rspErrCd = rspErrCd;
|
||||
this.rspErrMsg = rspErrMsg;
|
||||
if (this.mapper != null && this.standardMessage != null) {// 표준전문셋팅
|
||||
StandardMessageManager standardManager = StandardMessageManager.getInstance();
|
||||
String stdErrCd = null;
|
||||
String stdErrMsg = null;
|
||||
if (rspErrCd != null && rspErrCd.length() == 12 && (rspErrCd.startsWith("RE") || rspErrCd.startsWith("RF") || rspErrCd.equals(BWK_FAILMSG_CODE))) {
|
||||
stdErrCd = rspErrCd;
|
||||
}
|
||||
if (rspErrMsg != null) {
|
||||
stdErrMsg = rspErrMsg;
|
||||
}
|
||||
standardManager.getMessageCoordinator().coordinateSetStandardMessageError(standardMessage, getMapper(), stdErrCd, stdErrMsg);
|
||||
}
|
||||
}
|
||||
public String getSngSvcCls() {
|
||||
return sngSvcCls;
|
||||
}
|
||||
|
||||
public void setSngSvcCls(String sngSvcCls) {
|
||||
this.sngSvcCls = sngSvcCls;
|
||||
}
|
||||
|
||||
public String getSngSysItfTp() {
|
||||
return sngSysItfTp;
|
||||
}
|
||||
|
||||
public void setSngSysItfTp(String sngSysItfTp) {
|
||||
this.sngSysItfTp = sngSysItfTp;
|
||||
}
|
||||
|
||||
public String getStdMsgUsgCls() {
|
||||
return stdMsgUsgCls;
|
||||
}
|
||||
|
||||
public void setStdMsgUsgCls(String stdMsgUsgCls) {
|
||||
this.stdMsgUsgCls = stdMsgUsgCls;
|
||||
}
|
||||
|
||||
public int getSvcLogLvl() {
|
||||
return svcLogLvl;
|
||||
}
|
||||
|
||||
public void setSvcLogLvl(int svcLogLvl) {
|
||||
this.svcLogLvl = svcLogLvl;
|
||||
}
|
||||
|
||||
public List<ServiceMessage> getSvcMsgs() {
|
||||
return svcMsgs;
|
||||
}
|
||||
|
||||
public void setSvcMsgs(List<ServiceMessage> svcMsgs) {
|
||||
this.svcMsgs = svcMsgs;
|
||||
}
|
||||
|
||||
public void setSvcMsgs(int pos, ServiceMessage svcMsgs) {
|
||||
this.svcMsgs.set(pos, svcMsgs);
|
||||
}
|
||||
|
||||
public void addSvcMsg(ServiceMessage svcMsg) {
|
||||
this.svcMsgs.add(svcMsg);
|
||||
}
|
||||
|
||||
public void removeSvcMsgs() {
|
||||
// 제거 후 추가시 에러 방지 - 2008.06.03
|
||||
this.svcMsgs.clear();
|
||||
}
|
||||
|
||||
public void removeSvcMsg(int pos) {
|
||||
this.svcMsgs.remove(pos);
|
||||
}
|
||||
|
||||
public ServiceMessage getCurrentSvcMsg() {
|
||||
if (getSvcPssSeq() > 0) {
|
||||
return this.svcMsgs.get(getSvcPssSeq() - 1);
|
||||
} else {
|
||||
throw new RuntimeException("EAIMessage] Invalid SvcPssSeq. - " + this.svcPssSeq);
|
||||
}
|
||||
}
|
||||
|
||||
public ServiceMessage getNextSvcMsg() {
|
||||
if (getSvcPssSeq() >= this.svcMsgs.size())
|
||||
return null;
|
||||
return this.svcMsgs.get(getSvcPssSeq());
|
||||
}
|
||||
|
||||
public ServiceMessage getSvcMsg(int i) {
|
||||
if (i >= this.svcMsgs.size())
|
||||
return null;
|
||||
return this.svcMsgs.get(i);
|
||||
}
|
||||
|
||||
public String getSvcOgNo() {
|
||||
return svcOgNo;
|
||||
}
|
||||
|
||||
public void setSvcOgNo(String svcOgNo) {
|
||||
this.svcOgNo = svcOgNo;
|
||||
}
|
||||
|
||||
public int getSvcPssSeq() {
|
||||
return svcPssSeq;
|
||||
}
|
||||
|
||||
public void setSvcPssSeq(int svcPssSeq) {
|
||||
this.svcPssSeq = svcPssSeq;
|
||||
}
|
||||
|
||||
public String getSvcPssTp() {
|
||||
return svcPssTp;
|
||||
}
|
||||
|
||||
public void setSvcPssTp(String svcPssTp) {
|
||||
this.svcPssTp = svcPssTp;
|
||||
}
|
||||
|
||||
public String getSvcTmEn() {
|
||||
return svcTmEn;
|
||||
}
|
||||
|
||||
public void setSvcTmEn(String svcTmEn) {
|
||||
this.svcTmEn = svcTmEn;
|
||||
}
|
||||
|
||||
public String getSvcTsmtUsgTp() {
|
||||
return svcTsmtUsgTp;
|
||||
}
|
||||
|
||||
public void setSvcTsmtUsgTp(String svcTsmtUsgTp) {
|
||||
this.svcTsmtUsgTp = svcTsmtUsgTp;
|
||||
}
|
||||
|
||||
public String getSvcWlColLogYn() {
|
||||
return svcWlColLogYn;
|
||||
}
|
||||
|
||||
public void setSvcWlColLogYn(String svcWlColLogYn) {
|
||||
this.svcWlColLogYn = svcWlColLogYn;
|
||||
}
|
||||
|
||||
public int getSvrLogLvl() {
|
||||
return svrLogLvl;
|
||||
}
|
||||
|
||||
public void setSvrLogLvl(int svrLogLvl) {
|
||||
this.svrLogLvl = svrLogLvl;
|
||||
}
|
||||
|
||||
public String getUnifTp() {
|
||||
return unifTp;
|
||||
}
|
||||
|
||||
public void setUnifTp(String unifTp) {
|
||||
this.unifTp = unifTp;
|
||||
}
|
||||
|
||||
public String getErrEAISvcName() {
|
||||
return errEAISvcName;
|
||||
}
|
||||
|
||||
public String getDmndErrChngIDName() {
|
||||
return dmndErrChngIDName;
|
||||
}
|
||||
|
||||
public String getDmndErrFldName() {
|
||||
return dmndErrFldName;
|
||||
}
|
||||
|
||||
public String getRspnsErrChngIDName() {
|
||||
return rspnsErrChngIDName;
|
||||
}
|
||||
|
||||
public String getRspnsErrFldName() {
|
||||
return rspnsErrFldName;
|
||||
}
|
||||
|
||||
public void setErrEAISvcName(String errEAISvcName) {
|
||||
this.errEAISvcName = errEAISvcName;
|
||||
}
|
||||
|
||||
public void setDmndErrChngIDName(String dmndErrChngIDName) {
|
||||
this.dmndErrChngIDName = dmndErrChngIDName;
|
||||
}
|
||||
|
||||
public void setDmndErrFldName(String dmndErrFldName) {
|
||||
this.dmndErrFldName = dmndErrFldName;
|
||||
}
|
||||
|
||||
public void setRspnsErrChngIDName(String rspnsErrChngIDName) {
|
||||
this.rspnsErrChngIDName = rspnsErrChngIDName;
|
||||
}
|
||||
|
||||
public void setRspnsErrFldName(String rspnsErrFldName) {
|
||||
this.rspnsErrFldName = rspnsErrFldName;
|
||||
}
|
||||
|
||||
public void setEAISvcDesc(String eaiSvcDesc) {
|
||||
this.eaiSvcDesc = eaiSvcDesc;
|
||||
}
|
||||
|
||||
public String getEAISvcDesc() {
|
||||
return eaiSvcDesc;
|
||||
}
|
||||
|
||||
public int compareTo(EAIMessage m) {
|
||||
if (getMsgRcvTm() > m.getMsgRcvTm())
|
||||
return 1;
|
||||
else if (getMsgRcvTm() == m.getMsgRcvTm())
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
public String getGroupCoCd() {
|
||||
return groupCoCd;
|
||||
}
|
||||
|
||||
public void setGroupCoCd(String groupCoCd) {
|
||||
this.groupCoCd = groupCoCd;
|
||||
}
|
||||
|
||||
public String getSevrDstcd() {
|
||||
return sevrDstcd;
|
||||
}
|
||||
|
||||
public void setSevrDstcd(String sevrDstcd) {
|
||||
this.sevrDstcd = sevrDstcd;
|
||||
}
|
||||
|
||||
public String getTranType() {
|
||||
return tranType;
|
||||
}
|
||||
|
||||
public void setTranType(String tranType) {
|
||||
this.tranType = tranType;
|
||||
}
|
||||
|
||||
public String getRspnsChngMsgType() {
|
||||
return rspnsChngMsgType;
|
||||
}
|
||||
|
||||
public void setRspnsChngMsgType(String rspnsChngMsgType) {
|
||||
this.rspnsChngMsgType = rspnsChngMsgType;
|
||||
}
|
||||
|
||||
public String getCompanyCode() {
|
||||
return companyCode;
|
||||
}
|
||||
|
||||
public void setCompanyCode(String companyCode) {
|
||||
this.companyCode = companyCode;
|
||||
}
|
||||
|
||||
public int getSplizLength() {
|
||||
return splizLength;
|
||||
}
|
||||
|
||||
public void setSplizLength(int splizLength) {
|
||||
this.splizLength = splizLength;
|
||||
}
|
||||
|
||||
public String getAdptrInstiCode() {
|
||||
return adptrInstiCode;
|
||||
}
|
||||
|
||||
public void setAdptrInstiCode(String adptrInstiCode) {
|
||||
this.adptrInstiCode = adptrInstiCode;
|
||||
}
|
||||
|
||||
public String getUseYn() {
|
||||
return useYn;
|
||||
}
|
||||
|
||||
public void setUseYn(String useYn) {
|
||||
this.useYn = useYn;
|
||||
}
|
||||
|
||||
// public ExtMessage getExtMsg() {
|
||||
// return extMsg;
|
||||
// }
|
||||
//
|
||||
// public void setExtMsg(ExtMessage extMsg) {
|
||||
// this.extMsg = extMsg;
|
||||
// }
|
||||
public InterfaceMapper getMapper() {
|
||||
return mapper;
|
||||
}
|
||||
|
||||
public void setMapper(InterfaceMapper mapper) {
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
public StandardMessage getStandardMessage() {
|
||||
return standardMessage;
|
||||
}
|
||||
|
||||
public void setStandardMessage(StandardMessage standardMessage) {
|
||||
this.standardMessage = standardMessage;
|
||||
}
|
||||
|
||||
|
||||
public StandardMessage getSubMessage() {
|
||||
return subMessage;
|
||||
}
|
||||
|
||||
public void setSubMessage(StandardMessage subMessage) {
|
||||
this.subMessage = subMessage;
|
||||
}
|
||||
|
||||
public String getExtBizCd() {
|
||||
return extBizCd;
|
||||
}
|
||||
|
||||
public void setExtBizCd(String extBizCd) {
|
||||
this.extBizCd = extBizCd;
|
||||
}
|
||||
|
||||
public String getTxId() {
|
||||
return txId;
|
||||
}
|
||||
|
||||
public void setTxId(String txId) {
|
||||
this.txId = txId;
|
||||
}
|
||||
|
||||
public String getRefKey() {
|
||||
return refKey;
|
||||
}
|
||||
|
||||
public void setRefKey(String refKey) {
|
||||
this.refKey = refKey;
|
||||
}
|
||||
|
||||
public String getClientId() {
|
||||
return clientId;
|
||||
}
|
||||
|
||||
public void setClientId(String clientId) {
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
public String getInternalExternalDvcd() {
|
||||
return internalExternalDvcd;
|
||||
}
|
||||
|
||||
public void setInternalExternalDvcd(String internalExternalDvcd) {
|
||||
this.internalExternalDvcd = internalExternalDvcd;
|
||||
}
|
||||
|
||||
public String getApiEnabledYn() {
|
||||
return apiEnabledYn;
|
||||
}
|
||||
|
||||
public void setApiEnabledYn(String apiEnabledYn) {
|
||||
this.apiEnabledYn = apiEnabledYn;
|
||||
}
|
||||
|
||||
public String getAuthType() {
|
||||
return authType;
|
||||
}
|
||||
|
||||
public void setAuthType(String authType) {
|
||||
this.authType = authType;
|
||||
}
|
||||
|
||||
public String getClientIp() {
|
||||
return clientIp;
|
||||
}
|
||||
|
||||
public void setClientIp(String clientIp) {
|
||||
this.clientIp = clientIp;
|
||||
}
|
||||
|
||||
public String getApiCacheYn() {
|
||||
return apiCacheYn;
|
||||
}
|
||||
|
||||
public void setApiCacheYn(String apiCacheYn) {
|
||||
this.apiCacheYn = apiCacheYn;
|
||||
}
|
||||
|
||||
public String getApiCacheType() {
|
||||
return apiCacheType;
|
||||
}
|
||||
|
||||
public void setApiCacheType(String apiCacheType) {
|
||||
this.apiCacheType = apiCacheType;
|
||||
}
|
||||
|
||||
public String getAuthkeyfieldname() {
|
||||
return authkeyfieldname;
|
||||
}
|
||||
|
||||
public void setAuthkeyfieldname(String authkeyfieldname) {
|
||||
this.authkeyfieldname = authkeyfieldname;
|
||||
}
|
||||
|
||||
public String getAuthCheckdYn() {
|
||||
return authCheckdYn;
|
||||
}
|
||||
|
||||
public void setAuthCheckdYn(String authCheckdYn) {
|
||||
this.authCheckdYn = authCheckdYn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object clone() throws CloneNotSupportedException {
|
||||
EAIMessage cloned = (EAIMessage) super.clone();
|
||||
if (svcMsgs != null) {
|
||||
cloned.setSvcMsgs((List<ServiceMessage>) ((ArrayList<ServiceMessage>) svcMsgs).clone());
|
||||
}
|
||||
if (mapper != null)
|
||||
cloned.setMapper(mapper);
|
||||
if (standardMessage != null)
|
||||
cloned.setStandardMessage((StandardMessage) standardMessage.clone());
|
||||
if (subMessage != null)
|
||||
cloned.setSubMessage((StandardMessage) subMessage.clone());
|
||||
return cloned;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
String data = null;
|
||||
if (standardMessage != null) {
|
||||
try {
|
||||
standardMessage.setBizData(data, null);
|
||||
} catch (Exception e) {
|
||||
;
|
||||
}
|
||||
}
|
||||
if (subMessage != null) {
|
||||
try {
|
||||
subMessage.setBizData(data, null);
|
||||
} catch (Exception e) {
|
||||
;
|
||||
}
|
||||
}
|
||||
if (svcMsgs != null) {
|
||||
svcMsgs.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.eactive.eai.common.message;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.common.dao.BaseDAO;
|
||||
import com.eactive.eai.common.dao.DAOException;
|
||||
import com.eactive.eai.common.exception.ExceptionUtil;
|
||||
import com.eactive.eai.common.message.loader.CondPerRtgInfoLoader;
|
||||
import com.eactive.eai.common.message.loader.EAIMessageLoader;
|
||||
import com.eactive.eai.common.message.loader.EAIReferenceMessageLoader;
|
||||
import com.eactive.eai.common.message.loader.ServiceMessageLoader;
|
||||
import com.eactive.eai.common.message.mapper.CondPerRtgInfoMapper;
|
||||
import com.eactive.eai.common.message.mapper.EAIMessageMapper;
|
||||
import com.eactive.eai.common.message.mapper.ServiceMessageMapper;
|
||||
import com.eactive.eai.common.util.Logger;
|
||||
import com.eactive.eai.data.entity.onl.message.CondPerRtgInfoEntity;
|
||||
import com.eactive.eai.data.entity.onl.message.EAIMessageEntity;
|
||||
import com.eactive.eai.data.entity.onl.message.EAIReferenceMessage;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class EAIMessageDAO extends BaseDAO {
|
||||
private static Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT);
|
||||
|
||||
@Autowired
|
||||
EAIMessageLoader eaiMessageService;
|
||||
|
||||
@Autowired
|
||||
EAIMessageMapper eaiMessageMapper;
|
||||
|
||||
@Autowired
|
||||
ServiceMessageLoader serviceMessageLoader;
|
||||
|
||||
@Autowired
|
||||
ServiceMessageMapper serviceMessageMapper;
|
||||
|
||||
@Autowired
|
||||
EAIReferenceMessageLoader eaiReferenceMessageService;
|
||||
|
||||
@Autowired
|
||||
CondPerRtgInfoLoader condPerRtgInfoLoader;
|
||||
|
||||
@Autowired
|
||||
CondPerRtgInfoMapper condPerRtgInfoMapper;
|
||||
|
||||
public Map<String, EAIMessage> getAllEAIMessages() throws DAOException {
|
||||
try {
|
||||
|
||||
List<EAIMessageEntity> eaiMessageEntities = eaiMessageService.findByUseynOrderByEaisvcname("1");
|
||||
logger.info("[ @@ Load EAIMessage Configuration - starting >>>>>>>>>>>>>>>>> ]");
|
||||
|
||||
Map<String, EAIMessage> eaiMessages = new HashMap<>();
|
||||
for (EAIMessageEntity eaiMessageEntity : eaiMessageEntities) {
|
||||
EAIMessage eaiMessage = getEAIMessage(eaiMessageEntity);
|
||||
eaiMessages.put(eaiMessage.getEAISvcCd(), eaiMessage);
|
||||
}
|
||||
return eaiMessages;
|
||||
} catch (Exception e) {
|
||||
throw new DAOException(ExceptionUtil.getErrorCode(e, "RECEAICMM101"));
|
||||
}
|
||||
}
|
||||
|
||||
private EAIMessage getEAIMessage(EAIMessageEntity eaiMessageEntity) {
|
||||
EAIMessage eaiMessage = eaiMessageMapper.toVo(eaiMessageEntity);
|
||||
|
||||
mapEaiReference(eaiMessageEntity, eaiMessage);
|
||||
|
||||
mapCondPerRtgInfo(eaiMessageEntity, eaiMessage);
|
||||
return eaiMessage;
|
||||
}
|
||||
|
||||
private void mapCondPerRtgInfo(EAIMessageEntity eaiMessageEntity, EAIMessage eaiMessage) {
|
||||
|
||||
eaiMessageEntity.getServiceMessages().stream().forEach(serviceMessageEntity -> {
|
||||
List<CondPerRtgInfoEntity> condPerRtgInfoEntities = serviceMessageEntity.getCondPerRtgInfos();
|
||||
|
||||
List<CondPerRtgInfo> condPerRtgInfos = new ArrayList<>();
|
||||
condPerRtgInfoEntities.forEach(condPerRtgInfoEntity -> {
|
||||
CondPerRtgInfo condPerRtgInfo = new CondPerRtgInfo();
|
||||
condPerRtgInfos.add(condPerRtgInfo);
|
||||
});
|
||||
|
||||
ServiceMessage serviceMessage = eaiMessage.getSvcMsg(serviceMessageEntity.getId().getSvcprcssno() - 1);
|
||||
serviceMessage.setCondPerRtgInfo(condPerRtgInfos);
|
||||
});
|
||||
}
|
||||
|
||||
private void mapEaiReference(EAIMessageEntity eaiMessageEntity, EAIMessage eaiMessage) {
|
||||
|
||||
eaiMessageEntity.getServiceMessages().stream().forEach(serviceMessageEntity -> {
|
||||
List<EAIReferenceMessage> eaiReferenceMessages = serviceMessageEntity.getEaiReferenceMessages();
|
||||
|
||||
String[] refmsgidnames = eaiReferenceMessages.stream().map(EAIReferenceMessage::getRefmsgidname)
|
||||
.toArray(String[]::new);
|
||||
|
||||
ServiceMessage serviceMessage = eaiMessage.getSvcMsg(serviceMessageEntity.getId().getSvcprcssno() - 1);
|
||||
serviceMessage.setRefMsgIDs(refmsgidnames);
|
||||
});
|
||||
}
|
||||
|
||||
public EAIMessage getEAIMessagesByCode(String code) {
|
||||
EAIMessageEntity eaiMessageEntity = eaiMessageService.getById(code);
|
||||
return getEAIMessage(eaiMessageEntity);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.eactive.eai.common.message;
|
||||
|
||||
public interface EAIMessageKeys {
|
||||
public static final String YES_FLAG = "1"; // 2005.10.18 CK Y --> 1
|
||||
public static final String NO_FLAG = "0"; // 2005.10.18 CK N --> 0
|
||||
public static final String SYNC_SVC = "SYNC";
|
||||
public static final String ASYNC_SVC = "ASYN";
|
||||
public static final String ACKONLY_SVC = "AKON";
|
||||
public static final String SINGLE_PROCESS = "SINGLE";
|
||||
public static final String PUBLISH_PROCESS = "PUB";
|
||||
public static final String COMPLEX_PROCESS = "COMPLEX";
|
||||
public static final String PARALLEL_COMPLEX_PROCESS = "PCOMPLEX";
|
||||
|
||||
// property 에 응답코드를 설정
|
||||
public static final String ELINK_RET_CODE = "ELINK_RET_CODE";
|
||||
public static final String EAI_DEFAULT_CODE = "ESBEAI111111";
|
||||
public static final String EAI_SUCCESS_CODE = "ESBEAI000000";
|
||||
public static final String EAI_BLOCKED_CODE = "RECEAIIRP070";
|
||||
public static final String EAI_INFLOW_BLOCKED_CODE = "RECEAIIRP072";
|
||||
//-------------------------------------------------------------
|
||||
// 2007.07.12 DHLEE
|
||||
// 강길수과장 요청 : SNATMProcess의 CAP[51] 에러인 경우에만 BWK_FAILMSG_CODE 사용
|
||||
// 업무데이터 값에 의한 오류응답메시지는 BWK_ERRMSG_CODE 를 사용 EAI_SUCCESS_CODE 와 동일한 값
|
||||
//-------------------------------------------------------------
|
||||
public static final String BWK_FAILMSG_CODE = "RIBEAI999999";
|
||||
public static final String BWK_ERRMSG_CODE = "ESBEAI000000";
|
||||
//-------------------------------------------------------------
|
||||
|
||||
public static final String TRANTYPE_REAL = "R"; // 실제 거래 처리
|
||||
public static final String TRANTYPE_TAS = "T"; // TAS 로 거래처리
|
||||
public static final String TRANTYPE_STOP = "S"; // EAI에서 수신만하고 STOP
|
||||
public static final String TRANTYPE_FROMTAS = "F"; // TAS 기동 거래
|
||||
public static final String TRANTYPE_DUMMYROUT = "D"; // 더미단말 라우팅
|
||||
public static final String TAS_BIZ_CODE = "TAS_BIZ_CODE";
|
||||
|
||||
public static final String RSPNSCHNGMSGTYPE_RES = "0";
|
||||
public static final String RSPNSCHNGMSGTYPE_ERR = "1";
|
||||
|
||||
public static final String DUMMY_TEST_CASE_ID = "TTTTTTT"; // 'T' 7개
|
||||
|
||||
public static final String REAL_PRCSS_TIME = "REAL_PRCSS_TIME"; // 실제처리시간
|
||||
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.eactive.eai.common.message;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.eactive.eai.common.dao.DAOException;
|
||||
import com.eactive.eai.common.exception.ExceptionUtil;
|
||||
import com.eactive.eai.common.lifecycle.Lifecycle;
|
||||
import com.eactive.eai.common.lifecycle.LifecycleException;
|
||||
import com.eactive.eai.common.lifecycle.LifecycleListener;
|
||||
import com.eactive.eai.common.lifecycle.LifecycleSupport;
|
||||
import com.eactive.eai.common.util.ApplicationContextProvider;
|
||||
import com.eactive.eai.common.util.Logger;
|
||||
import com.eactive.eai.common.util.ObjectUtil;
|
||||
|
||||
@Component
|
||||
public class EAIMessageManager implements Lifecycle {
|
||||
static Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT);
|
||||
|
||||
private Map<String, EAIMessage> eaiMsgs = new HashMap<>();
|
||||
private boolean started;
|
||||
private LifecycleSupport lifecycle = new LifecycleSupport(this);
|
||||
|
||||
@Autowired
|
||||
EAIMessageDAO eaiMessageDAO;
|
||||
|
||||
public static EAIMessageManager getInstance() {
|
||||
return ApplicationContextProvider.getContext().getBean(EAIMessageManager.class);
|
||||
}
|
||||
|
||||
public void start() throws LifecycleException {
|
||||
if (started)
|
||||
throw new LifecycleException("RECEAICMM201");
|
||||
|
||||
lifecycle.fireLifecycleEvent(STARTING_EVENT, this);
|
||||
|
||||
try {
|
||||
init();
|
||||
} catch (Exception e) {
|
||||
throw new LifecycleException(ExceptionUtil.getErrorCode(e, "RECEAICMM202"));
|
||||
}
|
||||
started = true;
|
||||
lifecycle.fireLifecycleEvent(STARTED_EVENT, this);
|
||||
}
|
||||
|
||||
private void init() throws DAOException {
|
||||
eaiMsgs = eaiMessageDAO.getAllEAIMessages();
|
||||
}
|
||||
|
||||
public synchronized void reload() throws Exception {
|
||||
if (logger.isWarn()) {
|
||||
logger.warn("EAIMessageManager] reload all Started ...");
|
||||
}
|
||||
init();
|
||||
if (logger.isWarn()) {
|
||||
logger.warn("EAIMessageManager] reload all finished ...");
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void reload(String keyName) throws Exception {
|
||||
EAIMessage msg = eaiMessageDAO.getEAIMessagesByCode(keyName);
|
||||
if (msg != null) {
|
||||
if ("1".equals(msg.getUseYn())) {
|
||||
eaiMsgs.put(keyName, msg);
|
||||
} else {
|
||||
eaiMsgs.remove(keyName);
|
||||
logger.warn("EAIMessageManager] reload key[" + keyName + "] useYn[0] removed");
|
||||
}
|
||||
} else {
|
||||
throw new Exception("EAIMessage not found in Database : key[" + keyName + "]");
|
||||
}
|
||||
}
|
||||
|
||||
public void stop() throws LifecycleException {
|
||||
if (!started)
|
||||
throw new LifecycleException("RECEAICMM203");
|
||||
|
||||
lifecycle.fireLifecycleEvent(STOPING_EVENT, this);
|
||||
|
||||
eaiMsgs.clear();
|
||||
|
||||
started = false;
|
||||
lifecycle.fireLifecycleEvent(STOPPED_EVENT, this);
|
||||
}
|
||||
|
||||
public void addLifecycleListener(LifecycleListener listener) {
|
||||
lifecycle.addLifecycleListener(listener);
|
||||
}
|
||||
|
||||
public LifecycleListener[] findLifecycleListeners() {
|
||||
return lifecycle.findLifecycleListeners();
|
||||
}
|
||||
|
||||
public void removeLifecycleListener(LifecycleListener listener) {
|
||||
lifecycle.removeLifecycleListener(listener);
|
||||
}
|
||||
|
||||
public boolean isStarted() {
|
||||
return this.started;
|
||||
}
|
||||
|
||||
public EAIMessage getEAIMessage(String eaiSvcCd) throws Exception {
|
||||
EAIMessage aMsg = eaiMsgs.get(eaiSvcCd);
|
||||
if (aMsg != null) {
|
||||
try {
|
||||
return (EAIMessage) ObjectUtil.deepCopy(aMsg);
|
||||
} catch (Exception e) {
|
||||
throw new Exception(ExceptionUtil.getErrorCode(e, "RECEAICMM204"), e);
|
||||
}
|
||||
} else {
|
||||
return aMsg;
|
||||
}
|
||||
}
|
||||
|
||||
public String[] getAllEAISvcCd() {
|
||||
Iterator<String> it = this.eaiMsgs.keySet().iterator();
|
||||
String[] svcCd = new String[this.eaiMsgs.size()];
|
||||
for (int i = 0; it.hasNext(); i++) {
|
||||
svcCd[i] = it.next();
|
||||
if (svcCd[i] == null)
|
||||
svcCd[i] = "";
|
||||
}
|
||||
Arrays.sort(svcCd);
|
||||
return svcCd;
|
||||
}
|
||||
|
||||
public void removeEAIMessage(String code) {
|
||||
eaiMsgs.remove(code);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.eactive.eai.common.message;
|
||||
|
||||
public interface ExtMessageKeys {
|
||||
public static final String GROUP_HEADER = "Header";
|
||||
public static final String GROUP_STD_HEADER = "stdheader";
|
||||
public static final String FIELD_SERVICE_ID = "service_id";
|
||||
public static final String FIELD_TRAN_TYPE = "outputMesgTycd";
|
||||
public static final String GROUP_STD_COMMON = "stdcommon";
|
||||
public static final String FIELD_USERID = "usr_id";
|
||||
public static final String FIELD_DLNG_TMNL_NO = "DLNG_TMNL_NO";
|
||||
public static final String FIELD_ROFC_CD = "ROFC_CD";
|
||||
public static final String FIELD_BRN_CD = "BRN_CD";
|
||||
public static final String FIELD_RSPNS_RSLT_DVSN_CD = "RSPNS_RSLT_DVSN_CD";
|
||||
|
||||
public static final String GROUP_SYSTEM_HEADER = "systemHeader";
|
||||
public static final String FIELD_TLGR_TYP_DVSN_CD = "TLGR_TYP_DVSN_CD";
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.eactive.eai.common.message;
|
||||
|
||||
/**
|
||||
* EAI 인터페이스 타입에 대한 코드를 상수로 정의
|
||||
*/
|
||||
public interface IFType {
|
||||
// Sync - Sync
|
||||
public static final String SS = "SS";
|
||||
|
||||
// Async - Async
|
||||
public static final String AA = "AA";
|
||||
|
||||
// Sync = Async
|
||||
public static final String SA = "SA";
|
||||
|
||||
// Async - Sync
|
||||
public static final String AS = "AS";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.eactive.eai.common.message;
|
||||
|
||||
/**
|
||||
* 업무메시지의 타입에 대한 상수를 정의
|
||||
*/
|
||||
public interface MessageType {
|
||||
// ASCII
|
||||
public static final String ASC = "ASC";
|
||||
|
||||
// EBCDIC
|
||||
public static final String EBC = "EBC";
|
||||
|
||||
// Java Value Object
|
||||
public static final String JOB = "JOB";
|
||||
|
||||
// Tuxedo FML
|
||||
public static final String FML = "FML";
|
||||
|
||||
// Tuxedo FML32
|
||||
public static final String F32 = "F32";
|
||||
|
||||
// XML
|
||||
public static final String XML = "XML";
|
||||
public static final String XML_ENCODE = "euc-kr";
|
||||
// public static final String UXML = "UXL";
|
||||
// public static final String UXML_ENCODE = "utf-8";
|
||||
// EUC-KR JSON
|
||||
public static final String JSON = "JSN";
|
||||
public static final String JSON_ENCODE = "euc-kr";
|
||||
// UTF-8 JSON
|
||||
// public static final String UJSON = "UJN";
|
||||
// public static final String UJSON_ENCODE = "utf-8";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,315 @@
|
||||
package com.eactive.eai.common.message;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class ServiceMessage implements EAIMessageKeys, Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String eAISvcCd; // EAI서비스명[TSEAIHE02.EAISvcName]
|
||||
private int svcPssSeq; // 서비스처리번호[TSEAIHE02.SvcPrcssNo]
|
||||
private String psvItfTp; // 수동인터페이스구분명[TSEAIHE02.ManulIntfacDsticName] - PassiveInterfaceType - [SYNC|ASYN|AKON]
|
||||
private String psvBwkSysNm; // 수동시스템업무구분코드[TSEAIHE02.ManulSysBzwkDstcd] - PassiveBusinessWorkSystemName - [ 3|4 자리 KB표준업무시스템명 사용 ]
|
||||
private String psvSysID; // 수동시스템ID명[TSEAIHE02.ManulSysIDName] - PassiveSystemIdentifier - KB표준시스템ID Naming Rule을 따른다.
|
||||
private String psvSysSvcCd; // 수동시스템서비스구분명[TSEAIHE02.ManulSysSvcDsticName] - PassiveSystemServiceCode -
|
||||
private String psvSysItfTp; // 수동시스템어댑터업무그룹명[TSEAIHE02.ManulSysAdptrBzwkGroupName] - PassiveSystemInterfaceType -[Adapter_업무명_OUT]
|
||||
private String flOvrCls; // 장애극복여부[TSEAIHE02.FlovrYn] - FailOverClassification -[Y|N]
|
||||
private String cnvEn; // 변환유무[TSEAIHE02.ChngEonot] - ConversionExistenceOrNot -[Y|N]
|
||||
private String cnvMsgID; // 변환메시지ID명[TSEAIHE02.ChngMsgIDName] - ConversionMessageIdentifier
|
||||
private String rspMsgRefID; // 응답메시지ID - ResponseMessageReferenceIdentifier
|
||||
private String bsRspMsgCprVl; // 기본응답메시지비교내용[TSEAIHE02.BascRspnsMsgCmprCtnt] - BasisResponseMessageCompareValue
|
||||
private String bsRspCnvEn; // 기본응답변환유무[TSEAIHE02.BascRspnsChngEonot] - BasisResponseConversionExistenceOrNot -[Y|N]
|
||||
private String bsRspCnvMsgID; // 기본응답변환메시지ID명[TSEAIHE02.BascRspnsChngMsgIDName] - BasisResponseConversionMessageIdentifier
|
||||
private String errRspMsgCprVl; // 오류응답메시지비교내용[TSEAIHE02.ErrRspnsMsgCmprCtnt] - ErrorResponseMessageCompareValue
|
||||
private String errRspCnvEn; // 오류응답변환유무[TSEAIHE02.ErrRspnsChngEonot] - ErrorResponseConversionExistenceOrNot -[Y|N]
|
||||
private String errRspCnvMsgID; // 오류응답변환메시지ID명[TSEAIHE02.ErrRspnsChngMsgIDName] - ErrorResposneConversionIdentifier
|
||||
private String keyMgtMsgVl; // 키관리메시지값 - KeyManagementMessageValue
|
||||
private int nxtSvcPssSeq; // 다음서비스처리번호[TSEAIHE02.NextSvcPrcssNo] - NextServiceProcessSequence
|
||||
private String outbRtnNm; // 아웃바운드라우팅명[TSEAIHE02.OutbndRoutName] - OutboundRoutingName
|
||||
private int tmoVl; // 타임아웃값[TSEAIHE02.ToutVal] - TimeoutValue(단위: 초)
|
||||
private String cpnsSvcPssCd; // 보상서비스처리구분명[TSEAIHE02.CmpenSvcPrcssDsticName] - CompensationServiceProcessCode
|
||||
private String tmRefMsgID; // 타이머참고메시지ID - TimerReferenceMessageIdentifier
|
||||
|
||||
private String supplDelYn; //추가삭제여부[TSEAIHE02.SupplDelYn] -[Y/N]
|
||||
private String hdrCtrlDstcd; //헤더제어구분코드[TSEAIHE02.HdrCtrlDstcd] -[01/02]삭제추가/추가삭제
|
||||
private String hdrRefClsName; //참고틀래스명[TSEAIHE02.HdrRefClsName] -com.eactive.eai.common.header.PPSHeaderUtil
|
||||
|
||||
private String restOption; //REST 옵션[TSEAIHE02.restOption]
|
||||
private String timeoutCode; //REST 옵션[TSEAIHE02.timeoutCode]
|
||||
|
||||
private String[] refMsgIDs; // 입력메시지IDS[TSEAIMS02.refmsgidno] - ReferenceMessageIdentifiers
|
||||
private List<CondPerRtgInfo> condPerRtgInfo; // 조건부라우팅정보테이블 - ConditionPerRoutingInformationArragement - key-필드명, value-비교값
|
||||
|
||||
public String getBsRspCnvEn() {
|
||||
return bsRspCnvEn;
|
||||
}
|
||||
|
||||
public boolean isBsRspCnvEn() {
|
||||
return this.bsRspCnvEn.equals(YES_FLAG);
|
||||
}
|
||||
|
||||
public void setBsRspCnvEn(String bsRspCnvEn) {
|
||||
this.bsRspCnvEn = bsRspCnvEn;
|
||||
}
|
||||
|
||||
public String getBsRspCnvMsgID() {
|
||||
return bsRspCnvMsgID;
|
||||
}
|
||||
|
||||
public void setBsRspCnvMsgID(String bsRspCnvMsgID) {
|
||||
this.bsRspCnvMsgID = bsRspCnvMsgID;
|
||||
}
|
||||
|
||||
public String getBsRspMsgCprVl() {
|
||||
return bsRspMsgCprVl;
|
||||
}
|
||||
|
||||
public void setBsRspMsgCprVl(String bsRspMsgCprVl) {
|
||||
this.bsRspMsgCprVl = bsRspMsgCprVl;
|
||||
}
|
||||
|
||||
public String getCnvEn() {
|
||||
return cnvEn;
|
||||
}
|
||||
|
||||
public boolean isCnvEn() {
|
||||
return this.cnvEn.equals(YES_FLAG);
|
||||
}
|
||||
|
||||
public void setCnvEn(String cnvEn) {
|
||||
this.cnvEn = cnvEn;
|
||||
}
|
||||
|
||||
public String getCnvMsgID() {
|
||||
return cnvMsgID;
|
||||
}
|
||||
|
||||
public void setCnvMsgID(String cnvMsgID) {
|
||||
this.cnvMsgID = cnvMsgID;
|
||||
}
|
||||
|
||||
public List<CondPerRtgInfo> getCondPerRtgInfo() {
|
||||
return condPerRtgInfo;
|
||||
}
|
||||
|
||||
public boolean hasCondPerRtgInfo() {
|
||||
return (this.condPerRtgInfo != null && !this.condPerRtgInfo.isEmpty());
|
||||
}
|
||||
|
||||
public void setCondPerRtgInfo(List<CondPerRtgInfo> condPerRtgInfo) {
|
||||
this.condPerRtgInfo = condPerRtgInfo;
|
||||
}
|
||||
|
||||
public String getCpnsSvcPssCd() {
|
||||
return cpnsSvcPssCd;
|
||||
}
|
||||
|
||||
public void setCpnsSvcPssCd(String cpnsSvcPssCd) {
|
||||
this.cpnsSvcPssCd = cpnsSvcPssCd;
|
||||
}
|
||||
|
||||
public String getErrRspCnvEn() {
|
||||
return errRspCnvEn;
|
||||
}
|
||||
|
||||
public boolean isErrRspCnvEn() {
|
||||
return this.errRspCnvEn.equals(YES_FLAG);
|
||||
}
|
||||
|
||||
public void setErrRspCnvEn(String errRspCnvEn) {
|
||||
this.errRspCnvEn = errRspCnvEn;
|
||||
}
|
||||
|
||||
public String getErrRspCnvMsgID() {
|
||||
return errRspCnvMsgID;
|
||||
}
|
||||
|
||||
public void setErrRspCnvMsgID(String errRspCnvMsgID) {
|
||||
this.errRspCnvMsgID = errRspCnvMsgID;
|
||||
}
|
||||
|
||||
public String getErrRspMsgCprVl() {
|
||||
return errRspMsgCprVl;
|
||||
}
|
||||
|
||||
public void setErrRspMsgCprVl(String errRspMsgCprVl) {
|
||||
this.errRspMsgCprVl = errRspMsgCprVl;
|
||||
}
|
||||
|
||||
public String getFlOvrCls() {
|
||||
return flOvrCls;
|
||||
}
|
||||
|
||||
public boolean hasFailOver() {
|
||||
return this.flOvrCls.equals(YES_FLAG);
|
||||
}
|
||||
|
||||
public void setFlOvrCls(String flOvrCls) {
|
||||
this.flOvrCls = flOvrCls;
|
||||
}
|
||||
|
||||
public String getKeyMgtMsgVl() {
|
||||
return keyMgtMsgVl;
|
||||
}
|
||||
|
||||
public void setKeyMgtMsgVl(String keyMgtMsgVl) {
|
||||
this.keyMgtMsgVl = keyMgtMsgVl;
|
||||
}
|
||||
|
||||
public int getNxtSvcPssSeq() {
|
||||
return nxtSvcPssSeq;
|
||||
}
|
||||
|
||||
public void setNxtSvcPssSeq(int nxtSvcPssSeq) {
|
||||
this.nxtSvcPssSeq = nxtSvcPssSeq;
|
||||
}
|
||||
|
||||
public String getOutbRtnNm() {
|
||||
return outbRtnNm;
|
||||
}
|
||||
|
||||
public void setOutbRtnNm(String outbRtnNm) {
|
||||
this.outbRtnNm = outbRtnNm;
|
||||
}
|
||||
|
||||
public String getPsvBwkSysNm() {
|
||||
return psvBwkSysNm;
|
||||
}
|
||||
|
||||
public void setPsvBwkSysNm(String psvBwkSysNm) {
|
||||
this.psvBwkSysNm = psvBwkSysNm;
|
||||
}
|
||||
|
||||
public String getPsvItfTp() {
|
||||
return psvItfTp;
|
||||
}
|
||||
|
||||
public boolean isSyncItfTp() {
|
||||
return this.psvItfTp.equals(SYNC_SVC);
|
||||
}
|
||||
|
||||
public boolean isAckItfTp() {
|
||||
return this.psvItfTp.equals(ACKONLY_SVC);
|
||||
}
|
||||
|
||||
public void setPsvItfTp(String psvItfTp) {
|
||||
this.psvItfTp = psvItfTp;
|
||||
}
|
||||
|
||||
public String getPsvSysID() {
|
||||
return psvSysID;
|
||||
}
|
||||
|
||||
public void setPsvSysID(String psvSysID) {
|
||||
this.psvSysID = psvSysID;
|
||||
}
|
||||
|
||||
public String getPsvSysItfTp() {
|
||||
return psvSysItfTp;
|
||||
}
|
||||
|
||||
public void setPsvSysItfTp(String psvSysItfTp) {
|
||||
this.psvSysItfTp = psvSysItfTp;
|
||||
}
|
||||
|
||||
public String getPsvSysSvcCd() {
|
||||
return psvSysSvcCd;
|
||||
}
|
||||
|
||||
public void setPsvSysSvcCd(String psvSysSvcCd) {
|
||||
this.psvSysSvcCd = psvSysSvcCd;
|
||||
}
|
||||
|
||||
public String[] getRefMsgIDs() {
|
||||
return refMsgIDs;
|
||||
}
|
||||
|
||||
public void setRefMsgIDs(String[] refMsgIDs) {
|
||||
this.refMsgIDs = refMsgIDs;
|
||||
}
|
||||
|
||||
public String getRspMsgRefID() {
|
||||
return rspMsgRefID;
|
||||
}
|
||||
|
||||
public void setRspMsgRefID(String rspMsgRefID) {
|
||||
this.rspMsgRefID = rspMsgRefID;
|
||||
}
|
||||
|
||||
public int getTmoVl() {
|
||||
return tmoVl;
|
||||
}
|
||||
|
||||
public boolean hasTimeOut() {
|
||||
return (this.tmoVl > 0);
|
||||
}
|
||||
|
||||
public void setTmoVl(int tmoVl) {
|
||||
this.tmoVl = tmoVl;
|
||||
}
|
||||
|
||||
public String getTmRefMsgID() {
|
||||
return tmRefMsgID;
|
||||
}
|
||||
|
||||
public void setTmRefMsgID(String tmRefMsgID) {
|
||||
this.tmRefMsgID = tmRefMsgID;
|
||||
}
|
||||
|
||||
public String getEAISvcCd() {
|
||||
return eAISvcCd;
|
||||
}
|
||||
|
||||
public void setEAISvcCd(String svcCd) {
|
||||
eAISvcCd = svcCd;
|
||||
}
|
||||
|
||||
public int getSvcPssSeq() {
|
||||
return svcPssSeq;
|
||||
}
|
||||
|
||||
public void setSvcPssSeq(int seq) {
|
||||
svcPssSeq = seq;
|
||||
}
|
||||
|
||||
public String getHdrCtrlDstcd() {
|
||||
return hdrCtrlDstcd;
|
||||
}
|
||||
|
||||
public void setHdrCtrlDstcd(String hdrCtrlDstcd) {
|
||||
this.hdrCtrlDstcd = hdrCtrlDstcd;
|
||||
}
|
||||
|
||||
public String getHdrRefClsName() {
|
||||
return hdrRefClsName;
|
||||
}
|
||||
|
||||
public void setHdrRefClsName(String hdrRefClsName) {
|
||||
this.hdrRefClsName = hdrRefClsName;
|
||||
}
|
||||
|
||||
public String getSupplDelYn() {
|
||||
return supplDelYn;
|
||||
}
|
||||
|
||||
public void setSupplDelYn(String supplDelYn) {
|
||||
this.supplDelYn = supplDelYn;
|
||||
}
|
||||
|
||||
public String getRestOption() {
|
||||
return restOption;
|
||||
}
|
||||
|
||||
public void setRestOption(String restOption) {
|
||||
this.restOption = restOption;
|
||||
}
|
||||
|
||||
public String getTimeoutCode() {
|
||||
return timeoutCode;
|
||||
}
|
||||
|
||||
public void setTimeoutCode(String timeoutCode) {
|
||||
this.timeoutCode = timeoutCode;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.eactive.eai.common.message.mapper;
|
||||
|
||||
import org.mapstruct.InheritInverseConfiguration;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
|
||||
import com.eactive.eai.common.message.CondPerRtgInfo;
|
||||
import com.eactive.eai.data.entity.onl.message.CondPerRtgInfoEntity;
|
||||
import com.eactive.eai.data.mapper.BaseMapperConfig;
|
||||
import com.eactive.eai.data.mapper.GenericMapper;
|
||||
|
||||
@Mapper(config = BaseMapperConfig.class)
|
||||
public interface CondPerRtgInfoMapper extends GenericMapper<CondPerRtgInfo, CondPerRtgInfoEntity> {
|
||||
@Mapping(source = "cmprctnt", target = "ruleCprTxt")
|
||||
@Mapping(source = "rsultprcssno", target = "rsultPrcssNo")
|
||||
@Mapping(source = "rulefldgroupname", target = "ruleGrpNm")
|
||||
@Mapping(source = "rulefldname", target = "ruleColNm")
|
||||
|
||||
@Override
|
||||
CondPerRtgInfo toVo(CondPerRtgInfoEntity entity);
|
||||
|
||||
@InheritInverseConfiguration
|
||||
CondPerRtgInfoEntity toEntity(CondPerRtgInfo vo);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.eactive.eai.common.message.mapper;
|
||||
|
||||
import org.mapstruct.InheritInverseConfiguration;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
|
||||
import com.eactive.eai.common.message.EAIMessage;
|
||||
import com.eactive.eai.data.entity.onl.message.EAIMessageEntity;
|
||||
import com.eactive.eai.data.mapper.BaseMapperConfig;
|
||||
import com.eactive.eai.data.mapper.GenericMapper;
|
||||
|
||||
@Mapper(config = BaseMapperConfig.class, uses = ServiceMessageMapper.class)
|
||||
public interface EAIMessageMapper extends GenericMapper<EAIMessage, EAIMessageEntity> {
|
||||
|
||||
@Mapping(source = "eaisvcname", target = "EAISvcCd")
|
||||
@Mapping(source = "eaibzwkdstcd", target = "bwkCls")
|
||||
@Mapping(source = "svchmseonot", target = "svcTmEn")
|
||||
@Mapping(source = "svcmotivusedstcd", target = "svcTsmtUsgTp")
|
||||
@Mapping(source = "svcprcesdsticname", target = "svcPssTp")
|
||||
@Mapping(source = "flowctrlroutname", target = "flwCntlRtnNm")
|
||||
@Mapping(source = "intgradsticname", target = "unifTp")
|
||||
@Mapping(source = "svcbfclmnlogyn", target = "svcWlColLogYn")
|
||||
@Mapping(source = "gstatsysadptrbzwkgroupname", target = "sngSysItfTp")
|
||||
@Mapping(source = "sevrloglvelno", target = "svrLogLvl")
|
||||
@Mapping(source = "svcloglvelno", target = "svcLogLvl")
|
||||
@Mapping(source = "erreaisvcname", target = "errEAISvcName")
|
||||
@Mapping(source = "dmnderrchngidname", target = "dmndErrChngIDName")
|
||||
@Mapping(source = "dmnderrfldname", target = "dmndErrFldName")
|
||||
@Mapping(source = "rspnserrchngidname", target = "rspnsErrChngIDName")
|
||||
@Mapping(source = "rspnserrfldname", target = "rspnsErrFldName")
|
||||
@Mapping(source = "eaisvcdesc", target = "EAISvcDesc")
|
||||
@Mapping(source = "eaisevrdstcd", target = "sevrDstcd")
|
||||
@Mapping(source = "eaigroupcocd", target = "groupCoCd")
|
||||
@Mapping(source = "trantype", target = "tranType")
|
||||
@Mapping(source = "useyn", target = "useYn")
|
||||
@Mapping(source = "txid", target = "txId")
|
||||
@Mapping(source = "refkey", target = "refKey")
|
||||
@Mapping(source = "extbizcd", target = "extBizCd")
|
||||
@Mapping(source = "internalexternaldvcd", target = "internalExternalDvcd")
|
||||
@Mapping(source = "apienabledyn", target = "apiEnabledYn")
|
||||
@Mapping(source = "authtype", target = "authType")
|
||||
@Mapping(source = "serviceMessages", target = "svcMsgs")
|
||||
@Mapping(source = "apicacheyn", target = "apiCacheYn")
|
||||
@Mapping(source = "apicachetype", target = "apiCacheType")
|
||||
@Mapping(source = "authcheckdyn", target = "authCheckdYn")
|
||||
@Override
|
||||
EAIMessage toVo(EAIMessageEntity entity);
|
||||
|
||||
@InheritInverseConfiguration
|
||||
EAIMessageEntity toEntity(EAIMessage vo);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.eactive.eai.common.message.mapper;
|
||||
|
||||
import org.mapstruct.InheritInverseConfiguration;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
|
||||
import com.eactive.eai.common.message.ServiceMessage;
|
||||
import com.eactive.eai.data.entity.onl.message.EAIReferenceMessage;
|
||||
import com.eactive.eai.data.mapper.BaseMapperConfig;
|
||||
import com.eactive.eai.data.mapper.GenericMapper;
|
||||
|
||||
@Mapper(config = BaseMapperConfig.class)
|
||||
public interface EAIReferenceMessageMapper extends GenericMapper<ServiceMessage, EAIReferenceMessage> {
|
||||
@Mapping(source = "id.eaisvcname", target = "EAISvcCd")
|
||||
@Mapping(source = "id.svcprcssno", target = "svcPssSeq")
|
||||
@Mapping(target = "id.refmsgidno", expression = "java(mapRefMsgIDsToRefMsgIdNo(vo.getRefMsgIDs())")
|
||||
@Override
|
||||
ServiceMessage toVo(EAIReferenceMessage entity);
|
||||
|
||||
@InheritInverseConfiguration
|
||||
EAIReferenceMessage toEntity(ServiceMessage vo);
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.eactive.eai.common.message.mapper;
|
||||
|
||||
import org.mapstruct.InheritInverseConfiguration;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
|
||||
import com.eactive.eai.common.message.ServiceMessage;
|
||||
import com.eactive.eai.data.entity.onl.message.ServiceMessageEntity;
|
||||
import com.eactive.eai.data.mapper.BaseMapperConfig;
|
||||
import com.eactive.eai.data.mapper.GenericMapper;
|
||||
|
||||
@Mapper(config = BaseMapperConfig.class, uses = EAIReferenceMessageMapper.class)
|
||||
public interface ServiceMessageMapper extends GenericMapper<ServiceMessage, ServiceMessageEntity> {
|
||||
@Mapping(source = "id.eaisvcname", target = "EAISvcCd")
|
||||
@Mapping(source = "id.svcprcssno", target = "svcPssSeq")
|
||||
@Mapping(source = "psvintfacdsticname", target = "psvItfTp")
|
||||
@Mapping(source = "psvsysbzwkdstcd", target = "psvBwkSysNm")
|
||||
@Mapping(source = "psvsysidname", target = "psvSysID")
|
||||
@Mapping(source = "psvsyssvcdsticname", target = "psvSysSvcCd")
|
||||
@Mapping(source = "psvsysadptrbzwkgroupname", target = "psvSysItfTp")
|
||||
@Mapping(source = "flovryn", target = "flOvrCls")
|
||||
@Mapping(source = "chngeonot", target = "cnvEn")
|
||||
@Mapping(source = "chngmsgidname", target = "cnvMsgID")
|
||||
@Mapping(source = "bascrspnsmsgcmprctnt", target = "bsRspMsgCprVl")
|
||||
@Mapping(source = "bascrspnschngeonot", target = "bsRspCnvEn")
|
||||
@Mapping(source = "bascrspnschngmsgidname", target = "bsRspCnvMsgID")
|
||||
@Mapping(source = "errrspnsmsgcmprctnt", target = "errRspMsgCprVl")
|
||||
@Mapping(source = "errrspnschngeonot", target = "errRspCnvEn")
|
||||
@Mapping(source = "errrspnschngmsgidname", target = "errRspCnvMsgID")
|
||||
@Mapping(source = "nextsvcprcssno", target = "nxtSvcPssSeq")
|
||||
@Mapping(source = "outbndroutname", target = "outbRtnNm")
|
||||
@Mapping(source = "toutval", target = "tmoVl")
|
||||
@Mapping(source = "cmpensvcprcssdsticname", target = "cpnsSvcPssCd")
|
||||
@Mapping(source = "suppldelyn", target = "supplDelYn")
|
||||
@Mapping(source = "hdrctrldstcd", target = "hdrCtrlDstcd")
|
||||
@Mapping(source = "hdrrefclsname", target = "hdrRefClsName")
|
||||
@Mapping(source = "restoption", target = "restOption")
|
||||
@Mapping(source = "timeoutcode", target = "timeoutCode")
|
||||
@Override
|
||||
ServiceMessage toVo(ServiceMessageEntity entity);
|
||||
|
||||
@InheritInverseConfiguration
|
||||
@Override
|
||||
ServiceMessageEntity toEntity(ServiceMessage vo);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user