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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractImportCamtFileService(org.slf4j.Logger log, Context context, EntityDefaultValueService defaultValueService, IncomingPaymentService incomingPaymentService) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckFile(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 voidinitializeXStream(com.thoughtworks.xstream.XStream xStream) booleanvalidateFile(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:ImportEsrFileServiceChecks if the file can be processed by this service- Specified by:
checkFilein interfaceImportEsrFileService- Parameters:
esrFile- the esr file as a Binarycontribution- the contribution to check against- Returns:
trueif the file can be processed
-
validateFile
Description copied from interface:ImportEsrFileServiceValidates the esr file- Specified by:
validateFilein interfaceImportEsrFileService- Parameters:
esrFile- the esr file as a Binarycontribution- the contribution to validate against- Returns:
trueif the file is valid
-
importFile
Description copied from interface:ImportEsrFileServiceimports the esr file- Specified by:
importFilein 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:ImportEsrFileServicereturns the hash of the file for the Esr_file_history- Specified by:
getFileHashin interfaceImportEsrFileService- Parameters:
esrFile- the esr file as a Binary- Returns:
- the hash of the file
-
initializeXStream
protected void initializeXStream(com.thoughtworks.xstream.XStream xStream)
-