Class CheckedActiveExporter

java.lang.Object
cdc.impex.exports.CheckedActiveExporter
All Implemented Interfaces:
ActiveExporter

public class CheckedActiveExporter extends Object implements ActiveExporter
Implementation of ActiveExporter that do some checks and delegates the real job to another ActiveExporter.
Author:
Damien Carbonne
  • Constructor Details

    • CheckedActiveExporter

      public CheckedActiveExporter(ActiveExporter delegate)
  • Method Details

    • checkStatus

      protected void checkStatus(ImpExStatus expected)
    • beginExport

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

      public void beginExport(OutputStream out, String systemId, ImpExFormat format, cdc.issues.IssuesHandler<cdc.issues.Issue> issuesHandler, cdc.util.events.ProgressController controller) throws IOException
      Description copied from interface: ActiveExporter
      Called once for an output stream.
      Specified by:
      beginExport in interface ActiveExporter
      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

      public void beginSheet(SheetTemplateInstance templateInstance, long numberOfRows) throws IOException
      Description copied from interface: ActiveExporter
      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.

      Specified by:
      beginSheet in interface ActiveExporter
      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

      public void beginSheet(SheetTemplate template, long numberOfRows) throws IOException
      Description copied from interface: ActiveExporter
      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.

      Specified by:
      beginSheet in interface ActiveExporter
      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

      public ExportRow nextRow() throws IOException
      Description copied from interface: ActiveExporter
      Called once for each row.
      Specified by:
      nextRow in interface ActiveExporter
      Returns:
      The row to fill, cleared and prepared.
      Throws:
      IOException - When an IO error occurs.
    • addRow

      public void addRow() throws IOException
      Description copied from interface: ActiveExporter
      Called once for each row, once it has been filled.
      Specified by:
      addRow in interface ActiveExporter
      Throws:
      IOException - When an IO error occurs.
    • endSheet

      public void endSheet() throws IOException
      Description copied from interface: ActiveExporter
      Called once at the end of each logical sheet.
      Specified by:
      endSheet in interface ActiveExporter
      Throws:
      IOException - When an IO error occurs.
    • endExport

      public void endExport() throws IOException
      Description copied from interface: ActiveExporter
      Called once at the end of export.
      Specified by:
      endExport in interface ActiveExporter
      Throws:
      IOException - When an IO error occurs.
    • getIssuesHandler

      public cdc.issues.IssuesHandler<cdc.issues.Issue> getIssuesHandler()
      Specified by:
      getIssuesHandler in interface ActiveExporter
      Returns:
      The used issues handler.
    • issue

      public void issue(ExportIssueType type, cdc.issues.IssueSeverity severity, String description)
      Description copied from interface: ActiveExporter
      Creates a new issue.
      Specified by:
      issue in interface ActiveExporter
      Parameters:
      type - The issue type.
      severity - The issue severity.
      description - The issue description.
    • issue

      public void issue(ExportIssueType type, String description)
      Description copied from interface: ActiveExporter
      Creates a new issue whose severity is deduced from its type.
      Specified by:
      issue in interface ActiveExporter
      Parameters:
      type - The issue type.
      description - The issue description.