package br.com.bancooriginal.cyberbank.dto;

import br.com.bancooriginal.cyberbank.enums.Ambiente;

import com.thoughtworks.xstream.annotations.XStreamAlias;

/**
 * Classe que representa uma parametrizacao possuindo todos os atributos que
 * existem no arquivo parametrizacao.xml.
 * @author filipe.sa
 *
 */
@XStreamAlias("parametrizacao")
public class Parametrizacao {

	private String userId;
	private String sessionId;
	
	private String institutionId;

	private String branchId;
	private String channelId;
	private String terminalId;
	private String parityCurrencyId;
	private String parityQuotationTypeNemotecnic;
	private String localCountryId;
	private String localCurrencyId;
	private String bankId;

	private String msgTypeId;
	private String originBranchId;
	private String dependencyId;
	
	private String ambiente;
	private String enderecoAmbienteDes;
	private String enderecoAmbienteAce;
	private String enderecoAmbienteHom;

	
	public String getInstitutionId() {
		return institutionId;
	}
	public void setInstitutionId(String institutionId) {
		this.institutionId = institutionId;
	}
	
	public String getBranchId() {
		return branchId;
	}
	public void setBranchId(String branchId) {
		this.branchId = branchId;
	}

	
	public String getChannelId() {
		return channelId;
	}
	public void setChannelId(String channelId) {
		this.channelId = channelId;
	}

	
	public String getTerminalId() {
		return terminalId;
	}
	public void setTerminalId(String terminalId) {
		this.terminalId = terminalId;
	}
	
	public String getParityCurrencyId() {
		return parityCurrencyId;
	}
	public void setParityCurrencyId(String parityCurrencyId) {
		this.parityCurrencyId = parityCurrencyId;
	}

	
	public String getParityQuotationTypeNemotecnic() {
		return parityQuotationTypeNemotecnic;
	}
	public void setParityQuotationTypeNemotecnic(String parityQuotationTypeNemotecnic) {
		this.parityQuotationTypeNemotecnic = parityQuotationTypeNemotecnic;
	}

	
	public String getLocalCountryId() {
		return localCountryId;
	}
	public void setLocalCountryId(String localCountryId) {
		this.localCountryId = localCountryId;
	}

	
	public String getLocalCurrencyId() {
		return localCurrencyId;
	}
	public void setLocalCurrencyId(String localCurrencyId) {
		this.localCurrencyId = localCurrencyId;
	}

	
	public String getBankId() {
		return bankId;
	}
	public void setBankId(String bankId) {
		this.bankId = bankId;
	}

	
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	
	public String getMsgTypeId() {
		return msgTypeId;
	}
	public void setMsgTypeId(String msgTypeId) {
		this.msgTypeId = msgTypeId;
	}

	
	public String getOriginBranchId() {
		return originBranchId;
	}
	public void setOriginBranchId(String originBranchId) {
		this.originBranchId = originBranchId;
	}

	
	public String getDependencyId() {
		return dependencyId;
	}
	public void setDependencyId(String dependencyId) {
		this.dependencyId = dependencyId;
	}
	
	public String getAmbiente() {
		return ambiente;
	}
	public void setAmbiente(String ambiente) {
		this.ambiente = ambiente;
	}
	
	public String getEnderecoAmbienteDes() {
		return enderecoAmbienteDes;
	}
	public void setEnderecoAmbienteDes(String enderecoAmbienteDes) {
		this.enderecoAmbienteDes = enderecoAmbienteDes;
	}
	
	public String getEnderecoAmbienteAce() {
		return enderecoAmbienteAce;
	}
	public void setEnderecoAmbienteAce(String enderecoAmbienteAce) {
		this.enderecoAmbienteAce = enderecoAmbienteAce;
	}
	
	public String getEnderecoAmbienteHom() {
		return enderecoAmbienteHom;
	}
	public void setEnderecoAmbienteHom(String enderecoAmbienteHom) {
		this.enderecoAmbienteHom = enderecoAmbienteHom;
	}

	public String getSessionId() {
		return sessionId;
	}
	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}

	
	public String getEndereco(){
		
		System.out.println(this.ambiente);
		System.out.println(Ambiente.DES.name());
		
		if(this.ambiente.equals(Ambiente.DES.name())){
			return this.enderecoAmbienteDes;
		}else if(this.ambiente.equals(Ambiente.ACE.name())){
			return this.enderecoAmbienteAce;
		}else if(this.ambiente.equals(Ambiente.HOM.name())){
			return this.enderecoAmbienteHom;
		}
		
		return null;
	}
}
