package com.eactive.eai.rms.onl.manage.serviceinfo.itsm.vo;

import java.util.HashMap;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

import com.eactive.eai.rms.common.util.CommonConstants;

@XmlRootElement(name = "itsmError")
@XmlAccessorType(XmlAccessType.FIELD)
public class ItsmError {

	private String errorYms; 	// MSGDPSTYMS
	private String serverType; 	// CommonConstants.SERVER_TYPE
	private String serviceCode; // GROUP
	private String serviceType; // TYPE
	private String errorCode; 	// EAIERRCD
	private String interfaceId; // EAISVCNAME
	private String bizDstName; 	// BZWKDSTICNAME
	private String instanceName;// INSTANCENAME
	private String errorMessage;// ERRORMSG
	
	public ItsmError() { }
	
	public ItsmError(HashMap<String, String> map) {
		this.errorYms = map.get("MSGDPSTYMS");
		this.serverType = CommonConstants.SERVER_TYPE.equals(CommonConstants.DB_MANAGE_TYPE_S)? CommonConstants.DB_MANAGE_TYPE_T : CommonConstants.SERVER_TYPE;
		this.serviceCode = map.get("SERVICETYPE");
		this.serviceType = map.get("TYPE");
		this.errorCode = map.get("EAIERRCD");
		this.interfaceId = map.get("EAISVCNAME");
		this.bizDstName = map.get("BZWKDSTICNAME");
		this.instanceName = map.get("INSTANCENAME");
		this.errorMessage = map.get("ERRORMSG");
	}

	public String getServiceCode() {
		return serviceCode;
	}

	public void setServiceCode(String serviceCode) {
		this.serviceCode = serviceCode;
	}

	public String getErrorYms() {
		return errorYms;
	}

	public void setErrorYms(String errorYms) {
		this.errorYms = errorYms;
	}

	public String getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	public String getInterfaceId() {
		return interfaceId;
	}

	public void setInterfaceId(String interfaceId) {
		this.interfaceId = interfaceId;
	}

	public String getBizDstName() {
		return bizDstName;
	}

	public void setBizDstName(String bizDstName) {
		this.bizDstName = bizDstName;
	}

	public String getErrorMessage() {
		return errorMessage;
	}

	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}

	public String getInstanceName() {
		return instanceName;
	}

	public void setInstanceName(String instanceName) {
		this.instanceName = instanceName;
	}

	public String getServiceType() {
		return serviceType;
	}

	public void setServiceType(String serviceType) {
		this.serviceType = serviceType;
	}

	public String getServerType() {
		return serverType;
	}

	public void setServerType(String serverType) {
		this.serverType = serverType;
	}
	
}
