Interface TableOutputGenerator
- All Superinterfaces:
ReportOutputGenerator
- All Known Subinterfaces:
SimpleJxlsTemplateOutputGenerator
- All Known Implementing Classes:
CompactJSONOutputGenerator,CSVOutputGenerator,DataCountOutputGenerator,DummyJxlsTemplateOutputGenerator,HTMLOutputGenerator,JSONOutputGenerator,JxlsTemplateOutputGenerator,LegacyTablePDFOutputGenerator,MetaDataOutputGenerator,PdfTableOutputGenerator,RSTableOutputGenerator,RSTableSimpleBeanOutputGenerator,StreamTableOutputGenerator,TableOutputGeneratorImpl,TableReportInformationOutputGenerator,XLSOutputGenerator,XLSStreamOutputGenerator
An output generator for dynamic lists.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddField(Object field, Column.CellFormatter cellFormatter) Adds a new cell to the output.voidaddGroupRow(int[] subtotalIndices, Object[] subtotals, int[] subtotalGroupFieldIndices, Object[] subtotalGroupFieldValues, int rowSize, Column.CellFormatter[] cellFormatters) In case a report is exported using subtotals, this method is called whenever a group is finished and an aggregation row needs to be added.voidclose()Informs the generator that the data is completely processed.Is called upon completion to get the final report object.voidinitialize(OutputStream os, TableDefinition td, boolean withSubtotals, TableReport report, TableReport originalReport, Column.CellFormatter[] cellFormatters, ParameterSet parameters, User user, ReportExecutionConfig... configs) Initializes the generator before the first data point is provided.voidnextRow()Informs the generator that the current data row is finished and a new row is about to beginvoidIf something needs to be done before theinitialize(OutputStream, TableDefinition, boolean, TableReport, TableReport, CellFormatter[], ParameterSet, User, ReportExecutionConfig...)method is called, e.g.booleanReturn true if the output generator is able to stream data.Methods inherited from interface net.datenwerke.rs.core.service.reportmanager.output.ReportOutputGenerator
getFormatInfo, getFormats, isCatchAll
-
Method Details
-
preInitialize
void preInitialize()If something needs to be done before theinitialize(OutputStream, TableDefinition, boolean, TableReport, TableReport, CellFormatter[], ParameterSet, User, ReportExecutionConfig...)method is called, e.g. something that has to be initialized before theTableDefinitionis created, it can be done here. -
initialize
void initialize(OutputStream os, TableDefinition td, boolean withSubtotals, TableReport report, TableReport originalReport, Column.CellFormatter[] cellFormatters, ParameterSet parameters, User user, ReportExecutionConfig... configs) throws IOException Initializes the generator before the first data point is provided.- Parameters:
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.- Throws:
IOException
-
nextRow
Informs the generator that the current data row is finished and a new row is about to begin- Throws:
IOException
-
addField
Adds a new cell to the output.- Parameters:
field-cellFormatter-- Throws:
IOException
-
close
Informs the generator that the data is completely processed.- Throws:
IOException
-
getTableObject
CompiledReport getTableObject()Is called upon completion to get the final report object. In case an outputstream is used (seeinitialize(OutputStream, TableDefinition, boolean, TableReport, TableReport, CellFormatter[], ParameterSet, User, ReportExecutionConfig...)theCompiledReportobject should not contain actual report data.- Returns:
- The finished report
-
addGroupRow
void addGroupRow(int[] subtotalIndices, Object[] subtotals, int[] subtotalGroupFieldIndices, Object[] subtotalGroupFieldValues, int rowSize, Column.CellFormatter[] cellFormatters) throws IOException In case a report is exported using subtotals, this method is called whenever a group is finished and an aggregation row needs to be added.- Throws:
IOException
-
supportsStreaming
boolean supportsStreaming()Return true if the output generator is able to stream data.
-