54 lines
1.6 KiB
Java
54 lines
1.6 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"),
|
|
SICOOB_240_Envio("756", false, "/layouts/LayoutSicoobCNAB240Envio.txg.xml"),
|
|
SANTANDER_400_Envio("033", false, "/layouts/LayoutSantanderCNAB400Envio.txg.xml"),
|
|
MERCANTIL_400_Envio("389", false, "/layouts/LayoutMercantilCNAB400Envio.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, ""),
|
|
CAIXA_400_Envio("104", false, "/layouts/LayoutCaixaCNAB400Envio.txg.xml");
|
|
|
|
private BancoLayout(String codBanco, boolean retorno, String path) {
|
|
this.codBanco = codBanco;
|
|
this.retorno = retorno;
|
|
this.path = path;
|
|
}
|
|
|
|
private String codBanco;
|
|
private boolean retorno;
|
|
private String path;
|
|
|
|
public String getCodBanco() {
|
|
return codBanco;
|
|
}
|
|
|
|
public boolean isRetorno() {
|
|
return retorno;
|
|
}
|
|
|
|
public String getPath() {
|
|
return path;
|
|
}
|
|
|
|
public String getTemp() {
|
|
return path.substring(path.lastIndexOf("/"));
|
|
}
|
|
|
|
public static BancoLayout getInstanceByCodBanco(String codBanco){
|
|
|
|
for(BancoLayout o : BancoLayout.values()){
|
|
|
|
if(o.getCodBanco().equals(codBanco) && !o.isRetorno()){
|
|
return o;
|
|
}
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|