@Component(value="ui_JmixChartSerializer") @Scope(value="prototype") public class JmixChartSerializer extends java.lang.Object implements ChartSerializer
Modifier and Type | Field and Description |
---|---|
protected static com.google.gson.Gson |
chartGson |
protected java.util.function.Function<DataItem,java.lang.String> |
itemKeyMapper |
protected ChartDataItemsSerializer |
itemsSerializer |
Constructor and Description |
---|
JmixChartSerializer() |
Modifier and Type | Method and Description |
---|---|
protected void |
beforeConvertToJson(com.google.gson.JsonElement jsonTree,
ChartJsonSerializationContext context) |
protected ChartJsonSerializationContext |
createChartJsonSerializationContext(AbstractChart chart) |
java.util.function.Function<DataItem,java.lang.String> |
getDataItemKeyMapper() |
java.lang.String |
serialize(AbstractChart chart) |
java.lang.String |
serializeChanges(AbstractChart chart,
ChartIncrementalChanges changes) |
void |
setDataItemKeyMapper(java.util.function.Function<DataItem,java.lang.String> itemKeyMapper) |
protected void |
setItemsSerializer(ChartDataItemsSerializer chartDataItemsSerializer) |
java.lang.String |
toJson(java.lang.Object value) |
protected static final com.google.gson.Gson chartGson
protected java.util.function.Function<DataItem,java.lang.String> itemKeyMapper
protected ChartDataItemsSerializer itemsSerializer
@Autowired protected void setItemsSerializer(ChartDataItemsSerializer chartDataItemsSerializer)
public java.lang.String serialize(AbstractChart chart)
serialize
in interface ChartSerializer
protected void beforeConvertToJson(com.google.gson.JsonElement jsonTree, ChartJsonSerializationContext context)
public java.lang.String serializeChanges(AbstractChart chart, ChartIncrementalChanges changes)
serializeChanges
in interface ChartSerializer
protected ChartJsonSerializationContext createChartJsonSerializationContext(AbstractChart chart)
public java.lang.String toJson(java.lang.Object value)
toJson
in interface ChartSerializer
public java.util.function.Function<DataItem,java.lang.String> getDataItemKeyMapper()
getDataItemKeyMapper
in interface HasDataItemKeyMapper
public void setDataItemKeyMapper(java.util.function.Function<DataItem,java.lang.String> itemKeyMapper)
setDataItemKeyMapper
in interface HasDataItemKeyMapper