Package cdc.impex.exports
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 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.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.default voidissue(ExportIssueType type, String description) Creates a new issue whose severity is deduced from its type.nextRow()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
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
templatecontains 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
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
templatedoes 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
Called once for each row.- Returns:
- The row to fill, cleared and prepared.
- Throws:
IOException- When an IO error occurs.
-
addRow
Called once for each row, once it has been filled.- Throws:
IOException- When an IO error occurs.
-
endSheet
Called once at the end of each logical sheet.- Throws:
IOException- When an IO error occurs.
-
endExport
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
Creates a new issue.- Parameters:
type- The issue type.severity- The issue severity.description- The issue description.
-
issue
Creates a new issue whose severity is deduced from its type.- Parameters:
type- The issue type.description- The issue description.
-