Interface ModelMetadataProvider
-
- All Known Implementing Classes:
AttachmentEditorHtmlProvider
,ContentLikesMetadataProvider
,LabelsModelMetadataProvider
,PropertiesModelMetadataProvider
@PublicSpi public interface ModelMetadataProvider
Provides additional metadata such as Likes and Watches to API Model objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default Map<String,?>
getMetadata(Object entity, Expansions expansions)
Deprecated.since 5.10 Consider bulk evaluating meta-data by implementing getMetadataForAll.Map<Object,Map<String,?>>
getMetadataForAll(Iterable<Object> entities, Expansions expansions)
Fetches metadata for a list of entities, returning a map of maps of metadata.List<String>
getMetadataProperties()
Deprecated.since 6.12.0 - Must implement getProperties() on this interface.default List<MetadataProperty>
getProperties()
Get the type hierarchy of the fields and their types provided by this ModelMetadataProvider.
-
-
-
Method Detail
-
getMetadata
@Deprecated default Map<String,?> getMetadata(Object entity, Expansions expansions)
Deprecated.since 5.10 Consider bulk evaluating meta-data by implementing getMetadataForAll. Remove your implementation of the getMetadata method, which will cause Confluence to call the getMetadataForAll method instead.
-
getMetadataForAll
Map<Object,Map<String,?>> getMetadataForAll(Iterable<Object> entities, Expansions expansions)
Fetches metadata for a list of entities, returning a map of maps of metadata. Initially keyed by the entity, and then by the metadata property. Implementors should attempt to fetch the metadata efficiently and try to avoid performing an individual query per entity.- Parameters:
entities
- - a list of entities to fetch the metadata forexpansions
- - indicating which metadata (and at which depth) should be fetched for each entity- Returns:
- a map of maps of metadata, keyed by entity.
-
getMetadataProperties
@Deprecated List<String> getMetadataProperties()
Deprecated.since 6.12.0 - Must implement getProperties() on this interface. New implementations can return empty list here.Get the list of properties that this ModelMetadataProvider provides metadata for.
-
getProperties
default List<MetadataProperty> getProperties()
Get the type hierarchy of the fields and their types provided by this ModelMetadataProvider. This is used by graph-ql to contribute to the graph schema.
-
-