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 java.lang.Object
The abstract class for statement finders. Must be extended by bank specific implementations. *- Author:
- Frank Münster
-
-
Field Summary
Fields Modifier and Type Field Description protected I
accountInfo
The Santander account infoprotected java.util.Date
lastStatementDate
Date of last saved account statementprotected C
webClient
The webclient. needs to be initialised and logged in
-
Constructor Summary
Constructors Constructor Description AbstractAccountStatementFinder(C webClient, I accountInfo)
Constructs a new Finder for account statements.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addStatement(MahoeAccountStatement statementInfo, byte[] data)
Creates a newKontoauszug
and then a newMahoeKontoauszugPDF
with the given information.void
findStatements()
Start looking for new sheets based on theMetaKey.KONTOAUSZUG_INTERVAL_LAST
java.util.List<MahoeKontoauszugPDF>
getSheets()
Return the found sheets or an empty list in case search was not yet started or nothing was found.boolean
isSearchExecuted()
protected abstract void
startSearch()
Starts the search of new account statements
-
-
-
Field Detail
-
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 java.util.Date lastStatementDate
Date of last saved account statement
-
-
Method Detail
-
findStatements
public void findStatements() throws WebSiteException
Start looking for new sheets based on theMetaKey.KONTOAUSZUG_INTERVAL_LAST
- Throws:
WebSiteException
-
getSheets
public java.util.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 java.rmi.RemoteException
Creates a newKontoauszug
and then a newMahoeKontoauszugPDF
with 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:
java.rmi.RemoteException
- in case theKontoauszug
could not be created.
-
startSearch
protected abstract void startSearch() throws WebSiteException
Starts the search of new account statements- Throws:
WebSiteException
-
-