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 Modifier Constructor Description protected
AbstractRemoteContentLabelService(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description com.atlassian.util.concurrent.Promise<PageResponse<Label>>
addLabels(ContentId contentId, Iterable<Label> labels)
Deprecated.since 7.0.1.CompletionStage<PageResponse<Label>>
addLabelsCompletionStage(ContentId contentId, Iterable<Label> labels)
Adds the given labels to the specified contentabstract com.atlassian.util.concurrent.Promise<PageResponse<Label>>
getLabels(ContentId contentId, Collection<Label.Prefix> prefixes, PageRequest request)
Deprecated.since 7.0.1.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 namespacescom.atlassian.util.concurrent.Promise<Void>
removeLabel(ContentId contentId, Label label)
Deprecated.since 7.0.1.com.atlassian.util.concurrent.Promise<Void>
removeLabel(ContentId contentId, String label)
Deprecated.since 6.5.0 use {removeLabelCompletionStage(ContentId, Label)
}CompletionStage<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, getFuturePageResponseList, newExperimentalRestWebResource, newRestWebResource, postCompletionStage, postCompletionStage, postCompletionStage, postCompletionStageToPageResponse, postFuture, postFuture, postFuture, postFutureToPageResponse, postVoidCompletionStage, putCompletionStage, putFuture
-
-
-
-
Constructor Detail
-
AbstractRemoteContentLabelService
protected AbstractRemoteContentLabelService(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
-
-
Method Detail
-
getLabels
@Deprecated public abstract com.atlassian.util.concurrent.Promise<PageResponse<Label>> getLabels(ContentId contentId, Collection<Label.Prefix> prefixes, PageRequest request)
Deprecated.since 7.0.1. 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
-
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
-
addLabels
@Deprecated public com.atlassian.util.concurrent.Promise<PageResponse<Label>> addLabels(ContentId contentId, Iterable<Label> labels) throws ServiceException
Deprecated.since 7.0.1. UseaddLabelsCompletionStage(ContentId, Iterable)
instead.Description copied from interface:RemoteContentLabelService
Adds the given labels to the specified content- Specified by:
addLabels
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
-
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
-
removeLabel
@Deprecated public com.atlassian.util.concurrent.Promise<Void> removeLabel(ContentId contentId, String label) throws ServiceException
Deprecated.since 6.5.0 use {removeLabelCompletionStage(ContentId, Label)
}Description copied from interface:RemoteContentLabelService
Remove a label with labelId from the specified content- Specified by:
removeLabel
in interfaceRemoteContentLabelService
- Parameters:
contentId
- the id of the content to remove the label fromlabel
- the label to remove- Throws:
ServiceException
- failed to remove the label
-
removeLabel
@Deprecated public com.atlassian.util.concurrent.Promise<Void> removeLabel(ContentId contentId, Label label)
Deprecated.since 7.0.1. UseremoveLabelCompletionStage(ContentId, Label)
instead.Description copied from interface:RemoteContentLabelService
Remove a label with from the specified content- Specified by:
removeLabel
in interfaceRemoteContentLabelService
- Parameters:
contentId
- the id of the content to remove the label fromlabel
- the label to remove
-
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
-
-