public interface ILayerExporter extends IExporter
The ILayerExporter is registered to the IConfigRegistry via
ExportConfigAttributes.EXPORTER configuration attribute and used by
the NatExporter to perform the export.
NatExporter,
ExportConfigAttributes| Modifier and Type | Method and Description |
|---|---|
void |
exportBegin(OutputStream outputStream)
Need to be called only once at the beginning of an export operation.
|
void |
exportCell(OutputStream outputStream,
Object exportDisplayValue,
ILayerCell cell,
IConfigRegistry configRegistry)
Exports one cell.
|
void |
exportEnd(OutputStream outputStream)
Need to be called only once at the end of an export operation.
|
void |
exportLayerBegin(OutputStream outputStream,
String layerName)
Starts the export operation of one ILayer.
|
void |
exportLayerEnd(OutputStream outputStream,
String layerName)
Ends the export operation of one ILayer.
|
void |
exportRowBegin(OutputStream outputStream,
int rowPosition)
Starts the export operation of one row.
|
void |
exportRowEnd(OutputStream outputStream,
int rowPosition)
Ends the export operation of one row.
|
getOutputStream, getResultvoid exportBegin(OutputStream outputStream) throws IOException
Note: Also on exporting multiple NatTable instances as part of a single export operation, this method should only be called once before any layers are exported.
outputStream - The OutputStream to write the export to.IOException - If the beginning of an export already performs I/O operations
that fail.void exportEnd(OutputStream outputStream) throws IOException
Note: Also on exporting multiple NatTable instances as part of a single export operation, this method should only be called once after all layers are exported.
outputStream - The OutputStream to write the export to.IOException - If finishing the export operation fails on an I/O operation.void exportLayerBegin(OutputStream outputStream, String layerName) throws IOException
On exporting multiple NatTable instances, this method needs to be called once for every instance.
outputStream - The OutputStream to write the export to.layerName - The name that should be used as sheet name.IOException - If an error occurred during writing the export.void exportLayerEnd(OutputStream outputStream, String layerName) throws IOException
On exporting multiple NatTable instances, this method needs to be called once for every instance.
outputStream - The OutputStream to write the export to.layerName - The name that is used as sheet name. Usually not necessary,
but in case there is caching involved in a custom
ILayerExporter implementation, this can be used to retrieve
the ILayer instance again.IOException - If an error occurred during writing the export.void exportRowBegin(OutputStream outputStream, int rowPosition) throws IOException
outputStream - The OutputStream to write the export to.rowPosition - The position of the row to export.IOException - If an error occurred during writing the export.void exportRowEnd(OutputStream outputStream, int rowPosition) throws IOException
outputStream - The OutputStream to write the export to.rowPosition - The position of the row that was exported. Usually not
necessary, but in case there is caching involved in a custom
ILayerExporter implementation, this can be used to retrieve
the row again.IOException - If an error occurred during writing the export.void exportCell(OutputStream outputStream, Object exportDisplayValue, ILayerCell cell, IConfigRegistry configRegistry) throws IOException
outputStream - The OutputStream to write the export to.exportDisplayValue - The value that will be written to the export file. This value
is determined by using the data value of the ILayerCell and
the registered IExportFormatter within the NatExporter.cell - The ILayerCell that is currently exported.configRegistry - The ConfigRegistry to retrieve the registered style
information of the cell that is currently exported.IOException - If an error occurred during writing the export.Copyright © 2019. All rights reserved.