public class CSVOutputGenerator extends TableOutputGeneratorImpl
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONFIG_FILE |
static java.lang.String |
CSV_LINE_SEPARATOR_PROPERTY |
static java.lang.String |
CSV_QUOTATION_PROPERTY |
static java.lang.String |
CSV_SEPARATOR_PROPERTY |
Constructor and Description |
---|
CSVOutputGenerator(ConfigService configService,
ReportServerService reportServerService,
<any> exporterHelperProvider) |
Modifier and Type | Method and Description |
---|---|
void |
addField(java.lang.Object field,
Column.CellFormatter formatter)
Adds a new cell to the output.
|
void |
close()
Informs the generator that the data is completely processed.
|
CompiledReport |
getFormatInfo()
Returns an empty
CompiledReport object to specify the type of report
that is generated by this generator. |
java.lang.String[] |
getFormats() |
CompiledReport |
getTableObject()
Is called upon completion to get the final report object.
|
void |
initialize(java.io.OutputStream os,
TableDefinition td,
boolean withSubtotals,
TableReport report,
TableReport orgReport,
Column.CellFormatter[] cellFormatters,
ParameterSet parameters,
User user,
ReportExecutionConfig... configs)
Initializes the generator before the first data point is provided.
|
void |
nextRow()
Informs the generator that the current data row is finished and a new row is
about to begin
|
addGroupRow, isCatchAll, preInitialize, supportsStreaming
public static final java.lang.String CONFIG_FILE
public static final java.lang.String CSV_LINE_SEPARATOR_PROPERTY
public static final java.lang.String CSV_SEPARATOR_PROPERTY
public static final java.lang.String CSV_QUOTATION_PROPERTY
public CSVOutputGenerator(ConfigService configService, ReportServerService reportServerService, <any> exporterHelperProvider)
public void addField(java.lang.Object field, Column.CellFormatter formatter) throws java.io.IOException
TableOutputGenerator
java.io.IOException
public void close() throws java.io.IOException
TableOutputGenerator
java.io.IOException
public java.lang.String[] getFormats()
public CompiledReport getTableObject()
TableOutputGenerator
#initialize(OutputStream, TableDefinition, boolean, TableReport, TableReport, CellFormatter[], ParameterSet, User, ReportExecutionConfig...)
the CompiledReport
object should not contain actual report data.public void initialize(java.io.OutputStream os, TableDefinition td, boolean withSubtotals, TableReport report, TableReport orgReport, Column.CellFormatter[] cellFormatters, ParameterSet parameters, User user, ReportExecutionConfig... configs) throws java.io.IOException
TableOutputGenerator
initialize
in interface TableOutputGenerator
initialize
in class TableOutputGeneratorImpl
os
- The output stream to be used. If no output stream is provided (the
object is null), then the report should be generated in memory.java.io.IOException
public void nextRow() throws java.io.IOException
TableOutputGenerator
java.io.IOException
public CompiledReport getFormatInfo()
ReportOutputGenerator
CompiledReport
object to specify the type of report
that is generated by this generator.