Package io.jmix.pivottableflowui.export
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 Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected PivotTableExcelExporterprotected Stringprotected PivotTable<?> -
Constructor Summary
ConstructorsConstructorDescriptionPivotTableExporterImpl(PivotTable<?> pivotTable) PivotTableExporterImpl(PivotTable<?> pivotTable, PivotTableExcelExporter exporter) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidcheckRenderer(Renderer renderer) protected voidvoidExports PivotTable to Xls file.voidexportTableToXls(Downloader downloader) Exports PivotTable to Xls file.booleanisRendererSupported(Renderer renderer) Checks whether renderer is supported by the exporter.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetExportFormat(PivotTableExcelExporter.ExportFormat exportFormat) Sets export formatXLSorXLSX.voidsetFileName(String fileName) Sets the file name.
-
Field Details
-
supportedRenderers
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
excelExporter
-
pivotTable
-
fileName
-
-
Constructor Details
-
PivotTableExporterImpl
-
PivotTableExporterImpl
@Deprecated(since="2.4.1", forRemoval=true) public PivotTableExporterImpl(PivotTable<?> pivotTable, PivotTableExcelExporter exporter) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
exportTableToXls
public void exportTableToXls()Description copied from interface:PivotTableExporterExports PivotTable to Xls file.- Specified by:
exportTableToXlsin interfacePivotTableExporter
-
exportTableToXls
Description copied from interface:PivotTableExporterExports PivotTable to Xls file.- Specified by:
exportTableToXlsin interfacePivotTableExporter- Parameters:
downloader- downloader to save file
-
setFileName
Description copied from interface:PivotTableExporterSets the file name.- Specified by:
setFileNamein interfacePivotTableExporter- Parameters:
fileName- file name
-
getFileName
- Specified by:
getFileNamein interfacePivotTableExporter- Returns:
- file name
-
getPivotData
- Specified by:
getPivotDatain interfacePivotTableExporter- Returns:
- serialized object from JSON which represents PivotTable with aggregated data
-
isRendererSupported
Description copied from interface:PivotTableExporterChecks whether renderer is supported by the exporter.- Specified by:
isRendererSupportedin interfacePivotTableExporter- Parameters:
renderer- renderer to check- Returns:
trueif renderer is supported by the exporter
-
getExportFormat
- Specified by:
getExportFormatin interfacePivotTableExporter- Returns:
- export format
XLSorXLSX
-
setExportFormat
Description copied from interface:PivotTableExporterSets export formatXLSorXLSX. The default value isXLSX.- Specified by:
setExportFormatin interfacePivotTableExporter- Parameters:
exportFormat- format that should have exported file
-
checkSupportedRenderer
protected void checkSupportedRenderer() -
checkRenderer
-
PivotTableExporterImpl(PivotTable)