Example usage for org.apache.commons.validator.routines.checkdigit IBANCheckDigit IBANCheckDigit

List of usage examples for org.apache.commons.validator.routines.checkdigit IBANCheckDigit IBANCheckDigit

Introduction

In this page you can find the example usage for org.apache.commons.validator.routines.checkdigit IBANCheckDigit IBANCheckDigit.

Prototype

public IBANCheckDigit() 

Source Link

Document

Construct Check Digit routine for IBAN Numbers.

Usage

From source file:be.fgov.minfin.webForm.backing.MasterCdcbean.java

public void checkDigit(FacesContext context, UIComponent component, Object value) throws ValidatorException {
    Application app = FacesContext.getCurrentInstance().getApplication();
    ResourceBundle bundle = app.getResourceBundle(FacesContext.getCurrentInstance(), "CdcMessages");
    IBANCheckDigit ibancheck = new IBANCheckDigit();
    String numComptAValider1 = (String) value;
    String numComptAValider = numComptAValider1.replaceAll(" ", "").trim();
    if (ibancheck.isValid(numComptAValider) == false) {
        throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
                bundle.getString("liquiacte.numcompte.error"), ""));
    }//w  ww . j ava 2  s  . co m
}

From source file:be.fgov.minfin.webForm.backing.SqueezeCdcBean.java

public void checkDigit(FacesContext context, UIComponent component, Object value) throws ValidatorException {
    Application app = FacesContext.getCurrentInstance().getApplication();
    ResourceBundle bundle = app.getResourceBundle(FacesContext.getCurrentInstance(), "CdcMessages");
    IBANCheckDigit ibancheck = new IBANCheckDigit();
    String numComptAValider = (String) value;
    if (ibancheck.isValid(numComptAValider) == false) {
        throw new ValidatorException(
                new FacesMessage(FacesMessage.SEVERITY_ERROR, bundle.getString("squeeze.numcompte.error"), ""));
    }//from w w  w. j  a  v a 2s  .c om
}

From source file:be.fgov.minfin.webForm.backing.DeposInvoCdcBean.java

public void checkDigit(FacesContext context, UIComponent component, Object value) throws ValidatorException {
    Application app = FacesContext.getCurrentInstance().getApplication();
    ResourceBundle bundle = app.getResourceBundle(FacesContext.getCurrentInstance(), "CdcMessages");
    IBANCheckDigit ibancheck = new IBANCheckDigit();
    String numComptAValider = (String) value;
    if (ibancheck.isValid(numComptAValider) == false) {
        throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
                bundle.getString("deposInvo.numcompte.error"), ""));
    }/*w w  w  . j av a2s  .co  m*/
}

From source file:be.fgov.minfin.webForm.backing.FondsDetCdcBean.java

public void checkDigit(FacesContext context, UIComponent component, Object value) throws ValidatorException {
    Application app = FacesContext.getCurrentInstance().getApplication();
    ResourceBundle bundle = app.getResourceBundle(FacesContext.getCurrentInstance(), "CdcMessages");
    IBANCheckDigit ibancheck = new IBANCheckDigit();
    String numComptAValider = (String) value;
    if (ibancheck.isValid(numComptAValider) == false) {
        throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
                bundle.getString("liquiacte.numcompte.error"), ""));
    }// w  w  w  .  j  av a 2  s.  c om
}

From source file:be.fgov.minfin.webForm.backing.LiquidationClotureCdcBean.java

public void checkDigit(FacesContext context, UIComponent component, Object value) throws ValidatorException {
    Application app = FacesContext.getCurrentInstance().getApplication();
    ResourceBundle bundle = app.getResourceBundle(FacesContext.getCurrentInstance(), "CdcMessages");
    IBANCheckDigit ibancheck = new IBANCheckDigit();
    String numComptAValider = (String) value;
    if (ibancheck.isValid(numComptAValider) == false) {
        throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
                bundle.getString("clotureliqui.numcompte.valid"), ""));
    }//from   w  w  w.  ja va 2  s . com
}