Interface RemoteLabelService
- All Known Implementing Classes:
RemoteLabelServiceImpl
public interface RemoteLabelService
LabelService implementation that communicates with Confluence remotely using the Confluence REST api.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceProvides methods for validating inputs to create, retrieve, update or delete labels. -
Method Summary
Modifier and TypeMethodDescriptiongetRecentlyUsedLabelsCompletionStage(PageRequest pageRequest) Returns a paginated list of the most recent Labels used in a Confluence instance.getRelatedLabelsCompletionStage(String labelName, int maxCount) Returns the labels related to the given label name, with a specified maximum number of results.Get the validator view ofLabelService.
-
Method Details
-
getRelatedLabelsCompletionStage
CompletionStage<PageResponse<Label>> getRelatedLabelsCompletionStage(String labelName, int maxCount) 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)maxCount- The maximum number of related labels to return. A value of 0 means the default is used.- Returns:
PageResponsewith 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-parsableNotFoundException- if the given label name cannot be found- Since:
- 9.1.0
-
getRecentlyUsedLabelsCompletionStage
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
-
validator
LabelService.Validator validator()Get the validator view ofLabelService.
-