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
FieldsModifier and TypeFieldDescriptionprotected Map<String,Function<DataGridExporter.ColumnValueContext, Object>> protected CorePropertiesprotected DatatypeRegistryprotected Stringprotected Messagesprotected MessageToolsprotected MetadataToolsprotected UiProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumnValueProvider(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 StringformatValue(Object cellValue) protected StringformatValue(Object cellValue, MetaPropertyPath metaPropertyPath) protected ObjectgetColumnValue(com.vaadin.flow.component.grid.Grid<?> dataGrid, com.vaadin.flow.component.grid.Grid.Column<?> column, Object instance) getColumnValueProvider(String columnId) protected StringgetFileName(com.vaadin.flow.component.grid.Grid<Object> dataGrid) protected StringgetMetaClassName(MetaClass metaClass) voidremoveColumnValueProvider(String columnId) Removes an column value provider function by column id.voidsetCoreProperties(CoreProperties coreProperties) voidsetDatatypeRegistry(DatatypeRegistry datatypeRegistry) voidsetFileName(String fileName) voidsetMessages(Messages messages) voidsetMessageTools(MessageTools messageTools) voidsetMetadataTools(MetadataTools metadataTools) voidsetUiProperties(UiProperties uiProperties) withFileName(String fileName) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
-
withFileName
-
addColumnValueProvider
public void addColumnValueProvider(String columnId, Function<DataGridExporter.ColumnValueContext, Object> columnValueProvider) Description copied from interface:DataGridExporterAdds a function to get value from the column.- Specified by:
addColumnValueProviderin interfaceDataGridExporter- Parameters:
columnId- column idcolumnValueProvider- column value provider function
-
removeColumnValueProvider
Description copied from interface:DataGridExporterRemoves an column value provider function by column id.- Specified by:
removeColumnValueProviderin interfaceDataGridExporter- Parameters:
columnId- column id
-
getColumnValueProvider
@Nullable public Function<DataGridExporter.ColumnValueContext,Object> getColumnValueProvider(String columnId) - Specified by:
getColumnValueProviderin 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
-