64 lines
1.5 KiB
Java
64 lines
1.5 KiB
Java
package com.rjconsultores.ventaboletos.enuns;
|
|
|
|
public enum BancoLayout {
|
|
|
|
BRADESCO_400_Envio("237", false, "/layouts/LayoutBradescoCNAB400Envio.txg.xml"),
|
|
ITAU_400_Envio("341", false, "/layouts/LayoutItauCNAB400Envio.txg.xml"),
|
|
BB_240_Envio("001", false, "/layouts/LayoutBBCNAB240Envio.txg.xml"),
|
|
SANTANDER_400_Envio("033", false, "/layouts/LayoutSantanderCNAB400Envio.txg.xml"),
|
|
SANTANDER_400_Retorno("033", true, "/layouts/LayoutSantanderCNAB400Retorno.txg.xml"),
|
|
BRADESCO_400_Retorno("237", true, "/layouts/LayoutBradescoCNAB400Retorno.txg.xml"),
|
|
ITAU_400_Retorno("341", true, ""),
|
|
BB_240_Retorno("001", true, "");
|
|
|
|
|
|
private BancoLayout(String codBanco, boolean retorno, String path) {
|
|
this.codBanco = codBanco;
|
|
this.retorno = retorno;
|
|
this.path = path;
|
|
this.valido = true;
|
|
}
|
|
|
|
private String codBanco;
|
|
private boolean retorno;
|
|
private String path;
|
|
private boolean valido = true;
|
|
|
|
public String getCodBanco() {
|
|
return codBanco;
|
|
}
|
|
|
|
public boolean isRetorno() {
|
|
return retorno;
|
|
}
|
|
|
|
public String getPath() {
|
|
return path;
|
|
}
|
|
|
|
public String getTemp() {
|
|
return path.substring(path.lastIndexOf("/"));
|
|
}
|
|
|
|
public boolean isValido() {
|
|
return valido;
|
|
}
|
|
|
|
public void setValido(boolean valido) {
|
|
this.valido = valido;
|
|
}
|
|
|
|
public static BancoLayout getInstanceByCodBanco(String codBanco){
|
|
|
|
for(BancoLayout o : BancoLayout.values()){
|
|
|
|
if(o.getCodBanco().equals(codBanco) && !o.isRetorno()){
|
|
return o;
|
|
}
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
}
|