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
ConstructorsConstructorDescriptionGenericImporterReportServiceImpl(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 linevoidgenerateImportResultReport(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:GenericImporterReportServiceGenerates 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:
generateErrorReportin 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:GenericImporterReportServiceGenerate 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:
generateImportResultReportin 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.
-