com.atlassian.confluence.rest.client
Class RemoteContentLabelServiceImpl

java.lang.Object
  extended by com.atlassian.confluence.rest.client.AbstractRemoteService<ContentLabelService>
      extended by com.atlassian.confluence.rest.client.RemoteContentLabelServiceImpl
All Implemented Interfaces:
RemoteContentLabelService

public class RemoteContentLabelServiceImpl
extends AbstractRemoteService<ContentLabelService>
implements RemoteContentLabelService


Constructor Summary
RemoteContentLabelServiceImpl(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
           
 
Method Summary
 com.atlassian.util.concurrent.Promise<PageResponse<Label>> addLabels(ContentId contentId, java.lang.Iterable<Label> labels)
          Adds the given labels to the specified content
 com.atlassian.util.concurrent.Promise<PageResponse<Label>> getLabels(ContentId contentId, java.util.Collection<Label.Prefix> prefixes, PageRequest request)
          Get the labels attached to a given piece of content in the given namespaces
 void removeLabels(ContentId contentId, java.lang.Iterable<Label> labels)
          Remove a label with labelId from the specified content
 ContentLabelService.Validator validator()
          Remote validation is not currently supported, this method exists to satisfy the RemoteProxyCreator
 
Methods inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
addExpansions, addPageRequest, addPageRequestParams, deleteFuture, deleteFuture, getFutureGenericCollection, getFutureMapOfPageResponses, getFutureOption, getFuturePageResponseList, newExperimentalRestWebResource, newRestWebResource, postFuture, postFuture, postFuture, postFutureToPageResponse, putFuture
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteContentLabelServiceImpl

public RemoteContentLabelServiceImpl(AuthenticatedWebResourceProvider provider,
                                     com.google.common.util.concurrent.ListeningExecutorService executor)
Method Detail

getLabels

public com.atlassian.util.concurrent.Promise<PageResponse<Label>> getLabels(ContentId contentId,
                                                                            java.util.Collection<Label.Prefix> prefixes,
                                                                            PageRequest request)
                                                                     throws NotFoundException
Description copied from interface: RemoteContentLabelService
Get the labels attached to a given piece of content in the given namespaces

Specified by:
getLabels in interface RemoteContentLabelService
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

public com.atlassian.util.concurrent.Promise<PageResponse<Label>> addLabels(ContentId contentId,
                                                                            java.lang.Iterable<Label> labels)
                                                                     throws ServiceException
Description copied from interface: RemoteContentLabelService
Adds the given labels to the specified content

Specified by:
addLabels in interface RemoteContentLabelService
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

public void removeLabels(ContentId contentId,
                         java.lang.Iterable<Label> labels)
                  throws ServiceException
Description copied from interface: RemoteContentLabelService
Remove a label with labelId from the specified content

Specified by:
removeLabels in interface RemoteContentLabelService
Parameters:
contentId - the id of the content to remove the label from
labels - the labels to remove
Throws:
ServiceException - failed to remove the label

validator

public ContentLabelService.Validator validator()
Remote validation is not currently supported, this method exists to satisfy the RemoteProxyCreator

Throws:
java.lang.UnsupportedOperationException


Copyright © 2003-2014 Atlassian. All Rights Reserved.