Class AbstractAccountStatementFinder<C,I extends WebAccountInformation>

java.lang.Object
de.frankmuenster.mahoe.statements.AbstractAccountStatementFinder<C,I>
Type Parameters:
C - the web client either WebClient from HTMLUnit or WebDriver from Selenium
I - the concrete implementation of WebAccountInformation
Direct Known Subclasses:
BosAccountStatementFinder, SantanderAccountStatementFinder, TargoBankAccountStatementFinder

public abstract class AbstractAccountStatementFinder<C,I extends WebAccountInformation> extends Object
The abstract class for statement finders. Must be extended by bank specific implementations. *
Author:
Frank Münster
  • Field Details

    • accountInfo

      protected final I extends WebAccountInformation accountInfo
      The Santander account info
    • webClient

      protected final C webClient
      The webclient. needs to be initialised and logged in
    • lastStatementDate

      protected final Date lastStatementDate
      Date of last saved account statement
  • Constructor Details

    • AbstractAccountStatementFinder

      public AbstractAccountStatementFinder(C webClient, I accountInfo)
      Constructs a new Finder for account statements. Must be called from real implementations.
      Parameters:
      webClient -
      accountInfo -
  • Method Details

    • findStatements

      public void findStatements() throws WebSiteException
      Start looking for new sheets based on the MetaKey.KONTOAUSZUG_INTERVAL_LAST
      Throws:
      WebSiteException
    • getSheets

      public List<MahoeKontoauszugPDF> getSheets()
      Return the found sheets or an empty list in case search was not yet started or nothing was found.
      Returns:
      the list with MahoeKontoauszugPDF
    • isSearchExecuted

      public boolean isSearchExecuted()
      Returns:
      the searchExecuted
    • addStatement

      protected void addStatement(MahoeAccountStatement statementInfo, byte[] data) throws RemoteException
      Creates a new Kontoauszug and then a new MahoeKontoauszugPDF with the given information. Finally it is added to the internal account statement list.
      Parameters:
      statementInfo - the basic information about the statement
      data - the PDF as byte[]
      Throws:
      RemoteException - in case the Kontoauszug could not be created.
    • startSearch

      protected abstract void startSearch() throws WebSiteException
      Starts the search of new account statements
      Throws:
      WebSiteException