Class AbstractDataGridExporter<T extends AbstractDataGridExporter<?>>
java.lang.Object
io.jmix.gridexportflowui.exporter.AbstractDataGridExporter<T>
- All Implemented Interfaces:
DataGridExporter
- Direct Known Subclasses:
ExcelExporter
,JsonExporter
public abstract class AbstractDataGridExporter<T extends AbstractDataGridExporter<?>>
extends Object
implements DataGridExporter
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.gridexportflowui.exporter.DataGridExporter
DataGridExporter.ColumnValueContext
-
Field Summary
Modifier and TypeFieldDescriptionprotected Map<String,
Function<DataGridExporter.ColumnValueContext, Object>> protected CoreProperties
protected DatatypeRegistry
protected String
protected Messages
protected MessageTools
protected MetadataTools
protected UiProperties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addColumnValueProvider
(String columnId, Function<DataGridExporter.ColumnValueContext, Object> columnValueProvider) Adds a function to get value from the column.protected Function<Object,
InstanceContainer<Object>> createInstanceContainerProvider
(com.vaadin.flow.component.grid.Grid<?> dataGrid, Object item) protected String
formatValue
(Object cellValue) protected String
formatValue
(Object cellValue, MetaPropertyPath metaPropertyPath) protected Object
getColumnValue
(com.vaadin.flow.component.grid.Grid<?> dataGrid, com.vaadin.flow.component.grid.Grid.Column<?> column, Object instance) getColumnValueProvider
(String columnId) protected String
getFileName
(com.vaadin.flow.component.grid.Grid<Object> dataGrid) protected String
getMetaClassName
(MetaClass metaClass) void
removeColumnValueProvider
(String columnId) Removes an column value provider function by column id.void
setCoreProperties
(CoreProperties coreProperties) void
setDatatypeRegistry
(DatatypeRegistry datatypeRegistry) void
setFileName
(String fileName) void
setMessages
(Messages messages) void
setMessageTools
(MessageTools messageTools) void
setMetadataTools
(MetadataTools metadataTools) void
setUiProperties
(UiProperties uiProperties) withFileName
(String fileName) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.gridexportflowui.exporter.DataGridExporter
exportDataGrid, getLabel
-
Field Details
-
messageTools
-
datatypeRegistry
-
messages
-
metadataTools
-
uiProperties
-
coreProperties
-
fileName
-
columnValueProviders
-
-
Constructor Details
-
AbstractDataGridExporter
public AbstractDataGridExporter()
-
-
Method Details
-
setMessageTools
-
setDatatypeRegistry
-
setMessages
-
setMetadataTools
-
setUiProperties
-
setCoreProperties
-
getFileName
-
setFileName
- Specified by:
setFileName
in interfaceDataGridExporter
-
withFileName
-
addColumnValueProvider
public void addColumnValueProvider(String columnId, Function<DataGridExporter.ColumnValueContext, Object> columnValueProvider) Description copied from interface:DataGridExporter
Adds a function to get value from the column.- Specified by:
addColumnValueProvider
in interfaceDataGridExporter
- Parameters:
columnId
- column idcolumnValueProvider
- column value provider function
-
removeColumnValueProvider
Description copied from interface:DataGridExporter
Removes an column value provider function by column id.- Specified by:
removeColumnValueProvider
in interfaceDataGridExporter
- Parameters:
columnId
- column id
-
getColumnValueProvider
@Nullable public Function<DataGridExporter.ColumnValueContext,Object> getColumnValueProvider(String columnId) - Specified by:
getColumnValueProvider
in interfaceDataGridExporter
- Parameters:
columnId
- column id- Returns:
- column value provider function for the column id
-
getMetaClassName
-
getFileName
-
getColumnValue
-
createInstanceContainerProvider
protected Function<Object,InstanceContainer<Object>> createInstanceContainerProvider(com.vaadin.flow.component.grid.Grid<?> dataGrid, Object item) -
formatValue
-
formatValue
-