MenuTemplateIns.java 3.31 KB
package th.co.ais.ssbsrfc.instance;

import java.util.HashMap;
import java.util.LinkedList;

public class MenuTemplateIns {
	private String currentPath;
	private String xml;
	private String currentPromptId;
	private String currentOrderId;
	private String currentAPIId;
	private int type;
	private String redirectAddress = "";
	private String senderName;
	private boolean isSendResponse = false;
	
	public String getCurrentPath() {
		return currentPath;
	}
	public void setCurrentPath(String currentPath) {
		this.currentPath = currentPath;
	}
	public String getXml() {
		return xml;
	}
	public void setXml(String xml) {
		this.xml = xml;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public String getCurrentPromptId() {
		return currentPromptId;
	}
	public void setCurrentPromptId(String currentPromptId) {
		this.currentPromptId = currentPromptId;
	}
	public String getCurrentOrderId() {
		return currentOrderId;
	}
	public void setCurrentOrderId(String currentOrderId) {
		this.currentOrderId = currentOrderId;
	}
	public String getCurrentAPIId() {
		return currentAPIId;
	}
	public void setCurrentAPIId(String currentAPIId) {
		this.currentAPIId = currentAPIId;
	}
	public String getRedirectAddress() {
		return redirectAddress;
	}
	public void setRedirectAddress(String redirectAddress) {
		this.redirectAddress = redirectAddress;
	}
	public String getSenderName() {
		return senderName;
	}
	public void setSenderName(String senderName) {
		this.senderName = senderName;
	}

	// data
	private HashMap<String, String> mapXML = null;
	private LinkedList<String> linkedlistXPath = null;
	public HashMap<String, String> getMapXML() {
		if (mapXML == null) {
			mapXML = new HashMap<String, String>();
		}
		return mapXML;
	}
	public void setMapXML(HashMap<String, String> mapXML) {
		this.mapXML = mapXML;
	}
	public LinkedList<String> getLinkedlistXPath() {
		return linkedlistXPath;
	}
	public void setLinkedlistXPath(LinkedList<String> linkedlistXPath) {
		this.linkedlistXPath = linkedlistXPath;
	}
	public void pushXPath(String xpath)
	{
		if (this.linkedlistXPath == null) {
			this.linkedlistXPath = new LinkedList<String>();
		}
		this.linkedlistXPath.add(xpath);
	}
	public String popXPath()
	{
		String xpath = null;
		if (this.linkedlistXPath != null && this.linkedlistXPath.size() != 0) {
			xpath = this.linkedlistXPath.getLast();
			this.linkedlistXPath.removeLast();
		}
		
		return xpath;
	}
	public boolean isSendResponse() {
		return isSendResponse;
	}
	public void setSendResponse(boolean isSendResponse) {
		if (!this.isSendResponse) {
			this.isSendResponse = isSendResponse;
		}
	}
	
	// Prompt
	private PromptTemplateIns promptIns;

	public PromptTemplateIns getPromptIns() {
		if(promptIns == null) {
			this.promptIns = new PromptTemplateIns();
		}
		return promptIns;
	}
	public void setPromptIns(PromptTemplateIns promptIns) {
		this.promptIns = promptIns;
	}
	
	// RRR
	private RRRIns rrrIns;
	
	public RRRIns getRrrIns() {
		if(rrrIns == null) {
			this.rrrIns = new RRRIns();
		}
		return rrrIns;
	}
	public void setRrrIns(RRRIns rrrIns) {
		this.rrrIns = rrrIns;
	}
	
	// OTP Response
	private OTPResIns otpIns;

	public OTPResIns getOtpIns() {
		if(otpIns == null) {
			this.otpIns = new OTPResIns();
		}
		return otpIns;
	}
	public void setOtpIns(OTPResIns otpIns) {
		this.otpIns = otpIns;
	}
}