Class ImportZipFileServiceImpl
java.lang.Object
ch.tocco.nice2.optional.finance.impl.action.esr.zip.ImportZipFileServiceImpl
- All Implemented Interfaces:
ImportEsrFileService
-
Constructor Summary
ConstructorDescriptionImportZipFileServiceImpl
(BinaryFactory binaryFactory, EsrImportHelperService esrImportHelperService) -
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 zipFile) imports the esr fileboolean
validateFile
(Binary esrFile, ImportEsrFileServiceContribution contribution) Validates the esr file
-
Constructor Details
-
ImportZipFileServiceImpl
public ImportZipFileServiceImpl(BinaryFactory binaryFactory, EsrImportHelperService esrImportHelperService)
-
-
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:
zipFile
- 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
-