Interface RemoteContentLabelService
-
- All Known Implementing Classes:
AbstractRemoteContentLabelService
,GraphQLRemoteContentLabelServiceImpl
,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
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description com.atlassian.util.concurrent.Promise<? extends Iterable<Label>>
addLabels(ContentId contentId, Iterable<Label> labels)
Deprecated.since 7.0.1.CompletionStage<? extends Iterable<Label>>
addLabelsCompletionStage(ContentId contentId, Iterable<Label> labels)
Adds the given labels to the specified contentcom.atlassian.util.concurrent.Promise<? extends Iterable<Label>>
getLabels(ContentId contentId, Collection<Label.Prefix> prefixes, PageRequest request)
Deprecated.since 7.0.1.CompletionStage<? extends Iterable<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 useremoveLabelCompletionStage(ContentId, Label)
CompletionStage<Void>
removeLabelCompletionStage(ContentId contentId, Label label)
Remove a label with from the specified content
-
-
-
Method Detail
-
getLabels
@Deprecated com.atlassian.util.concurrent.Promise<? extends Iterable<Label>> getLabels(ContentId contentId, Collection<Label.Prefix> prefixes, PageRequest request) throws NotFoundException
Deprecated.since 7.0.1. UsegetLabelsCompletionStage(ContentId, Collection, PageRequest)
instead.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
-
getLabelsCompletionStage
CompletionStage<? extends Iterable<Label>> getLabelsCompletionStage(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- Since:
- 7.0.1
-
addLabels
@Deprecated com.atlassian.util.concurrent.Promise<? extends Iterable<Label>> addLabels(ContentId contentId, Iterable<Label> labels) throws ServiceException
Deprecated.since 7.0.1. UsegetLabelsCompletionStage(ContentId, Collection, PageRequest)
instead.Adds the given labels to the specified content- 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
CompletionStage<? extends Iterable<Label>> addLabelsCompletionStage(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 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- Since:
- 7.0.1
-
removeLabel
@Deprecated com.atlassian.util.concurrent.Promise<Void> removeLabel(ContentId contentId, String label) throws ServiceException
Deprecated.since 6.5.0 useremoveLabelCompletionStage(ContentId, Label)
Remove a label with labelId from the specified content- 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 com.atlassian.util.concurrent.Promise<Void> removeLabel(ContentId contentId, Label label)
Deprecated.since 7.0.1. UseremoveLabelCompletionStage(ContentId, Label)
instead.Remove a label with from the specified content- Parameters:
contentId
- the id of the content to remove the label fromlabel
- the label to remove- Throws:
ServiceException
- failed to remove the label- Since:
- 6.5.0
-
removeLabelCompletionStage
CompletionStage<Void> removeLabelCompletionStage(ContentId contentId, Label label)
Remove a label with from the specified content- Parameters:
contentId
- the id of the content to remove the label fromlabel
- the label to remove- Throws:
ServiceException
- failed to remove the label- Since:
- 7.0.1
-
-