@Component(value="ui_JmixStockChartSerializer") @Scope(value="prototype") public class JmixStockChartSerializer extends java.lang.Object implements StockChartSerializer
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 |
---|
JmixStockChartSerializer() |
Modifier and Type | Method and Description |
---|---|
protected ChartJsonSerializationContext |
createChartJsonSerializationContext(StockChartGroup chart) |
java.util.function.Function<DataItem,java.lang.String> |
getDataItemKeyMapper() |
java.lang.String |
serialize(StockChartGroup chart) |
java.lang.String |
serializeChanges(StockChartGroup chart,
java.util.Map<DataSet,ChartIncrementalChanges> changedItems) |
void |
setDataItemKeyMapper(java.util.function.Function<DataItem,java.lang.String> itemKeyMapper) |
protected static void |
setDefaultProperties(com.google.gson.GsonBuilder builder) |
protected void |
setItemsSerializer(ChartDataItemsSerializer chartDataItemsSerializer) |
protected static final com.google.gson.Gson chartGson
protected java.util.function.Function<DataItem,java.lang.String> itemKeyMapper
protected ChartDataItemsSerializer itemsSerializer
protected static void setDefaultProperties(com.google.gson.GsonBuilder builder)
@Autowired protected void setItemsSerializer(ChartDataItemsSerializer chartDataItemsSerializer)
public java.lang.String serialize(StockChartGroup chart)
serialize
in interface StockChartSerializer
public java.lang.String serializeChanges(StockChartGroup chart, java.util.Map<DataSet,ChartIncrementalChanges> changedItems)
serializeChanges
in interface StockChartSerializer
protected ChartJsonSerializationContext createChartJsonSerializationContext(StockChartGroup chart)
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