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 aLabelbased on the name.voidremove(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:
PageofLabel
-
findByLabelable
@Nonnull Page<Label> findByLabelable(@Nonnull Labelable labelable, @Nonnull PageRequest pageRequest) - Parameters:
labelable- theLabelablethat will have it's related labels returnedpageRequest- thePageRequest- Returns:
PageofLabel
-
findByName
-
findByPrefix
- Parameters:
labelPref- the prefix thelabelshave to start withpageRequest- thePageRequest- Returns:
PageofLabel
-
getByName
Returns aLabelbased on the name. -
searchLabelables
@Nonnull Page<Labelable> searchLabelables(@Nonnull LabelableSearchRequest searchRequest, @Nonnull PageRequest pageRequest) - Parameters:
searchRequest- aLabelableSearchRequestpageRequest- thePageRequest- Returns:
Pageoflabelables
-
remove
-