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 Detail

      • 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.
      • 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.

        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.