Package io.jmix.uiexport.exporter.json
Class JsonExporter
java.lang.Object
io.jmix.uiexport.exporter.AbstractTableExporter<JsonExporter>
io.jmix.uiexport.exporter.json.JsonExporter
- All Implemented Interfaces:
TableExporter
@Component("ui_JsonExporter")
@Scope("prototype")
public class JsonExporter
extends AbstractTableExporter<JsonExporter>
Use this class to export
Just create an instance of
Table
into JSON format.
Just create an instance of
ExportAction
with withExporter
method.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.uiexport.exporter.TableExporter
TableExporter.ColumnValueContext
-
Field Summary
Modifier and TypeFieldDescriptionprotected Function<com.google.gson.GsonBuilder,
com.google.gson.GsonBuilder> protected Metadata
Fields inherited from class io.jmix.uiexport.exporter.AbstractTableExporter
columnValueProviders, coreProperties, datatypeRegistry, fileName, messages, messageTools, metadataTools, uiProperties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected com.google.gson.Gson
void
exportDataGrid
(Downloader downloader, DataGrid<Object> dataGrid, ExportMode exportMode) downloaddataGrid
content viadownloader
void
exportTable
(Downloader downloader, Table<Object> table, ExportMode exportMode) downloadtable
content viadownloader
returns exporter captionprotected Collection<Object>
getItems
(DataGrid<Object> dataGrid, ExportMode exportMode) protected Collection<Object>
getItems
(Table<Object> table, ExportMode exportMode) withGsonConfigurator
(Function<com.google.gson.GsonBuilder, com.google.gson.GsonBuilder> gsonConfigurator) Configure Gson builder for exportMethods inherited from class io.jmix.uiexport.exporter.AbstractTableExporter
addColumnValueProvider, createInstanceContainerProvider, formatValue, formatValue, getColumnValue, getColumnValue, getColumnValueProvider, getFileName, getFileName, getFileName, getMetaClassName, removeColumnValueProvider, setFileName, withFileName
-
Field Details
-
metadata
-
gsonConfigurer
-
-
Constructor Details
-
JsonExporter
public JsonExporter()
-
-
Method Details
-
withGsonConfigurator
public JsonExporter withGsonConfigurator(Function<com.google.gson.GsonBuilder, com.google.gson.GsonBuilder> gsonConfigurator) Configure Gson builder for export- Parameters:
gsonConfigurator
- Gson configurator function- Returns:
- exporter instance
-
exportTable
Description copied from interface:TableExporter
downloadtable
content viadownloader
-
exportDataGrid
Description copied from interface:TableExporter
downloaddataGrid
content viadownloader
-
createGsonForSerialization
protected com.google.gson.Gson createGsonForSerialization() -
getItems
-
getItems
-
getCaption
Description copied from interface:TableExporter
returns exporter caption
-