package com.eactive.eai.rms.bat.web.eims.xml;

import java.util.HashMap;

import com.eactive.eai.rms.bat.web.eims.EIMSBatConstants;

public class InterfaceXml {

	
	private String appCd		   ;//업무코드
	private String authorId		;
	private String batchType		;//배치 종류(DB:DBtoDB, File:FileToFile)
	private String infDesc			;
	private String infDstCd		; //inf 구분(대내:IN, 대외:OUT)
	private String infId			;//inf ID
	private String inftName		;//inf 명
	
	private String pollingCycle	;//스케쥴 주기
	private String pollingEndTime ;//스케쥴 종료시간
	private String pollingStrTime ;//스케쥴 시작시간
	private String runType			;//스케쥴 종류(E:이벤트,S:스케쥴)
	private String trnsmsnCycle	;
	
	
	
	public String getAppCd() {
		return appCd;
	}
	public void setAppCd(String appCd) {
		this.appCd = appCd;
	}
	public String getAuthorId() {
		return authorId;
	}
	public void setAuthorId(String authorId) {
		this.authorId = authorId;
	}
	public String getBatchType() {
		return batchType;
	}
	public void setBatchType(String batchType) {
		this.batchType = batchType;
	}
	public String getInfDesc() {
		return infDesc;
	}
	public void setInfDesc(String infDesc) {
		this.infDesc = infDesc;
	}
	public String getInfDstCd() {
		return infDstCd;
	}
	public void setInfDstCd(String infDstCd) {
		this.infDstCd = infDstCd;
	}
	public String getInfId() {
		return infId;
	}
	public void setInfId(String infId) {
		this.infId = infId;
	}
	public String getInftName() {
		return inftName;
	}
	public void setInftName(String inftName) {
		this.inftName = inftName;
	}
	public String getPollingCycle() {
		return pollingCycle;
	}
	public void setPollingCycle(String pollingCycle) {
		this.pollingCycle = pollingCycle;
	}
	public String getPollingEndTime() {
		return pollingEndTime;
	}
	public void setPollingEndTime(String pollingEndTime) {
		this.pollingEndTime = pollingEndTime;
	}
	public String getPollingStrTime() {
		return pollingStrTime;
	}
	public void setPollingStrTime(String pollingStrTime) {
		this.pollingStrTime = pollingStrTime;
	}
	public String getRunType() {
		return runType;
	}
	public void setRunType(String runType) {
		this.runType = runType;
	}
	public String getTrnsmsnCycle() {
		return trnsmsnCycle;
	}
	public void setTrnsmsnCycle(String trnsmsnCycle) {
		this.trnsmsnCycle = trnsmsnCycle;
	}
	
	/**
	 * 
	 * @param infXmlMap
	 */
	public void setAllInfXml(HashMap<String,String> infXmlMap) {
		
		this.setInfDstCd(infXmlMap.get(EIMSBatConstants.INFDSTCD ));
		this.setInfId(infXmlMap.get(EIMSBatConstants.INTFID ));
		this.setInftName(infXmlMap.get(EIMSBatConstants.INTFNAME ));
		this.setInfDesc(infXmlMap.get(EIMSBatConstants.INTFDESC ));
		this.setAppCd(infXmlMap.get(EIMSBatConstants.APPCD ));
		this.setAuthorId(infXmlMap.get(EIMSBatConstants.AUTHORID ));
		
		if( infXmlMap.get(EIMSBatConstants.BATCHTYPE ).equals("DB") ) {
			this.setBatchType("DD");
		}
		else if( infXmlMap.get(EIMSBatConstants.BATCHTYPE ).equals("File") ) {
			this.setBatchType("FF");
		}
		
		this.setRunType(infXmlMap.get(EIMSBatConstants.RUNTYPE ));//E:이벤트 , S:스케쥴
		
		this.setTrnsmsnCycle(infXmlMap.get(EIMSBatConstants.TRNSMSNCYCLE ));
		this.setPollingCycle(infXmlMap.get(EIMSBatConstants.POLLINGCYCLE ));
		this.setPollingStrTime(infXmlMap.get(EIMSBatConstants.POLLINGSTRTIME ));
		this.setPollingEndTime(infXmlMap.get(EIMSBatConstants.POLLINGENDTIME ));
		
	}
	
}
