Package cdc.impex.exports
Class CheckedActiveExporter
java.lang.Object
cdc.impex.exports.CheckedActiveExporter
- All Implemented Interfaces:
ActiveExporter
Implementation of ActiveExporter that do some checks and delegates the real job to another ActiveExporter.
- Author:
- Damien Carbonne
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRow()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) Called once for an output stream.voidbeginSheet(SheetTemplateInstance templateInstance, long numberOfRows) Called once for each logical sheet.voidbeginSheet(SheetTemplate template, long numberOfRows) Called once for each logical sheet.protected voidcheckStatus(ImpExStatus expected) voidCalled once at the end of export.voidendSheet()Called once at the end of each logical sheet.cdc.issues.IssuesHandler<cdc.issues.Issue>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.nextRow()Called once for each row.
-
Constructor Details
-
CheckedActiveExporter
-
-
Method Details
-
checkStatus
-
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 Description copied from interface:ActiveExporterCalled once for an output stream.- Specified by:
beginExportin interfaceActiveExporter- 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:ActiveExporterCalled 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
templatecontains pattern columns.- Specified by:
beginSheetin interfaceActiveExporter- 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
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.
WARNING: the version can be called when
templatedoes not contain any pattern column.- 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
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
Description 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
Description copied from interface:ActiveExporterCalled once at the end of each logical sheet.- Specified by:
endSheetin interfaceActiveExporter- Throws:
IOException- When an IO error occurs.
-
endExport
Description 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
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
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.
-