Class SpreadsheetReportExecutionPresentation
java.lang.Object
io.jmix.reportsspreadsheetflowui.runner.SpreadsheetReportExecutionPresentation
- All Implemented Interfaces:
ReportExecutionPresentation
@Component("repspd_SpreadsheetReportExecutionPresentation")
public class SpreadsheetReportExecutionPresentation
extends Object
implements ReportExecutionPresentation
ReportExecutionPresentation that targets the embedded spreadsheet viewer.
Limits template and output-type choices to XLS/XLSX combinations that the spreadsheet viewer can render.
-
Constructor Summary
Constructors -
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) protected booleansupportsOutputType(@Nullable ReportOutputType outputType) booleansupportsReport(@Nullable Report report) protected booleansupportsTemplate(@Nullable ReportTemplate template)
-
Constructor Details
-
SpreadsheetReportExecutionPresentation
public SpreadsheetReportExecutionPresentation()
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceReportExecutionPresentation- Returns:
ReportExecutionPresentationIds.SPREADSHEET
-
supportsReport
- Specified by:
supportsReportin interfaceReportExecutionPresentation- Returns:
trueif the report has at least one template that can be opened in the spreadsheet viewer
-
getAvailableTemplates
- Specified by:
getAvailableTemplatesin interfaceReportExecutionPresentation- Returns:
- templates of the report that produce spreadsheet-compatible output
-
resolveDefaultTemplate
public @Nullable ReportTemplate resolveDefaultTemplate(@Nullable Report report, @Nullable ReportTemplate selectedTemplate) - Specified by:
resolveDefaultTemplatein interfaceReportExecutionPresentation- Returns:
- the template to use by default when opening in the spreadsheet viewer,
preferring
selectedTemplateif it is spreadsheet-compatible
-
getAvailableOutputTypes
public List<ReportOutputType> getAvailableOutputTypes(@Nullable Report report, @Nullable ReportTemplate template) - Specified by:
getAvailableOutputTypesin interfaceReportExecutionPresentation- Returns:
- output types for the template that are renderable in the spreadsheet viewer, or an empty list when the template does not support alterable output
-
resolveDefaultOutputType
public @Nullable ReportOutputType resolveDefaultOutputType(@Nullable Report report, @Nullable ReportTemplate template, @Nullable ReportOutputType selectedOutputType) - Specified by:
resolveDefaultOutputTypein interfaceReportExecutionPresentation- Returns:
- the output type to use by default when opening in the spreadsheet viewer,
preferring
selectedOutputTypeif it is spreadsheet-compatible
-
requiresUserChoice
public boolean requiresUserChoice(@Nullable Report report, @Nullable ReportTemplate selectedTemplate, @Nullable ReportOutputType selectedOutputType) - Specified by:
requiresUserChoicein interfaceReportExecutionPresentation- Returns:
trueif the user must choose a template or output type before the report can be opened in the spreadsheet viewer. Returnstruewhenever multiple spreadsheet-compatible templates exist (even if a default was pre-filled by the runner) or when the single template offers more than one compatible output type and none has been explicitly chosen.
-
supportsTemplate
-
supportsOutputType
-