Class AppointmentImportReportService

java.lang.Object
fr.paris.lutece.plugins.appointment.modules.importer.service.AppointmentImportReportService

public final class AppointmentImportReportService extends Object
Produces administrator-downloadable reports from persistent importer data.
  • Method Summary

    Modifier and Type
    Method
    Description
    static byte[]
    failedRowsWorkbook(int nFileId, Locale locale)
    Produces an XLSX workbook containing the rows that could not be imported, with all original columns preserved.
    static byte[]
    finalReport(int nFileId, Locale locale)
    Produces an XLSX workbook with one row per imported appointment.
    static byte[]
    validationReport(String strJson, Locale locale)
    Produces an XLSX workbook listing all validation errors from the stored JSON report.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • finalReport

      public static byte[] finalReport(int nFileId, Locale locale) throws IOException
      Produces an XLSX workbook with one row per imported appointment.
      Parameters:
      nFileId - the id_import_file
      locale - the admin user's locale, used to localise report headers and statuses
      Returns:
      the XLSX bytes
      Throws:
      IOException
    • validationReport

      public static byte[] validationReport(String strJson, Locale locale) throws IOException
      Produces an XLSX workbook listing all validation errors from the stored JSON report.
      Parameters:
      strJson - the serialised validation report (stored in AppointmentImportFile)
      locale - the admin user's locale, used to localise report headers
      Returns:
      the XLSX bytes
      Throws:
      IOException
    • failedRowsWorkbook

      public static byte[] failedRowsWorkbook(int nFileId, Locale locale) throws IOException
      Produces an XLSX workbook containing the rows that could not be imported, with all original columns preserved.
      Parameters:
      nFileId - the id_import_file
      locale - the admin user's locale, used to localise report headers
      Returns:
      the XLSX bytes
      Throws:
      IOException