Package io.jmix.reports.yarg.reporting
Class Reporting
java.lang.Object
io.jmix.reports.yarg.reporting.Reporting
- All Implemented Interfaces:
ReportingAPI
- Direct Known Subclasses:
JmixReporting
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DataExtractorprotected ReportFormatterFactoryprotected ReportLoaderFactoryprotected org.slf4j.Loggerprotected ObjectToStringConverterprotected StreamingReportValidator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ReportOutputDocumentcreateReportOutputDocument(Report report, ReportOutputType outputType, String outputName, BandData rootBand) protected @Nullable ReportBandfindStreamingBand(@Nullable ReportBand band) protected voidgenerateReport(Report report, ReportTemplate reportTemplate, ReportOutputType outputType, OutputStream outputStream, Map<String, Object> handledParams, BandData rootBand) handleParameters(Report report, Map<String, Object> params) protected BandDataloadBandData(Report report, Map<String, Object> handledParams) protected voidprotected voidprotected StringresolveOutputFileName(RunParams runParams, BandData rootBand) This method generates report and put result to ReportOutputDocument.content fieldrunReport(RunParams runParams, OutputStream outputStream) This method generates report and put result to output stream.protected @Nullable BandDatarunStreamingReport(Report report, ReportTemplate reportTemplate, ReportOutputType outputType, OutputStream outputStream, Map<String, Object> handledParams, ReportBand streamingBand) Streaming run path: small bands are extracted as usual (the streaming band excluded), then the render runs inside the streaming loader's callback, pulling the hot band's rows from a live cursor.voidsetDataExtractor(DataExtractorImpl dataExtractor) voidsetFormatterFactory(ReportFormatterFactory formatterFactory) voidsetLoaderFactory(ReportLoaderFactory loaderFactory) voidsetObjectToStringConverter(ObjectToStringConverter objectToStringConverter)
-
Field Details
-
formatterFactory
-
dataExtractor
-
loaderFactory
-
streamingValidator
-
objectToStringConverter
-
logger
protected org.slf4j.Logger logger
-
-
Constructor Details
-
Reporting
public Reporting()
-
-
Method Details
-
setFormatterFactory
-
setLoaderFactory
-
setDataExtractor
-
setObjectToStringConverter
-
runReport
Description copied from interface:ReportingAPIThis method generates report and put result to output stream. ! Attention : ReportOutputDocument.content field is null in this case !- Specified by:
runReportin interfaceReportingAPI- Parameters:
runParams- - parameters for report printingoutputStream- - the stream which accept binary file generated by reporting- Returns:
- ReportOutputDocument - object which describes generated report - its name, type etc
-
runReport
Description copied from interface:ReportingAPIThis method generates report and put result to ReportOutputDocument.content field- Specified by:
runReportin interfaceReportingAPI- Parameters:
runParams- - parameters for report printing- Returns:
- ReportOutputDocument - object which describes generated report - its name, type etc
-
generateReport
protected void generateReport(Report report, ReportTemplate reportTemplate, ReportOutputType outputType, OutputStream outputStream, Map<String, Object> handledParams, BandData rootBand) -
findStreamingBand
-
runStreamingReport
protected @Nullable BandData runStreamingReport(Report report, ReportTemplate reportTemplate, ReportOutputType outputType, OutputStream outputStream, Map<String, Object> handledParams, ReportBand streamingBand) Streaming run path: small bands are extracted as usual (the streaming band excluded), then the render runs inside the streaming loader's callback, pulling the hot band's rows from a live cursor. The loader owns the transaction/connection for the whole render.Returns
nullwhen the formatter factory claims streaming support for the template but actually created a non-streaming formatter (a customized factory): the caller then falls back to the materialized rendering path. -
collectReportBandNames
-
loadBandData
-
handleParameters
-
logReport
-
logException
-
createReportOutputDocument
protected ReportOutputDocument createReportOutputDocument(Report report, ReportOutputType outputType, String outputName, BandData rootBand) -
resolveOutputFileName
-