Class GenericImporterReportServiceImpl
java.lang.Object
ch.tocco.nice2.entityoperation.impl.importer.GenericImporterReportServiceImpl
- All Implemented Interfaces:
GenericImporterReportService
@Component
public class GenericImporterReportServiceImpl
extends Object
implements GenericImporterReportService
-
Constructor Summary
ConstructorDescriptionGenericImporterReportServiceImpl
(OutputCenterService outputCenterService, TextResources textResources) -
Method Summary
Modifier and TypeMethodDescriptiongenerateErrorReport
(File importFile, com.google.common.collect.Multimap<Integer, GenericImporterValidateResult.Message> messages) Generates a file that contains all lines of the original import file that have a "message" associated to them The messages are appended to the end of each linevoid
generateImportResultReport
(File importFile, com.google.common.collect.Multimap<Integer, GenericImporterValidateResult.Message> messages, Set<Integer> skippedRows, int lastSuccessfulRow) Generate s a report that is basically the original import file enriched with a status that tells if the record was successfully imported or not and error messages if applicable.
-
Constructor Details
-
GenericImporterReportServiceImpl
public GenericImporterReportServiceImpl(OutputCenterService outputCenterService, TextResources textResources)
-
-
Method Details
-
generateErrorReport
public String generateErrorReport(File importFile, com.google.common.collect.Multimap<Integer, GenericImporterValidateResult.Message> messages) Description copied from interface:GenericImporterReportService
Generates a file that contains all lines of the original import file that have a "message" associated to them The messages are appended to the end of each line- Specified by:
generateErrorReport
in interfaceGenericImporterReportService
- Parameters:
importFile
- the original import filemessages
- the error messages- Returns:
- primary key of the output job
-
generateImportResultReport
public void generateImportResultReport(File importFile, com.google.common.collect.Multimap<Integer, GenericImporterValidateResult.Message> messages, Set<Integer> skippedRows, int lastSuccessfulRow) Description copied from interface:GenericImporterReportService
Generate s a report that is basically the original import file enriched with a status that tells if the record was successfully imported or not and error messages if applicable.- Specified by:
generateImportResultReport
in interfaceGenericImporterReportService
- Parameters:
importFile
- the original import filemessages
- all messages that should be "attached" to the import fileskippedRows
- all rows that where skipped (e.g. "create" rows when using "update only")lastSuccessfulRow
- only used if "cancel" is selected, all rows after this row are either skipped or lines with errors.
-