Table of Contents

Report Manager

ReportManager provides interface to generate and render reports. It's the main service in report module, which integrates together:

ReportManager methods

ReportExecutor

ReportExecutor (~report) generates single report - returns json data in attachment. Use abstract class AbstractReportExecutor for implementing custom report (contains some boring parts) and then implement method generate by your needs.

Report filter

Dynamic common forms are used for storing report filter. Report executor provides form definition with attributes, which can be filled in filter ⇒ executor can use this filter for searching data. IdmFormDefinitionService is used for read and update form definition for given report. Filter attributes can be added and changed (see compatible vs incompatible changes).

Event processing

Report is generated by event processing (event type GENERATE), registered processors to this event type:

You can create your own processor in custom module before / after each phase of report generation (or e.g. disable notification).

Use streams (JsonGenerator, temp files) to generate report (see example). Report can work with large data.
Don't forget to use @Enabled annotation for reports in custom module. When module is disabled, then report has to be disabled too (respectively report will not be available at all).

ReportRenderer

Renders generated report to single format. This rendered output can be given to download on rest endpoint. Use abstract clases AbstractReportRenderer, AbstractXlsxRenderer, AbstractCsvRenderer, AbstractJsonRenderer for implementing custom renderer (contains some boring parts) and then implement method render by your needs.

RendererRegistrar

Report can be rendered by more renderers. One renderer can render more reports. Use RendererRegistrar interface or AbstractRendererRegistrar class to register renderer to report.

Use streams (JsonParser, temp files) to render report (see example). Report can work with large data.
Don't forget to use @Enabled annotation for renderers in custom module. When module is disabled, then renderer has to be disabled too (respectively renderer will not be available at all).

Security

Generated reports are secured under group REPORT. Authorization policies are implemented: