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 SeleniumI- the concrete implementation ofWebAccountInformation
- 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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractAccountStatementFinder(C webClient, I accountInfo) Constructs a new Finder for account statements. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddStatement(MahoeAccountStatement statementInfo, byte[] data) Creates a newKontoauszugand then a newMahoeKontoauszugPDFwith the given information.voidStart looking for new sheets based on theMetaKey.KONTOAUSZUG_INTERVAL_LASTReturn the found sheets or an empty list in case search was not yet started or nothing was found.booleanprotected abstract voidStarts the search of new account statements
-
Field Details
-
accountInfo
The Santander account info -
webClient
The webclient. needs to be initialised and logged in -
lastStatementDate
Date of last saved account statement
-
-
Constructor Details
-
AbstractAccountStatementFinder
Constructs a new Finder for account statements. Must be called from real implementations.- Parameters:
webClient-accountInfo-
-
-
Method Details
-
findStatements
Start looking for new sheets based on theMetaKey.KONTOAUSZUG_INTERVAL_LAST- Throws:
WebSiteException
-
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 newKontoauszugand then a newMahoeKontoauszugPDFwith the given information. Finally it is added to the internal account statement list.- Parameters:
statementInfo- the basic information about the statementdata- the PDF as byte[]- Throws:
RemoteException- in case theKontoauszugcould not be created.
-
startSearch
Starts the search of new account statements- Throws:
WebSiteException
-