Class RemoteLabelServiceImpl
java.lang.Object
com.atlassian.confluence.rest.client.AbstractRemoteService<LabelService>
com.atlassian.confluence.rest.client.RemoteLabelServiceImpl
- All Implemented Interfaces:
RemoteLabelService
public class RemoteLabelServiceImpl
extends AbstractRemoteService<LabelService>
implements RemoteLabelService
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.confluence.rest.client.RemoteLabelService
RemoteLabelService.Validator
-
Field Summary
Fields inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
provider
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteLabelServiceImpl
(AuthenticatedWebResourceProvider provider, ExecutorService executor) -
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
.Methods inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
addExpansions, addPageRequest, addPageRequestParams, deleteCompletionStage, deleteCompletionStage, getCompletionStage, getCompletionStageGenericCollection, getCompletionStageMap, getCompletionStageMapOfGenericListResponse, getCompletionStageMapOfPageResponses, getCompletionStageOptional, getCompletionStagePageResponseList, getCompletionStageSearchPageResponseList, getExecutor, newExperimentalRestWebTarget, newWebTarget, postCompletionStage, postCompletionStage, postCompletionStage, postCompletionStageToPageResponse, postVoidCompletionStage, putCompletionStage, putVoidCompletionStage
-
Constructor Details
-
RemoteLabelServiceImpl
-
-
Method Details
-
getRelatedLabelsCompletionStage
public CompletionStage<PageResponse<Label>> getRelatedLabelsCompletionStage(String labelName, int maxCount) throws BadRequestException, NotFoundException Description copied from interface:RemoteLabelService
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:
getRelatedLabelsCompletionStage
in interfaceRemoteLabelService
- 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-parsableNotFoundException
- if the given label name cannot be found
-
getRecentlyUsedLabelsCompletionStage
public CompletionStage<PageResponse<Label>> getRecentlyUsedLabelsCompletionStage(PageRequest pageRequest) Description copied from interface:RemoteLabelService
Returns a paginated list of the most recent Labels used in a Confluence instance.- Specified by:
getRecentlyUsedLabelsCompletionStage
in interfaceRemoteLabelService
- Parameters:
pageRequest
- the pagination parameters.- Returns:
- Paginated list of labels.
-
validator
Description copied from interface:RemoteLabelService
Get the validator view ofLabelService
.- Specified by:
validator
in interfaceRemoteLabelService
-