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.ApplicationContext
protected PivotTableExcelExporter
protected String
protected 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 TypeMethodDescriptionvoid
protected void
checkRenderer
(Renderer renderer) protected void
void
Exports PivotTable to Xls file.void
exportTableToXls
(Downloader downloader) Exports PivotTable to Xls file.boolean
isRendererSupported
(Renderer renderer) Checks whether renderer is supported by the exporter.void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
setExportFormat
(PivotTableExcelExporter.ExportFormat exportFormat) Sets export formatXLS
orXLSX
.void
setFileName
(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:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
exportTableToXls
public void exportTableToXls()Description copied from interface:PivotTableExporter
Exports PivotTable to Xls file.- Specified by:
exportTableToXls
in interfacePivotTableExporter
-
exportTableToXls
Description copied from interface:PivotTableExporter
Exports PivotTable to Xls file.- Specified by:
exportTableToXls
in interfacePivotTableExporter
- Parameters:
downloader
- downloader to save file
-
setFileName
Description copied from interface:PivotTableExporter
Sets the file name.- Specified by:
setFileName
in interfacePivotTableExporter
- Parameters:
fileName
- file name
-
getFileName
- Specified by:
getFileName
in interfacePivotTableExporter
- Returns:
- file name
-
getPivotData
- Specified by:
getPivotData
in interfacePivotTableExporter
- Returns:
- serialized object from JSON which represents PivotTable with aggregated data
-
isRendererSupported
Description copied from interface:PivotTableExporter
Checks whether renderer is supported by the exporter.- Specified by:
isRendererSupported
in interfacePivotTableExporter
- Parameters:
renderer
- renderer to check- Returns:
true
if renderer is supported by the exporter
-
getExportFormat
- Specified by:
getExportFormat
in interfacePivotTableExporter
- Returns:
- export format
XLS
orXLSX
-
setExportFormat
Description copied from interface:PivotTableExporter
Sets export formatXLS
orXLSX
. The default value isXLSX
.- Specified by:
setExportFormat
in interfacePivotTableExporter
- Parameters:
exportFormat
- format that should have exported file
-
checkSupportedRenderer
protected void checkSupportedRenderer() -
checkRenderer
-
PivotTableExporterImpl(PivotTable)