Package com.atlassian.bitbucket.label
Interface LabelService
public interface LabelService
Describes a service for interacting with labels.
- Since:
- 5.12
-
Method Summary
Modifier and TypeMethodDescriptionapply
(ApplyLabelRequest request) Creates a new label based on the given labelName.findAll
(PageRequest pageRequest) findByLabelable
(Labelable labelable, PageRequest pageRequest) findByName
(String labelName) findByPrefix
(String labelPref, PageRequest pageRequest) Returns aLabel
based on the name.void
remove
(RemoveLabelRequest request) searchLabelables
(LabelableSearchRequest searchRequest, PageRequest pageRequest)
-
Method Details
-
apply
-
create
Creates a new label based on the given labelName.The labelName has to be at least 3 characters and cannot exceed 50 characters, the labelName also has to be a lowercase string consisting out of alpanumeric characters, "-" is also allowed.
- Parameters:
labelName
- the name for the newly created label.- Returns:
- the created
Label
-
findAll
- Parameters:
pageRequest
- thePageRequest
- Returns:
Page
ofLabel
-
findByLabelable
@Nonnull Page<Label> findByLabelable(@Nonnull Labelable labelable, @Nonnull PageRequest pageRequest) - Parameters:
labelable
- theLabelable
that will have it's related labels returnedpageRequest
- thePageRequest
- Returns:
Page
ofLabel
-
findByName
-
findByPrefix
- Parameters:
labelPref
- the prefix thelabels
have to start withpageRequest
- thePageRequest
- Returns:
Page
ofLabel
-
getByName
Returns aLabel
based on the name. -
searchLabelables
@Nonnull Page<Labelable> searchLabelables(@Nonnull LabelableSearchRequest searchRequest, @Nonnull PageRequest pageRequest) - Parameters:
searchRequest
- aLabelableSearchRequest
pageRequest
- thePageRequest
- Returns:
Page
oflabelables
-
remove
-