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