Interface LabelService

All Known Implementing Classes:
LabelServiceImpl

public interface LabelService
Provides operations for Labels.
Since:
9.1
  • Method Details

    • getRelatedLabels

      @Deprecated PageResponse<Label> getRelatedLabels(String labelName, int maxCount) throws BadRequestException, NotFoundException
      Deprecated.
      since 9.3.0, use getRelatedLabels(String, PageRequest) instead.
      Throws:
      BadRequestException
      NotFoundException
    • getRelatedLabels

      PageResponse<Label> getRelatedLabels(String labelName, PageRequest pageRequest) throws BadRequestException, NotFoundException
      Returns the labels related to the given label name, with a specified maximum number of results. Returns global labels only, i.e. label.namespace = 'global', with current retrieval logic in com.atlassian.confluence.labels.DefaultLabelManager#getRelatedLabels(com.atlassian.confluence.labels.Label, int), which may change in the future.
      Parameters:
      labelName - The name of the label (namespace prefixes permitted)
      pageRequest - the pagination parameters.
      Returns:
      PageResponse with a list of related labels as its result, sorted by frequency of use.
      Throws:
      BadRequestException - if the given label name is invalid, e.g. null, empty, or un-parsable
      NotFoundException - if the given label name cannot be found
      Since:
      9.3.0
    • getRecentlyUsedLabels

      PageResponse<Label> getRecentlyUsedLabels(PageRequest pageRequest)
      Returns a paginated list of the most recent Labels used in a Confluence instance.
      Parameters:
      pageRequest - the pagination parameters.
      Returns:
      Paginated list of labels.
      Since:
      9.1.0
    • getLabelsByDetail

      PageResponse<Label> getLabelsByDetail(PageRequest pageRequest, String labelName, String namespace, String spaceKey, String owner)
      Gets all labels with given namespace, label name, space and/or owner
      Parameters:
      pageRequest - contains the page request parameters
      labelName - The name of the label (null to ignore)
      namespace - The namespace of the labels (null to ignore)
      spaceKey - The spaceKey to restrict by (null to ignore)
      owner - The owner of the labels (null to ignore)
      Returns:
      a page response list of labels
      Since:
      9.3.0
    • getMostPopularLabels

      PageResponse<Label> getMostPopularLabels(PageRequest pageRequest)
      Returns a paginated list of the most popular Labels used in a Confluence instance.
      Parameters:
      pageRequest - the pagination parameters.
      Returns:
      Paginated list of labels.
      Since:
      9.3.0
    • validator

      Get the validator view of LabelService.