Package io.jmix.reports.runner.impl
Class ReportRunnerImpl
java.lang.Object
io.jmix.reports.runner.impl.ReportRunnerImpl
- All Implemented Interfaces:
ReportRunner
@Component("report_ReportRunner")
public class ReportRunnerImpl
extends Object
implements ReportRunner
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
protected DataManager
protected EntityStates
protected ReportExecutionHistoryRecorder
protected org.springframework.beans.factory.ObjectProvider<FluentReportRunner>
protected PrototypesLoader
protected ReportingAPI
protected ReportsProperties
protected ReportsUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyReportCode
(String reportCode) Creates an instance ofFluentReportRunner
for a report with specified code.byReportEntity
(Report report) Creates an instance ofFluentReportRunner
for specified report.protected ReportOutputDocument
protected ReportTemplate
getDefaultTemplate
(Report report) protected void
prepareContext
(ReportRunContext context) run
(ReportRunContext context) Runs the report based on the information from theReportRunContext
.
-
Field Details
-
prototypesLoader
-
reportingAPI
-
fluentReportRunners
@Autowired protected org.springframework.beans.factory.ObjectProvider<FluentReportRunner> fluentReportRunners -
entityStates
-
dataManager
-
reportsProperties
-
executionHistoryRecorder
-
reportsUtils
-
applicationContext
@Autowired protected org.springframework.context.ApplicationContext applicationContext
-
-
Constructor Details
-
ReportRunnerImpl
public ReportRunnerImpl()
-
-
Method Details
-
run
Description copied from interface:ReportRunner
Runs the report based on the information from theReportRunContext
. The run context may be created manually using the constructor or using theFluentReportRunner
.- Specified by:
run
in interfaceReportRunner
- Parameters:
context
- the object that contains all information required to run the report- Returns:
- report execution result
-
createReportDocumentInternal
-
prepareContext
-
getDefaultTemplate
-
byReportCode
Description copied from interface:ReportRunner
Creates an instance ofFluentReportRunner
for a report with specified code.
Usage examples:ReportRunContext context = reportRunner.byReportCode("orders-report") .withParams(paramsMap) .withOutputType(ReportOutputType.PDF) .buildContext(); ReportOutputDocument document = reportRunner.byReportCode("orders-report") .addParam("orders", ordersList) .withTemplateCode("orders-template") .run();
- Specified by:
byReportCode
in interfaceReportRunner
- Parameters:
reportCode
- report code- Returns:
- instance of
FluentReportRunner
-
byReportEntity
Description copied from interface:ReportRunner
Creates an instance ofFluentReportRunner
for specified report.
Usage examples:ReportRunContext context = reportRunner.byReportEntity(report) .withParams(paramsMap) .withTemplateCode("orders-template") .buildContext(); ReportOutputDocument document = reportRunner.byReportEntity(report) .addParam("orders", orders) .withOutputType(ReportOutputType.PDF) .withOutputNamePattern("Orders") .run();
- Specified by:
byReportEntity
in interfaceReportRunner
- Parameters:
report
- report entity- Returns:
- instance of
FluentReportRunner
-