Package cdc.impex.exports
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 Summary
Constructors Constructor Description CheckedActiveExporter(ActiveExporter delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRow()Called once for each row, once it has been filled.voidbeginExport(File file, cdc.issues.IssuesHandler<cdc.issues.Issue> issuesHandler, cdc.util.events.ProgressController controller)Called once for a file.voidbeginExport(OutputStream out, String systemId, ImpExFormat format, cdc.issues.IssuesHandler<cdc.issues.Issue> issuesHandler, cdc.util.events.ProgressController controller)voidbeginSheet(SheetTemplate template, long numberOfRows)Called once for each logical sheet.protected voidcheckStatus(ImpExStatus expected)voidendExport()Called once at the end of export.voidendSheet()Called once at the end of each logical sheet.cdc.issues.IssuesHandler<cdc.issues.Issue>getIssuesHandler()voidissue(ExportIssueType type, cdc.issues.IssueSeverity severity, String description)Creates a new issue.voidissue(ExportIssueType type, String description)Creates a new issue whose severity is deduced from its type.ExportRownextRow()Called once for each row.
-
-
-
Constructor Detail
-
CheckedActiveExporter
public CheckedActiveExporter(ActiveExporter delegate)
-
-
Method Detail
-
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:ActiveExporterCalled once for a file.- Specified by:
beginExportin interfaceActiveExporter- 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
- Specified by:
beginExportin interfaceActiveExporter- Throws:
IOException
-
beginSheet
public void beginSheet(SheetTemplate template, long numberOfRows) throws IOException
Description copied from interface:ActiveExporterCalled once for each logical sheet.One logical sheet can generate several physical sheets, depending on the limits of the output format.
- Specified by:
beginSheetin interfaceActiveExporter- 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:ActiveExporterCalled once for each row.- Specified by:
nextRowin interfaceActiveExporter- Returns:
- The row to fill, cleared and prepared.
- Throws:
IOException- When an IO error occurs.
-
addRow
public void addRow() throws IOExceptionDescription copied from interface:ActiveExporterCalled once for each row, once it has been filled.- Specified by:
addRowin interfaceActiveExporter- Throws:
IOException- When an IO error occurs.
-
endSheet
public void endSheet() throws IOExceptionDescription copied from interface:ActiveExporterCalled once at the end of each logical sheet.- Specified by:
endSheetin interfaceActiveExporter- Throws:
IOException- When an IO error occurs.
-
endExport
public void endExport() throws IOExceptionDescription copied from interface:ActiveExporterCalled once at the end of export.- Specified by:
endExportin interfaceActiveExporter- Throws:
IOException- When an IO error occurs.
-
getIssuesHandler
public cdc.issues.IssuesHandler<cdc.issues.Issue> getIssuesHandler()
- Specified by:
getIssuesHandlerin interfaceActiveExporter- Returns:
- The used issues handler.
-
issue
public void issue(ExportIssueType type, cdc.issues.IssueSeverity severity, String description)
Description copied from interface:ActiveExporterCreates a new issue.- Specified by:
issuein interfaceActiveExporter- 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:ActiveExporterCreates a new issue whose severity is deduced from its type.- Specified by:
issuein interfaceActiveExporter- Parameters:
type- The issue type.description- The issue description.
-
-