Interface ModelMetadataProvider
- All Known Implementing Classes:
ContentLikesMetadataProvider
,LabelsModelMetadataProvider
,PropertiesModelMetadataProvider
@PublicSpi
public interface ModelMetadataProvider
Provides additional metadata such as Likes and Watches to API Model objects.
-
Method Summary
Modifier and TypeMethodDescriptiongetMetadata
(Object entity, Expansions expansions) Deprecated.since 5.10 Consider bulk evaluating meta-data by implementing getMetadataForAll.getMetadataForAll
(Iterable<Object> entities, Expansions expansions) Fetches metadata for a list of entities, returning a map of maps of metadata.Deprecated.since 6.12.0 - Must implement getProperties() on this interface.default List<MetadataProperty>
Get the type hierarchy of the fields and their types provided by this ModelMetadataProvider.
-
Method Details
-
getMetadata
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
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.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
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.
-