Interface BankStatementLoaderInterface

  • All Known Implementing Classes:
    OFXFileBankStatementLoader

    public interface BankStatementLoaderInterface
    Interface to be implemented by bank statement loader classes Bank statement loader classes that extend this interface can be loaded by the MBankStatementLoader controller class. The usage patter looks like this: -init() is called in order to initialize the loader -validate() is called, allowing the loader to perform data validation if it provides this. -loadLines() is called, request the loader to start loading statement lines -for every statement line that the loader encounters, it calls the saveLine() method of the MBankStatement controller object it obtained as part of the call to init() -The MBankStatementLoader controller object can now obtain the data for the current bank statement line by using the corresponding get methods of the loader class.
    Version:
    $Id: BankStatementLoaderInterface.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
    Author:
    Maarten Klinker, Eldir Tomassen
    • Method Detail

      • init

        boolean init​(MBankStatementLoader controller)
        Initialize the loader
        Parameters:
        controller - Reference to the MBankStatementLoader controller object
        Returns:
        Initialized successfully
      • isValid

        boolean isValid()
        Verify whether the data to be imported is valid
        Returns:
        Data is valid If the actual loaders does not do any validity checks it will just return true.
      • loadLines

        boolean loadLines()
        Start importing statement lines
        Returns:
        Statement lines imported successfully
      • getLastErrorMessage

        String getLastErrorMessage()
        Return the most recent error
        Returns:
        Error message This error message will be handled as a ADempiere message, (e.g. it can be translated)
      • getLastErrorDescription

        String getLastErrorDescription()
        Return the most recent error description
        Returns:
        Error description This is an additional error description, it can be used to provided descriptive information, such as a file name or SQL error, that can not be translated by the ADempiere message system.
      • getDateLastRun

        Timestamp getDateLastRun()
        The last time this loader aquired bank statement data. For OFX this is the value. This is generally only available\ after loadLines() has been called. If a specific loader class does not provided this information it is allowed to return null
        Returns:
        Date last run
      • getRoutingNo

        String getRoutingNo()
        The routing number of the bank account for the statement line.
        Returns:
        Routing number
      • getBankAccountNo

        String getBankAccountNo()
        The account number of the bank account for the statement line.
        Returns:
        Bank account number
      • getIBAN

        String getIBAN()
        The IBAN of the bank account for the statement line.
        Returns:
        IBAN
      • getStatementReference

        String getStatementReference()
        Additional reference information Statement level reference information. If a specific loader class does not provided this, it is allowed to return null.
        Returns:
        Statement Reference
      • getStatementDate

        Timestamp getStatementDate()
        Statement Date Date of the bank statement. If a specific loader does not provide this, it is allowed to return null.
        Returns:
        Statement Date
      • getTrxID

        String getTrxID()
        Transaction ID assigned by the bank. For OFX this is the If a specific loader does not provide this, it is allowed to return null.
        Returns:
        Transaction ID
      • getReference

        String getReference()
        Additional reference information Statement line level reference information. For OFX this is the field. If a specific loader does not provided this, it is allowed to return null.
        Returns:
        Reference
      • getCheckNo

        String getCheckNo()
        Check number Check number, in case the transaction was initiated by a check. For OFX this is the field, for MS-Money (OFC) this is the field. If a specific loader does not provide this, it is allowed to return null.
        Returns:
        Transaction reference
      • getPayeeName

        String getPayeeName()
        Payee name Name information, for OFX this is the or field If a specific loader class does not provide this, it is allowed to return null.
        Returns:
        Payee name
      • getPayeeAccountNo

        String getPayeeAccountNo()
        Payee account Account information of "the other party" If a specific loader class does not provide this, it is allowed to return null.
        Returns:
        Payee bank account number
      • getStatementLineDate

        Timestamp getStatementLineDate()
        Statement line date This has to be provided by all loader classes.
        Returns:
        Statement line date
      • getValutaDate

        Timestamp getValutaDate()
        Effective date Date at the funds became available. If a specific loader does not provide this, it is allowed to return null.
        Returns:
        Effective date
      • getTrxType

        String getTrxType()
        Transaction type
        Returns:
        Transaction type This returns the transaction type as used by the bank Whether a transaction is credit or debit depends on the amount (i.e. negative), this field is for reference only. If a specific loader class does not provide this, it is allowed to return null.
      • getIsReversal

        boolean getIsReversal()
        Indicates whether this transaction is a reversal
        Returns:
        true if this is a reversal
      • getCurrency

        String getCurrency()
        Currency
        Returns:
        Currency Return the currency, if included in the statement data. It is returned as it appears in the import data, it should not be processed by the loader in any way. If a specific loader class does not provide this, it is allowed to return null.
      • getStmtAmt

        BigDecimal getStmtAmt()
        Statement line amount
        Returns:
        Statement Line Amount This has to be provided by all loader classes.
      • getTrxAmt

        BigDecimal getTrxAmt()
        Transaction Amount
        Returns:
        Transaction Amount
      • getInterestAmt

        BigDecimal getInterestAmt()
        Interest Amount
        Returns:
        Interest Amount
      • getMemo

        String getMemo()
        Transaction memo
        Returns:
        Memo Additional descriptive information. For OFX this is the filed, for SWIFT MT940 this is the "86" line. If a specific loader does not provide this, it is allowed to return null.
      • getChargeName

        String getChargeName()
        Charge name
        Returns:
        Charge name Name of the charge, in case this transaction is a bank charge. If a specific loader class does not provide this, it is allowed to return null.
      • getChargeAmt

        BigDecimal getChargeAmt()
        Charge amount
        Returns:
        Charge amount Name of the charge, in case this transaction is a bank charge. If a specific loader class does not provide this, it is allowed to return null.