Class AbstractImportCamtFileService
java.lang.Object
ch.tocco.nice2.optional.finance.impl.action.esr.camt.AbstractImportCamtFileService
- All Implemented Interfaces:
ImportEsrFileService
- Direct Known Subclasses:
ImportCamt053FileServiceImpl
,ImportCamt054FileServiceImpl
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAbstractImportCamtFileService
(org.slf4j.Logger log, Context context, EntityDefaultValueService defaultValueService, IncomingPaymentService incomingPaymentService) -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkFile
(Binary esrFile, ImportEsrFileServiceContribution contribution) Checks if the file can be processed by this servicegetFileHash
(Binary esrFile) returns the hash of the file for the Esr_file_historyimportFile
(Binary esrFile) imports the esr fileprotected void
initializeXStream
(com.thoughtworks.xstream.XStream xStream) boolean
validateFile
(Binary esrFile, ImportEsrFileServiceContribution contribution) Validates the esr file
-
Field Details
-
ERROR_NO_SCHEMA
- See Also:
-
ERROR_NOT_VALID
- See Also:
-
ERROR_NO_RESOURCE
- See Also:
-
-
Constructor Details
-
AbstractImportCamtFileService
public AbstractImportCamtFileService(org.slf4j.Logger log, Context context, EntityDefaultValueService defaultValueService, IncomingPaymentService incomingPaymentService)
-
-
Method Details
-
checkFile
Description copied from interface:ImportEsrFileService
Checks if the file can be processed by this service- Specified by:
checkFile
in interfaceImportEsrFileService
- Parameters:
esrFile
- the esr file as a Binarycontribution
- the contribution to check against- Returns:
true
if the file can be processed
-
validateFile
Description copied from interface:ImportEsrFileService
Validates the esr file- Specified by:
validateFile
in interfaceImportEsrFileService
- Parameters:
esrFile
- the esr file as a Binarycontribution
- the contribution to validate against- Returns:
true
if the file is valid
-
importFile
Description copied from interface:ImportEsrFileService
imports the esr file- Specified by:
importFile
in interfaceImportEsrFileService
- Parameters:
esrFile
- the esr file as a Binary- Returns:
- the number of imported incoming payments, the number of total transaction in the file and a flag that may be set if this file was imported before.
-
getFileHash
Description copied from interface:ImportEsrFileService
returns the hash of the file for the Esr_file_history- Specified by:
getFileHash
in interfaceImportEsrFileService
- Parameters:
esrFile
- the esr file as a Binary- Returns:
- the hash of the file
-
initializeXStream
protected void initializeXStream(com.thoughtworks.xstream.XStream xStream)
-