T - the data type@FunctionalInterface public interface DataGenerator<T> extends Serializable
DataCommunicator. Used to inject custom data to
data items sent to the client for extension purposes.| Modifier and Type | Method and Description |
|---|---|
default void |
destroyAllData()
Informs the
DataGenerator that all data has been dropped. |
default void |
destroyData(T item)
Informs the
DataGenerator that the given data item has been
dropped and is no longer needed. |
void |
generateData(T item,
elemental.json.JsonObject jsonObject)
Adds custom data for the given item to its serialized
JsonObject
representation. |
default void |
refreshData(T item)
Informs the
DataGenerator that a data object has been updated. |
void generateData(T item, elemental.json.JsonObject jsonObject)
JsonObject
representation. This JSON object will be sent to client-side
DataProvider.item - the data item being serializedjsonObject - the JSON object being sent to the clientdefault void destroyData(T item)
DataGenerator that the given data item has been
dropped and is no longer needed. This method should clean up any unneeded
information stored for this item.item - the dropped data itemdefault void destroyAllData()
DataGenerator that all data has been dropped. This
method should clean up any unneeded information stored for items.default void refreshData(T item)
DataGenerator that a data object has been updated.
This method should update any unneeded information stored for given item.item - the updated itemCopyright © 2025. All rights reserved.