Class ImportV11FileServiceImpl
java.lang.Object
ch.tocco.nice2.optional.finance.impl.action.esr.v11.ImportV11FileServiceImpl
- All Implemented Interfaces:
ImportEsrFileService
-
Constructor Summary
ConstructorsConstructorDescriptionImportV11FileServiceImpl(Context context, QueryBuilderFactory queryBuilderFactory, EntityDefaultValueService entityDefaultValueService, 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 filebooleanvalidateFile(Binary esrFile, ImportEsrFileServiceContribution contribution) Validates the esr file
-
Constructor Details
-
ImportV11FileServiceImpl
public ImportV11FileServiceImpl(Context context, QueryBuilderFactory queryBuilderFactory, EntityDefaultValueService entityDefaultValueService, 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
-