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 Details

    • 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
    • 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 to
      labels - 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
    • 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 from
      label - the label to remove
      Throws:
      ServiceException - failed to remove the label
      Since:
      7.0.1
    • removeLabelCompletionStage

      default CompletionStage<Void> removeLabelCompletionStage(ContentId contentId, String label)
      Remove a label with from the specified content
      Parameters:
      contentId - the id of the content to remove the label from
      label - the label to remove
      Throws:
      ServiceException - failed to remove the label
      Since:
      79.0