@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 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 ChartSerializerpublic java.lang.String serializeChanges(AbstractChart chart, ChartIncrementalChanges changes)
serializeChanges in interface ChartSerializerprotected ChartJsonSerializationContext createChartJsonSerializationContext(AbstractChart chart)
public java.lang.String toJson(java.lang.Object value)
toJson in interface ChartSerializerpublic java.util.function.Function<DataItem,java.lang.String> getDataItemKeyMapper()
getDataItemKeyMapper in interface HasDataItemKeyMapperpublic void setDataItemKeyMapper(java.util.function.Function<DataItem,java.lang.String> itemKeyMapper)
setDataItemKeyMapper in interface HasDataItemKeyMapper