Class AbstractRemoteContentLabelService
- java.lang.Object
-
- com.atlassian.confluence.rest.client.AbstractRemoteService<ContentLabelService>
-
- com.atlassian.confluence.rest.client.AbstractRemoteContentLabelService
-
- All Implemented Interfaces:
RemoteContentLabelService
- Direct Known Subclasses:
GraphQLRemoteContentLabelServiceImpl
,RemoteContentLabelServiceImpl
public abstract class AbstractRemoteContentLabelService extends AbstractRemoteService<ContentLabelService> implements RemoteContentLabelService
ContentLabelService
implementation that communicates with Confluence remotely.- Since:
- 6.12.0
-
-
Field Summary
-
Fields inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
provider
-
-
Constructor Summary
Constructors Constructor Description AbstractRemoteContentLabelService(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
Deprecated.since 8.8AbstractRemoteContentLabelService(AuthenticatedWebResourceProvider provider, ExecutorService executor)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CompletionStage<PageResponse<Label>>
addLabelsCompletionStage(ContentId contentId, Iterable<Label> labels)
Adds the given labels to the specified contentcom.atlassian.util.concurrent.Promise<PageResponse<Label>>
getLabels(ContentId contentId, Collection<Label.Prefix> prefixes, PageRequest request)
Deprecated.since 8.7.abstract CompletionStage<PageResponse<Label>>
getLabelsCompletionStage(ContentId contentId, Collection<Label.Prefix> prefixes, PageRequest request)
Get the labels attached to a given piece of content in the given namespacesCompletionStage<Void>
removeLabelCompletionStage(ContentId contentId, Label label)
Remove a label with from the specified contentContentLabelService.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, deleteCompletionStage, deleteCompletionStage, deleteFuture, deleteFuture, getCompletionStage, getCompletionStageGenericCollection, getCompletionStageMap, getCompletionStageMapOfPageResponses, getCompletionStageOptional, getCompletionStagePageResponseList, getCompletionStageSearchPageResponseList, getExecutor, getFuture, getFutureGenericCollection, getFutureMap, getFutureMapOfPageResponses, getFutureOption, getFutureOptional, getFuturePageResponseList, newExperimentalRestWebResource, newRestWebResource, postCompletionStage, postCompletionStage, postCompletionStage, postCompletionStageToPageResponse, postFuture, postFuture, postFuture, postFutureToPageResponse, postVoidCompletionStage, putCompletionStage, putFuture
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.rest.client.RemoteContentLabelService
addLabels, removeLabel, removeLabel
-
-
-
-
Constructor Detail
-
AbstractRemoteContentLabelService
public AbstractRemoteContentLabelService(AuthenticatedWebResourceProvider provider, ExecutorService executor)
- Since:
- 8.8
-
AbstractRemoteContentLabelService
@Deprecated public AbstractRemoteContentLabelService(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
Deprecated.since 8.8
-
-
Method Detail
-
getLabels
@Deprecated public com.atlassian.util.concurrent.Promise<PageResponse<Label>> getLabels(ContentId contentId, Collection<Label.Prefix> prefixes, PageRequest request) throws NotFoundException
Deprecated.since 8.7. UsegetLabelsCompletionStage(ContentId, Collection, PageRequest)
instead.Description copied from interface:RemoteContentLabelService
Get the labels attached to a given piece of content in the given namespaces- Specified by:
getLabels
in interfaceRemoteContentLabelService
- Parameters:
contentId
- the id of the content to retrieve- Throws:
NotFoundException
- if the content does not exist, or is not viewable by the user
-
getLabelsCompletionStage
public abstract CompletionStage<PageResponse<Label>> getLabelsCompletionStage(ContentId contentId, Collection<Label.Prefix> prefixes, PageRequest request)
Description copied from interface:RemoteContentLabelService
Get the labels attached to a given piece of content in the given namespaces- Specified by:
getLabelsCompletionStage
in interfaceRemoteContentLabelService
- Parameters:
contentId
- the id of the content to retrieve
-
addLabelsCompletionStage
public CompletionStage<PageResponse<Label>> addLabelsCompletionStage(ContentId contentId, Iterable<Label> labels) throws ServiceException
Description copied from interface:RemoteContentLabelService
Adds the given labels to the specified content- Specified by:
addLabelsCompletionStage
in interfaceRemoteContentLabelService
- 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
-
removeLabelCompletionStage
public CompletionStage<Void> removeLabelCompletionStage(ContentId contentId, Label label)
Description copied from interface:RemoteContentLabelService
Remove a label with from the specified content- Specified by:
removeLabelCompletionStage
in interfaceRemoteContentLabelService
- Parameters:
contentId
- the id of the content to remove the label fromlabel
- the label to remove
-
validator
public ContentLabelService.Validator validator()
Remote validation is not currently supported, this method exists to satisfy the RemoteProxyCreator- Throws:
UnsupportedOperationException
-
-