public interface ReviewerGroupService
Modifier and Type | Method and Description |
---|---|
ReviewerGroup |
create(ReviewerGroupCreateRequest request)
Create a new reviewer group
|
void |
delete(long reviewerGroupId)
Delete a reviewer group with the given ID.
|
Page<ReviewerGroup> |
findByName(Scope scope,
String name,
PageRequest pageRequest)
Find reviewer groups by name.
|
Page<ReviewerGroup> |
findByScope(Scope scope,
PageRequest pageRequest)
Find the reviewer groups in a given scope
|
ReviewerGroup |
getById(long reviewerGroupId)
Find a reviewer group with the given ID.
|
ReviewerGroup |
update(ReviewerGroupUpdateRequest request)
Updates a reviewer group.
|
@Nonnull ReviewerGroup create(@Nonnull ReviewerGroupCreateRequest request)
request
- describes the reviewer group to createreviewer group
EmptyReviewerGroupException
- when creating a group with no usersvoid delete(long reviewerGroupId)
reviewerGroupId
- the ID of the reviewer group
to be deletedNoSuchReviewerGroupException
- if the ID of the reviewer group to be deleted does not exist@Nonnull Page<ReviewerGroup> findByName(@Nonnull Scope scope, @Nonnull String name, @Nonnull PageRequest pageRequest)
Will also find all the reviewer groups which begin with the name or partial name provided within a given scope.
scope
- the scope
to retrieve the reviewer groups fromname
- the name or start of the name of a reviewer grouppageRequest
- the page of reviewer groups to be returnedreviewer groups
that has the name provided or starts
with the partial name provided.@Nonnull Page<ReviewerGroup> findByScope(@Nonnull Scope scope, @Nonnull PageRequest pageRequest)
scope
- the scope
to retrieve the reviewer groups frompageRequest
- the page of reviewer groups to be returnedreviewer groups
@Nonnull ReviewerGroup getById(long reviewerGroupId)
If no reviewer group exists with the specific ID, an exception is thrown.
reviewerGroupId
- the ID of the reviewer group to be retrievedreviewer group
with the specified IDNoSuchReviewerGroupException
- if no reviewer group exists with the specific ID@Nonnull ReviewerGroup update(@Nonnull ReviewerGroupUpdateRequest request)
Only the name, description and users of the group can be updated. The name and users of a group can never be null
,
however the users list can be empty. A user who already exists in the group will not be added to prevent duplicates.
The scope
of a reviewer group cannot be changed after creation.
request
- a request containing the attributes to update for the reviewer groupreviewer group
NoSuchReviewerGroupException
- if the ID of the reviewer group to be updated does not existCopyright © 2021 Atlassian. All rights reserved.
View cookie preferences