Class PivotTableExporterImpl

java.lang.Object
io.jmix.pivottableflowui.export.PivotTableExporterImpl
All Implemented Interfaces:
PivotTableExporter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

@Component("pvttbl_PivotTableExporter") @Scope("prototype") public class PivotTableExporterImpl extends Object implements PivotTableExporter, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
Prepare the data PivotData requested from PivotTable, then export to an XLS file.
  • Field Details

    • supportedRenderers

      public static final Set<Renderer> supportedRenderers
    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
    • excelExporter

      protected PivotTableExcelExporter excelExporter
    • pivotTable

      protected PivotTable<?> pivotTable
    • fileName

      protected String fileName
  • Constructor Details

  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • exportTableToXls

      public void exportTableToXls()
      Description copied from interface: PivotTableExporter
      Exports PivotTable to Xls file.
      Specified by:
      exportTableToXls in interface PivotTableExporter
    • exportTableToXls

      public void exportTableToXls(Downloader downloader)
      Description copied from interface: PivotTableExporter
      Exports PivotTable to Xls file.
      Specified by:
      exportTableToXls in interface PivotTableExporter
      Parameters:
      downloader - downloader to save file
    • setFileName

      public void setFileName(String fileName)
      Description copied from interface: PivotTableExporter
      Sets the file name.
      Specified by:
      setFileName in interface PivotTableExporter
      Parameters:
      fileName - file name
    • getFileName

      public String getFileName()
      Specified by:
      getFileName in interface PivotTableExporter
      Returns:
      file name
    • getPivotData

      public PivotData getPivotData()
      Specified by:
      getPivotData in interface PivotTableExporter
      Returns:
      serialized object from JSON which represents PivotTable with aggregated data
    • isRendererSupported

      public boolean isRendererSupported(Renderer renderer)
      Description copied from interface: PivotTableExporter
      Checks whether renderer is supported by the exporter.
      Specified by:
      isRendererSupported in interface PivotTableExporter
      Parameters:
      renderer - renderer to check
      Returns:
      true if renderer is supported by the exporter
    • getExportFormat

      public PivotTableExcelExporter.ExportFormat getExportFormat()
      Specified by:
      getExportFormat in interface PivotTableExporter
      Returns:
      export format XLS or XLSX
    • setExportFormat

      public void setExportFormat(PivotTableExcelExporter.ExportFormat exportFormat)
      Description copied from interface: PivotTableExporter
      Sets export format XLS or XLSX. The default value is XLSX.
      Specified by:
      setExportFormat in interface PivotTableExporter
      Parameters:
      exportFormat - format that should have exported file
    • checkSupportedRenderer

      protected void checkSupportedRenderer()
    • checkRenderer

      protected void checkRenderer(@Nullable Renderer renderer)