Package io.jmix.gridexportui.exporter
Class AbstractTableExporter<T extends AbstractTableExporter>
java.lang.Object
io.jmix.gridexportui.exporter.AbstractTableExporter<T>
- All Implemented Interfaces:
TableExporter
- Direct Known Subclasses:
ExcelExporter,JsonExporter
public abstract class AbstractTableExporter<T extends AbstractTableExporter>
extends Object
implements TableExporter
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.gridexportui.exporter.TableExporter
TableExporter.ColumnValueContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String,Function<TableExporter.ColumnValueContext, Object>> protected CorePropertiesprotected DatatypeRegistryprotected Stringprotected Messagesprotected MessageToolsprotected MetadataToolsprotected UiProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumnValueProvider(String columnId, Function<TableExporter.ColumnValueContext, Object> columnValueProvider) Adds a function to get value from the column.protected Function<Object,InstanceContainer<Object>> createInstanceContainerProvider(DataGrid dataGrid, Object item) protected StringformatValue(Object cellValue) protected StringformatValue(Object cellValue, MetaPropertyPath metaPropertyPath) protected ObjectgetColumnValue(DataGrid dataGrid, DataGrid.Column column, Object instance) protected ObjectgetColumnValue(Table table, Table.Column column, Object instance) getColumnValueProvider(String columnId) protected StringgetFileName(DataGrid<Object> dataGrid) protected StringgetFileName(Table<Object> table) protected StringgetMetaClassName(MetaClass metaClass) voidremoveColumnValueProvider(String columnId) Removes an column value provider function by column id.voidsetFileName(String fileName) 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.gridexportui.exporter.TableExporter
exportDataGrid, exportTable, getCaption
-
Field Details
-
messageTools
-
messages
-
metadataTools
-
datatypeRegistry
-
uiProperties
-
coreProperties
-
fileName
-
columnValueProviders
-
-
Constructor Details
-
AbstractTableExporter
public AbstractTableExporter()
-
-
Method Details
-
getFileName
-
setFileName
-
withFileName
-
addColumnValueProvider
public void addColumnValueProvider(String columnId, Function<TableExporter.ColumnValueContext, Object> columnValueProvider) Description copied from interface:TableExporterAdds a function to get value from the column.- Specified by:
addColumnValueProviderin interfaceTableExporter- Parameters:
columnId- column idcolumnValueProvider- column value provider function
-
removeColumnValueProvider
Description copied from interface:TableExporterRemoves an column value provider function by column id.- Specified by:
removeColumnValueProviderin interfaceTableExporter- Parameters:
columnId- column id
-
getColumnValueProvider
@Nullable public Function<TableExporter.ColumnValueContext,Object> getColumnValueProvider(String columnId) - Specified by:
getColumnValueProviderin interfaceTableExporter- Parameters:
columnId- column id- Returns:
- column value provider function for the column id
-
getMetaClassName
-
getFileName
-
getFileName
-
getColumnValue
-
getColumnValue
@Nullable protected Object getColumnValue(DataGrid dataGrid, DataGrid.Column column, Object instance) -
createInstanceContainerProvider
-
formatValue
-
formatValue
-