Class LabelServiceImpl

java.lang.Object
com.atlassian.confluence.api.impl.service.content.LabelServiceImpl
All Implemented Interfaces:
LabelService

public class LabelServiceImpl extends Object implements LabelService
  • Constructor Details

  • Method Details

    • getRelatedLabels

      public PageResponse<Label> getRelatedLabels(String labelName, int maxCount) throws BadRequestException, NotFoundException
      Description copied from interface: LabelService
      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.
      Specified by:
      getRelatedLabels in interface LabelService
      Parameters:
      labelName - The name of the label (namespace prefixes permitted)
      maxCount - The maximum number of related labels to return. A value of 0 means the default is used.
      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
    • getRecentlyUsedLabels

      public PageResponse<Label> getRecentlyUsedLabels(PageRequest pageRequest)
      Description copied from interface: LabelService
      Returns a paginated list of the most recent Labels used in a Confluence instance.
      Specified by:
      getRecentlyUsedLabels in interface LabelService
      Parameters:
      pageRequest - the pagination parameters.
      Returns:
      Paginated list of labels.
    • validator

      public LabelService.Validator validator()
      Description copied from interface: LabelService
      Get the validator view of LabelService.
      Specified by:
      validator in interface LabelService