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.-
Method Summary
Modifier and TypeMethodDescriptionaddLabelsCompletionStage
(ContentId contentId, Iterable<Label> labels) Adds the given labels to the specified contentgetLabelsByDetail
(PageRequest pageRequest, String labelName, String namespace, String spaceKey, String owner) Get the labels based on the given parametersgetLabelsCompletionStage
(ContentId contentId, Collection<Label.Prefix> prefixes, PageRequest request) Get the labels attached to a given piece of content in the given namespacesremoveLabelCompletionStage
(ContentId contentId, Label label) Remove a label with from the specified contentdefault CompletionStage<Void>
removeLabelCompletionStage
(ContentId contentId, String label) Remove a label with from the specified content
-
Method Details
-
getLabelsCompletionStage
CompletionStage<PageResponse<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:
- 9.0
-
getLabelsByDetail
CompletionStage<PageResponse<Label>> getLabelsByDetail(PageRequest pageRequest, String labelName, String namespace, String spaceKey, String owner) throws ServiceException Get the labels based on the given parameters- Throws:
ServiceException
- Since:
- 9.3.0
-
addLabelsCompletionStage
CompletionStage<PageResponse<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:
- 9.0
-
removeLabelCompletionStage
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:
- 9.0
-
removeLabelCompletionStage
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:
- 9.0
-