org.jrimum.bopepo.view.BoletoInfoViewCaixaSIGCB Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bpp-cobranca Show documentation
Show all versions of bpp-cobranca Show documentation
This is a fork and merge from JRimum ( http://www.jrimum.org ),
- Bopepo: https://github.com/jrimum/bopepo
- Texgit: https://github.com/jrimum/texgit
- Valia: https://github.com/jrimum/vallia
- Utilix: https://github.com/jrimum/utilix
- Domkee: https://github.com/jrimum/domkee
For Brazillian Boleto Payment Method. So much thanks for original authors:
Gilmar P. S. L, Misael Barreto and Rômulo Augusto.
The newest version!
package org.jrimum.bopepo.view;
import static org.apache.commons.lang3.StringUtils.isBlank;
import org.jrimum.bopepo.Boleto;
import org.jrimum.bopepo.view.ResourceBundle;
import org.jrimum.bopepo.view.AbstractBoletoInfoCampoView;
/**
* View para o convênio SIGCB da CAIXA.
*
* @author Rômulo Augusto
*/
public class BoletoInfoViewCaixaSIGCB extends AbstractBoletoInfoCampoView {
private static final String EMISSAO_BENEFICIARIO = "4";
public BoletoInfoViewCaixaSIGCB(ResourceBundle resourceBundle, Boleto boleto) {
super(resourceBundle, boleto);
}
@Override
public String getTextoFcNossoNumero() {
return getBoleto().getTitulo().getContaBancaria().getCarteira().getCodigo()
+ EMISSAO_BENEFICIARIO
+ super.getTextoFcNossoNumero();
}
@Override
public String getTextoFcCarteira() {
return (getBoleto().getTitulo().getContaBancaria().getCarteira().isComRegistro()) ? "RG" : "SR";
}
@Override
public String getTextoFcLocalPagamento() {
String textoFcLocalPagamento = super.getTextoFcLocalPagamento();
return isBlank(textoFcLocalPagamento) ? "PREFERENCIALMENTE NAS CASAS LOTÉRICAS ATÉ O VALOR LIMITE" : textoFcLocalPagamento;
}
}