Class IBANBICPlugin

java.lang.Object
org.imixs.workflow.engine.plugins.AbstractPlugin
org.imixs.workflow.sepa.plugins.IBANBICPlugin
All Implemented Interfaces:
org.imixs.workflow.Plugin

public class IBANBICPlugin extends org.imixs.workflow.engine.plugins.AbstractPlugin
The IBANBICPlugin validates the items dbtr.iban, dbtr.bic, cdtr.iban and cdtr.bic.

Validation is skipped in case no data is provided.

For validation we use the open source library 'iban4j'

Note: In some cases the IBAN/BIC is provided on a external invoice with spaces at positions which are strictly not allowed. For example a space between the country and the first to digits 'DE 99'. We accept those settings by removing all spaces before validation. You can disable this behaviour by setting the property sepa.validation.strict=true.

Version:
1.0
Author:
rsoika
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String[]
     
    static final String
     
    static final String[]
     
    static final String[]
     
    static final String
     

    Fields inherited from class org.imixs.workflow.engine.plugins.AbstractPlugin

    INVALID_ITEMVALUE_FORMAT, INVALID_PROPERTYVALUE_FORMAT
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.imixs.workflow.ItemCollection
    run(org.imixs.workflow.ItemCollection workitem, org.imixs.workflow.ItemCollection event)
    Validates the items dbtr.iban, dbtr.bic, cdtr.iban and cdtr.bic.
    void
    setSepaValidationStrict(boolean sepaValidationStrict)
     
    void
    validateBIC(org.imixs.workflow.ItemCollection workitem, String... itemNames)
    This method validates an bic item.
    void
    validateIBAN(org.imixs.workflow.ItemCollection workitem, String... itemNames)
    This method validates an iban item.

    Methods inherited from class org.imixs.workflow.engine.plugins.AbstractPlugin

    close, getCtx, getWorkflowService, init, mergeFieldList, uniqueList

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ERROR_INVALID_IBANBIC

      public static final String ERROR_INVALID_IBANBIC
      See Also:
    • SEPA_VALIDATION_STRICT

      public static final String SEPA_VALIDATION_STRICT
      See Also:
    • IBAN_BIC_ITEMS

      public static final String[] IBAN_BIC_ITEMS
    • IBAN_ITEMS

      public static final String[] IBAN_ITEMS
    • BIC_ITEMS

      public static final String[] BIC_ITEMS
  • Constructor Details

    • IBANBICPlugin

      public IBANBICPlugin()
  • Method Details

    • run

      public org.imixs.workflow.ItemCollection run(org.imixs.workflow.ItemCollection workitem, org.imixs.workflow.ItemCollection event) throws org.imixs.workflow.exceptions.PluginException
      Validates the items dbtr.iban, dbtr.bic, cdtr.iban and cdtr.bic. If the input is not valid the method throws a PluginException

      If the event result provides the tag

      <validation name="required">false</validation>

      the validation will be scipped

      Throws:
      org.imixs.workflow.exceptions.PluginException - - if invalid iban/bic
    • setSepaValidationStrict

      public void setSepaValidationStrict(boolean sepaValidationStrict)
    • validateIBAN

      public void validateIBAN(org.imixs.workflow.ItemCollection workitem, String... itemNames)
      This method validates an iban item.

      The method supports formated IBAN input as well as normal IBAN (without spaces)

      Parameters:
      workitem -
      itemName -
      Throws:
      org.imixs.workflow.exceptions.PluginException
    • validateBIC

      public void validateBIC(org.imixs.workflow.ItemCollection workitem, String... itemNames)
      This method validates an bic item.

      Parameters:
      workitem -
      itemName -
      Throws:
      org.imixs.workflow.exceptions.PluginException