Interface ActiveExporter

All Known Implementing Classes:
CheckedActiveExporter

public interface ActiveExporter
Interface dedicated to export and that adopts the active iterator approach.

[Storage Device] → [Memory] → ActiveExporter → [File/Stream].

The calling sequence must be:
beginExport (beginSheet (nextRow addRow)* endSheet)* endExport

Author:
Damien Carbonne
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called once for each row, once it has been filled.
    void
    beginExport(File file, cdc.issues.IssuesHandler<cdc.issues.Issue> issuesHandler, cdc.util.events.ProgressController controller)
    Called once for a file.
    void
    beginExport(OutputStream out, String systemId, ImpExFormat format, cdc.issues.IssuesHandler<cdc.issues.Issue> issuesHandler, cdc.util.events.ProgressController controller)
    Called once for an output stream.
    void
    beginSheet(SheetTemplateInstance templateInstance, long numberOfRows)
    Called once for each logical sheet.
    void
    beginSheet(SheetTemplate template, long numberOfRows)
    Called once for each logical sheet.
    void
    Called once at the end of export.
    void
    Called once at the end of each logical sheet.
    cdc.issues.IssuesHandler<cdc.issues.Issue>
     
    void
    issue(ExportIssueType type, cdc.issues.IssueSeverity severity, String description)
    Creates a new issue.
    default void
    issue(ExportIssueType type, String description)
    Creates a new issue whose severity is deduced from its type.
    Called once for each row.
  • Method Details

    • beginExport

      void beginExport(File file, cdc.issues.IssuesHandler<cdc.issues.Issue> issuesHandler, cdc.util.events.ProgressController controller) throws IOException
      Called once for a file.
      Parameters:
      file - The file.
      issuesHandler - The issues handler.
      controller - The controller
      Throws:
      IOException - When an IO error occurs.
    • beginExport

      void beginExport(OutputStream out, String systemId, ImpExFormat format, cdc.issues.IssuesHandler<cdc.issues.Issue> issuesHandler, cdc.util.events.ProgressController controller) throws IOException
      Called once for an output stream.
      Parameters:
      out - The output stream.
      systemId - The system id.
      format - The output format.
      issuesHandler - The issues handler.
      controller - The controller
      Throws:
      IOException - When an IO error occurs.
    • beginSheet

      void beginSheet(SheetTemplateInstance templateInstance, long numberOfRows) throws IOException
      Called once for each logical sheet.

      One logical sheet can generate several physical sheets, depending on the limits of the output format.

      WARNING: the version must be called when template contains pattern columns.

      Parameters:
      templateInstance - The template instance.
      numberOfRows - The number of rows in the logical sheet.
      Pass -1 if that number is unknown.
      Throws:
      IOException - When an IO error occurs.
    • beginSheet

      void beginSheet(SheetTemplate template, long numberOfRows) throws IOException
      Called once for each logical sheet.

      One logical sheet can generate several physical sheets, depending on the limits of the output format.

      WARNING: the version can be called when template does not contain any pattern column.

      Parameters:
      template - The template.
      numberOfRows - The number of rows in the logical sheet.
      Pass -1 if that number is unknown.
      Throws:
      IOException - When an IO error occurs.
    • nextRow

      ExportRow nextRow() throws IOException
      Called once for each row.
      Returns:
      The row to fill, cleared and prepared.
      Throws:
      IOException - When an IO error occurs.
    • addRow

      void addRow() throws IOException
      Called once for each row, once it has been filled.
      Throws:
      IOException - When an IO error occurs.
    • endSheet

      void endSheet() throws IOException
      Called once at the end of each logical sheet.
      Throws:
      IOException - When an IO error occurs.
    • endExport

      void endExport() throws IOException
      Called once at the end of export.
      Throws:
      IOException - When an IO error occurs.
    • getIssuesHandler

      cdc.issues.IssuesHandler<cdc.issues.Issue> getIssuesHandler()
      Returns:
      The used issues handler.
    • issue

      void issue(ExportIssueType type, cdc.issues.IssueSeverity severity, String description)
      Creates a new issue.
      Parameters:
      type - The issue type.
      severity - The issue severity.
      description - The issue description.
    • issue

      default void issue(ExportIssueType type, String description)
      Creates a new issue whose severity is deduced from its type.
      Parameters:
      type - The issue type.
      description - The issue description.