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 Details

  • 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 interface GenericImporterReportService
      Parameters:
      importFile - the original import file
      messages - 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 interface GenericImporterReportService
      Parameters:
      importFile - the original import file
      messages - all messages that should be "attached" to the import file
      skippedRows - 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.