com.atlassian.confluence.plugins.restapi.metadata.content
Class LabelsModelMetadataProvider

java.lang.Object
  extended by com.atlassian.confluence.plugins.restapi.metadata.content.LabelsModelMetadataProvider
All Implemented Interfaces:
ModelMetadataProvider

public class LabelsModelMetadataProvider
extends Object
implements ModelMetadataProvider

Provides content metadata pertaining to labels on a Content entity.


Constructor Summary
LabelsModelMetadataProvider(ContentLabelService contentLabelService, NavigationService navigationService)
           
 
Method Summary
 Map<String,?> getMetadata(Object entity, Expansions expansions)
          Returns keyed metadata based on the passed entity and the expansions.
 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()
          get the list of properties that the MetadataProvider provides metadata for
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelsModelMetadataProvider

public LabelsModelMetadataProvider(ContentLabelService contentLabelService,
                                   NavigationService navigationService)
Method Detail

getMetadata

public Map<String,?> getMetadata(Object entity,
                                 Expansions expansions)
Description copied from interface: ModelMetadataProvider
Returns keyed metadata based on the passed entity and the expansions.

Specified by:
getMetadata in interface ModelMetadataProvider
Parameters:
entity - a Confluence API object (e.g. Content, Space)
expansions - indicating which metadata (and at which depth) to include
Returns:
Jackson-serializable metadata keyed by globally-unique strings, else an empty Map

getMetadataForAll

public Map<Object,Map<String,?>> getMetadataForAll(Iterable<Object> entities,
                                                   Expansions expansions)
Description copied from interface: ModelMetadataProvider
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.

Specified by:
getMetadataForAll in interface ModelMetadataProvider
Parameters:
entities - - a list of entities to fetch the metadata for
expansions - - indicating which metadata (and at which depth) should be fetched for each entity
Returns:
a map of maps of metadata, keyed by entity.

getMetadataProperties

public List<String> getMetadataProperties()
Description copied from interface: ModelMetadataProvider
get the list of properties that the MetadataProvider provides metadata for

Specified by:
getMetadataProperties in interface ModelMetadataProvider
Returns:


Copyright © 2003–2015 Atlassian. All rights reserved.