Package io.jmix.reportsflowui.runner
Interface ReportExecutionPresentation
- All Known Implementing Classes:
DefaultReportExecutionPresentation,SpreadsheetReportExecutionPresentation,TableReportExecutionPresentation
@NullMarked
public interface ReportExecutionPresentation
Strategy interface that encapsulates how a particular output channel (download, spreadsheet viewer,
table viewer, …) selects templates, output types, and decides whether user input is required
before a report can be run.
Implementations are registered as Spring beans and collected by ReportPresentationRegistry.
Use ReportExecutionPresentationIds for the well-known built-in identifiers.
-
Method Summary
Modifier and TypeMethodDescriptiongetAvailableOutputTypes(@Nullable Report report, @Nullable ReportTemplate template) getAvailableTemplates(@Nullable Report report) getId()booleanrequiresUserChoice(@Nullable Report report, @Nullable ReportTemplate selectedTemplate, @Nullable ReportOutputType selectedOutputType) @Nullable ReportOutputTyperesolveDefaultOutputType(@Nullable Report report, @Nullable ReportTemplate template, @Nullable ReportOutputType selectedOutputType) @Nullable ReportTemplateresolveDefaultTemplate(@Nullable Report report, @Nullable ReportTemplate selectedTemplate) booleansupportsReport(@Nullable Report report)
-
Method Details
-
getId
String getId()- Returns:
- unique identifier of this presentation (see
ReportExecutionPresentationIds)
-
supportsReport
- Returns:
trueif the report has at least one template and output type compatible with this presentation
-
getAvailableTemplates
- Returns:
- templates of the report that are compatible with this presentation
-
resolveDefaultTemplate
@Nullable ReportTemplate resolveDefaultTemplate(@Nullable Report report, @Nullable ReportTemplate selectedTemplate) - Returns:
- the template that should be used by default for this presentation,
preferring
selectedTemplateif it is compatible
-
getAvailableOutputTypes
List<ReportOutputType> getAvailableOutputTypes(@Nullable Report report, @Nullable ReportTemplate template) - Returns:
- output types for the template that are compatible with this presentation
-
resolveDefaultOutputType
@Nullable ReportOutputType resolveDefaultOutputType(@Nullable Report report, @Nullable ReportTemplate template, @Nullable ReportOutputType selectedOutputType) - Returns:
- the output type that should be used by default for this presentation,
preferring
selectedOutputTypeif it is compatible
-
requiresUserChoice
boolean requiresUserChoice(@Nullable Report report, @Nullable ReportTemplate selectedTemplate, @Nullable ReportOutputType selectedOutputType) - Returns:
trueif the user must choose a template or output type before the report can be run with this presentation (e.g. multiple compatible templates exist and none is pre-selected)
-