Package cdc.impex.exports
Interface ActiveExporter
-
- All Known Implementing Classes:
CheckedActiveExporter
public interface ActiveExporterInterface 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
All Methods Instance Methods Abstract Methods Default 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.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.default voidissue(ExportIssueType type, String description)Creates a new issue whose severity is deduced from its type.ExportRownextRow()Called once for each row.
-
-
-
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.
-
beginExport
void beginExport(OutputStream out, String systemId, ImpExFormat format, cdc.issues.IssuesHandler<cdc.issues.Issue> issuesHandler, cdc.util.events.ProgressController controller) throws IOException
- Throws:
IOException
-
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 IOExceptionCalled once for each row, once it has been filled.- Throws:
IOException- When an IO error occurs.
-
endSheet
void endSheet() throws IOExceptionCalled once at the end of each logical sheet.- Throws:
IOException- When an IO error occurs.
-
endExport
void endExport() throws IOExceptionCalled 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.
-
-