com.atlassian.confluence.rest.client
Interface RemoteContentLabelService

All Known Implementing Classes:
RemoteContentLabelServiceImpl

@ExperimentalApi
public interface RemoteContentLabelService

ContentLabelService implementation that communicates with Confluence remotely using the Confluence REST API. Provides Promise returning equivalents for the methods in ContentLabelService.


Method Summary
 com.atlassian.util.concurrent.Promise<? extends Iterable<Label>> addLabels(ContentId contentId, Iterable<Label> labels)
          Adds the given labels to the specified content
 com.atlassian.util.concurrent.Promise<? extends Iterable<Label>> getLabels(ContentId contentId, Collection<Label.Prefix> prefixes, PageRequest request)
          Get the labels attached to a given piece of content in the given namespaces
 void removeLabels(ContentId contentId, Iterable<Label> labels)
          Remove a label with labelId from the specified content
 

Method Detail

getLabels

com.atlassian.util.concurrent.Promise<? extends Iterable<Label>> getLabels(ContentId contentId,
                                                                           Collection<Label.Prefix> prefixes,
                                                                           PageRequest request)
                                                                           throws NotFoundException
Get the labels attached to a given piece of content in the given namespaces

Parameters:
contentId - the id of the content to retrieve
Throws:
NotFoundException - if the content does not exist, or is not viewable by the user

addLabels

com.atlassian.util.concurrent.Promise<? extends Iterable<Label>> addLabels(ContentId contentId,
                                                                           Iterable<Label> labels)
                                                                           throws ServiceException
Adds the given labels to the specified content

Parameters:
contentId - the id of the content to add labels to
labels - the label(s) that will be added
Returns:
all the labels that are associated with the specified content
Throws:
ServiceException - if at least one label is invalid. Provides an error message

removeLabels

void removeLabels(ContentId contentId,
                  Iterable<Label> labels)
                  throws ServiceException
Remove a label with labelId from the specified content

Parameters:
contentId - the id of the content to remove the label from
labels - the labels to remove
Throws:
ServiceException - failed to remove the label


Copyright © 2003–2015 Atlassian. All rights reserved.