Class EbicsClient
java.lang.Object
org.kopi.ebics.client.EbicsClient
The ebics client application. Performs necessary tasks to contact the ebics
bank server like sending the INI, HIA and HPB requests for keys retrieval and
also performs the files transfer including uploads and downloads.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionEbicsClient(Configuration configuration, EbicsClient.ConfigProperties properties) Constructs a new ebics client application -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidstatic EbicsClientcreateEbicsClient(File rootDir, File configFile) createUser(URL url, String bankName, String hostId, String partnerId, String userId, String name, String email, String country, String organization, boolean saveCertificates, PasswordCallback passwordCallback) Creates a new ebics user and generates its certificates.voidCreates the user necessary directoriesvoidfetchFile(File file, User user, Product product, EbicsOrderType orderType, boolean isTest) voidfetchFile(File file, User user, Product product, EbicsOrderType orderType, EbicsDownloadParams downloadParams, boolean isTest) Downloads a file from the bank.voidfetchFile(File file, EbicsOrderType orderType, Date start, Date end) Downloads a file for a report period.voidfetchFile(File file, EbicsOrderType orderType, EbicsDownloadParams downloadParams) Downloads a file for the default user, with EBICS 3.0 service parameters.voidloadUser(String hostId, String partnerId, String userId, PasswordCallback passwordCallback) Loads a user knowing its IDstatic voidvoidquit()Performs buffers save before quitting the client application.voidrevokeSubscriber(User user, Product product) Sends the SPR order to the bank.voidsendFile(File file, User user, Product product, EbicsOrderType orderType, EbicsUploadParams params) Sends a file to the ebics bank servervoidsendFile(File file, EbicsOrderType orderType) voidsendFile(File file, EbicsOrderType orderType, EbicsUploadParams params) voidsendHIARequest(User user, Product product) Sends a HIA request to the ebics server.voidsendHPBRequest(User user, Product product) Sends a HPB request to the ebics server.voidsendINIRequest(User user, Product product) Sends an INI request to the ebics bank server
-
Constructor Details
-
EbicsClient
Constructs a new ebics client application- Parameters:
configuration- the application configurationproperties-
-
-
Method Details
-
createUserDirectories
Creates the user necessary directories- Parameters:
user- the concerned user
-
createUser
public User createUser(URL url, String bankName, String hostId, String partnerId, String userId, String name, String email, String country, String organization, boolean saveCertificates, PasswordCallback passwordCallback) throws Exception Creates a new ebics user and generates its certificates.- Parameters:
url- the bank urlbankName- the bank namehostId- the bank host IDpartnerId- the partner IDuserId- UserId as obtained from the bank.name- the user name,email- the user emailcountry- the user countryorganization- the user organization or companysaveCertificates- save generated certificates?passwordCallback- a callback-handler that supplies us with the password. This parameter can be null, in this case no password is used.- Returns:
- Ebics
User - Throws:
Exception
-
loadUser
-
sendINIRequest
-
sendHIARequest
-
sendHPBRequest
-
revokeSubscriber
-
sendFile
public void sendFile(File file, User user, Product product, EbicsOrderType orderType, EbicsUploadParams params) throws Exception Sends a file to the ebics bank server- Throws:
Exception
-
sendFile
public void sendFile(File file, EbicsOrderType orderType, EbicsUploadParams params) throws Exception - Throws:
Exception
-
sendFile
- Throws:
Exception
-
fetchFile
public void fetchFile(File file, User user, Product product, EbicsOrderType orderType, boolean isTest) throws IOException, EbicsException - Throws:
IOExceptionEbicsException
-
fetchFile
public void fetchFile(File file, EbicsOrderType orderType, EbicsDownloadParams downloadParams) throws IOException, EbicsException Downloads a file for the default user, with EBICS 3.0 service parameters.The counterpart of
sendFile(File, EbicsOrderType, EbicsUploadParams): callers that use the default user have no other way to reach the BTD path, since the default product is not exposed.- Throws:
IOExceptionEbicsException
-
fetchFile
public void fetchFile(File file, User user, Product product, EbicsOrderType orderType, EbicsDownloadParams downloadParams, boolean isTest) throws IOException, EbicsException Downloads a file from the bank.- Parameters:
downloadParams- optional EBICS 3.0 service parameters and report period; with a service name set the order is sent as a BTD business transaction format order- Throws:
IOExceptionEbicsException
-
fetchFile
public void fetchFile(File file, EbicsOrderType orderType, Date start, Date end) throws IOException, EbicsException Downloads a file for a report period.A
Dateis an instant, the EBICS report period is a pair of calendar days. The calendar day is therefore read in the timezone of the machine running this code, so aDateat UTC midnight becomes the previous day in any zone west of UTC. PreferfetchFile(File, User, Product, EbicsOrderType, EbicsDownloadParams, boolean)withLocalDatevalues, which has no timezone in it.- Throws:
IOExceptionEbicsException
-
quit
public void quit()Performs buffers save before quitting the client application. -
clearTraces
public void clearTraces() -
createEbicsClient
- Throws:
IOException
-
createDefaultUser
-
loadDefaultUser
-
getDefaultUser
-
main
-