com.atlassian.confluence.rest.client
Class RemoteContentLabelServiceImpl
java.lang.Object
com.atlassian.confluence.rest.client.AbstractRemoteService<ContentLabelService>
com.atlassian.confluence.rest.client.RemoteContentLabelServiceImpl
- All Implemented Interfaces:
- RemoteContentLabelService
public class RemoteContentLabelServiceImpl
- extends AbstractRemoteService<ContentLabelService>
- implements RemoteContentLabelService
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 |
RemoteContentLabelServiceImpl
public RemoteContentLabelServiceImpl(AuthenticatedWebResourceProvider provider,
com.google.common.util.concurrent.ListeningExecutorService executor)
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 tolabels
- 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 fromlabels
- 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.