Class DummyJxlsTemplateOutputGenerator
java.lang.Object
net.datenwerke.rs.base.service.reportengines.table.output.generator.DummyJxlsTemplateOutputGenerator
- All Implemented Interfaces:
SimpleJxlsTemplateOutputGenerator,TableOutputGenerator,ReportOutputGenerator
public class DummyJxlsTemplateOutputGenerator
extends Object
implements SimpleJxlsTemplateOutputGenerator
-
Constructor Summary
Constructors -
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.Returns an emptyCompiledReportobject to specify the type of report that is generated by this generator.String[]Is called upon completion to get the final report object.voidinitialize(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.booleanReturns true if this generator should be used if the format is not recognized.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 theTableOutputGenerator.initialize(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.
-
Constructor Details
-
DummyJxlsTemplateOutputGenerator
public DummyJxlsTemplateOutputGenerator()
-
-
Method Details
-
preInitialize
public void preInitialize()Description copied from interface:TableOutputGeneratorIf something needs to be done before theTableOutputGenerator.initialize(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.- Specified by:
preInitializein interfaceTableOutputGenerator
-
initialize
public void initialize(OutputStream os, TableDefinition td, boolean withSubtotals, TableReport report, TableReport orgReport, Column.CellFormatter[] cellFormatters, ParameterSet parameters, User user, ReportExecutionConfig... configs) throws IOException Description copied from interface:TableOutputGeneratorInitializes the generator before the first data point is provided.- Specified by:
initializein interfaceTableOutputGenerator- 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
-
getFormats
- Specified by:
getFormatsin interfaceReportOutputGenerator- Returns:
- The generator's format
-
getTableObject
Description copied from interface:TableOutputGeneratorIs called upon completion to get the final report object. In case an outputstream is used (seeTableOutputGenerator.initialize(OutputStream, TableDefinition, boolean, TableReport, TableReport, CellFormatter[], ParameterSet, User, ReportExecutionConfig...)theCompiledReportobject should not contain actual report data.- Specified by:
getTableObjectin interfaceTableOutputGenerator- Returns:
- The finished report
-
getFormatInfo
Description copied from interface:ReportOutputGeneratorReturns an emptyCompiledReportobject to specify the type of report that is generated by this generator.- Specified by:
getFormatInfoin interfaceReportOutputGenerator
-
nextRow
Description copied from interface:TableOutputGeneratorInforms the generator that the current data row is finished and a new row is about to begin- Specified by:
nextRowin interfaceTableOutputGenerator- Throws:
IOException
-
addField
Description copied from interface:TableOutputGeneratorAdds a new cell to the output.- Specified by:
addFieldin interfaceTableOutputGenerator- Parameters:
field-cellFormatter-- Throws:
IOException
-
close
Description copied from interface:TableOutputGeneratorInforms the generator that the data is completely processed.- Specified by:
closein interfaceTableOutputGenerator- Throws:
IOException
-
addGroupRow
public void addGroupRow(int[] subtotalIndices, Object[] subtotals, int[] subtotalGroupFieldIndices, Object[] subtotalGroupFieldValues, int rowSize, Column.CellFormatter[] cellFormatters) throws IOException Description copied from interface:TableOutputGeneratorIn case a report is exported using subtotals, this method is called whenever a group is finished and an aggregation row needs to be added.- Specified by:
addGroupRowin interfaceTableOutputGenerator- Throws:
IOException
-
supportsStreaming
public boolean supportsStreaming()Description copied from interface:TableOutputGeneratorReturn true if the output generator is able to stream data.- Specified by:
supportsStreamingin interfaceTableOutputGenerator
-
isCatchAll
public boolean isCatchAll()Description copied from interface:ReportOutputGeneratorReturns true if this generator should be used if the format is not recognized.- Specified by:
isCatchAllin interfaceReportOutputGenerator
-