Package se.conciliate.extensions.content
Interface RestData
- All Known Subinterfaces:
RestAttribute
,RestAttributeEnabled
,RestDocument
,RestDocumentType
,RestEdge
,RestLayer
,RestModel
,RestObject
,RestVertex
public interface RestData
Base interface for all data loaded in a RestContext.
-
Method Summary
Modifier and TypeMethodDescriptioncontext()
Returns the context for the loaded rest data.getCustomData
(String key) Returns previously stored custom data.default void
Called for each loaded entity when all entities in a rest context has been loaded.void
setCustomData
(String key, Object value) Annotates the data with a custom value.
-
Method Details
-
context
RestContext context()Returns the context for the loaded rest data.- Returns:
- The context.
-
setCustomData
Annotates the data with a custom value. This can be used by providers of rest-data to add custom data that can be used in later stages, for example when publishing reports.- Parameters:
key
- A unique key for the custom data.value
- The custom data.
-
getCustomData
Returns previously stored custom data.- Parameters:
key
- The key of the data.- Returns:
- The custom data or null if no such data exists.
-
onContextLoaded
default void onContextLoaded()Called for each loaded entity when all entities in a rest context has been loaded. This allows entities to initialize data that depends on the entire entity graph being loaded first.
-