Package com.google.gerrit.server.change
Class ReviewerAdder
- java.lang.Object
-
- com.google.gerrit.server.change.ReviewerAdder
-
public class ReviewerAdder extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReviewerAdder.FailureBehavior
static class
ReviewerAdder.InternalAddReviewerInput
class
ReviewerAdder.ReviewerAddition
static class
ReviewerAdder.ReviewerAdditionList
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_MAX_REVIEWERS
static int
DEFAULT_MAX_REVIEWERS_WITHOUT_CHECK
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ReviewerAdder.ReviewerAddition
ccCurrentUser(CurrentUser user, RevisionResource revision)
static boolean
isLegalReviewerGroup(AccountGroup.UUID groupUUID)
static ReviewerAdder.InternalAddReviewerInput
newAddReviewerInput(Account.Id reviewer, ReviewerState state, NotifyHandling notify)
static ReviewerAdder.InternalAddReviewerInput
newAddReviewerInput(String reviewer, ReviewerState state, NotifyHandling notify)
static Optional<ReviewerAdder.InternalAddReviewerInput>
newAddReviewerInputFromCommitIdentity(Change change, Account.Id accountId, NotifyHandling notify)
ReviewerAdder.ReviewerAddition
prepare(ChangeNotes notes, CurrentUser user, AddReviewerInput input, boolean allowGroup)
Prepare application of a singleAddReviewerInput
.ReviewerAdder.ReviewerAdditionList
prepare(ChangeNotes notes, CurrentUser user, Iterable<? extends AddReviewerInput> inputs, boolean allowGroup)
-
-
-
Field Detail
-
DEFAULT_MAX_REVIEWERS_WITHOUT_CHECK
public static final int DEFAULT_MAX_REVIEWERS_WITHOUT_CHECK
- See Also:
- Constant Field Values
-
DEFAULT_MAX_REVIEWERS
public static final int DEFAULT_MAX_REVIEWERS
- See Also:
- Constant Field Values
-
-
Method Detail
-
newAddReviewerInput
public static ReviewerAdder.InternalAddReviewerInput newAddReviewerInput(Account.Id reviewer, ReviewerState state, NotifyHandling notify)
-
newAddReviewerInput
public static ReviewerAdder.InternalAddReviewerInput newAddReviewerInput(String reviewer, ReviewerState state, NotifyHandling notify)
-
newAddReviewerInputFromCommitIdentity
public static Optional<ReviewerAdder.InternalAddReviewerInput> newAddReviewerInputFromCommitIdentity(Change change, Account.Id accountId, NotifyHandling notify)
-
prepare
public ReviewerAdder.ReviewerAddition prepare(ChangeNotes notes, CurrentUser user, AddReviewerInput input, boolean allowGroup) throws IOException, PermissionBackendException, org.eclipse.jgit.errors.ConfigInvalidException
Prepare application of a singleAddReviewerInput
.- Parameters:
notes
- change notes.user
- user performing the reviewer addition.input
- input describing user or group to add as a reviewer.allowGroup
- whether to allow- Returns:
- handle describing the addition operation. If the
op
field is present, this operation may be added to aBatchUpdate
. Otherwise, theerror
field contains information about an error that occurred - Throws:
IOException
PermissionBackendException
org.eclipse.jgit.errors.ConfigInvalidException
-
ccCurrentUser
public ReviewerAdder.ReviewerAddition ccCurrentUser(CurrentUser user, RevisionResource revision)
-
isLegalReviewerGroup
public static boolean isLegalReviewerGroup(AccountGroup.UUID groupUUID)
-
prepare
public ReviewerAdder.ReviewerAdditionList prepare(ChangeNotes notes, CurrentUser user, Iterable<? extends AddReviewerInput> inputs, boolean allowGroup) throws IOException, PermissionBackendException, org.eclipse.jgit.errors.ConfigInvalidException
- Throws:
IOException
PermissionBackendException
org.eclipse.jgit.errors.ConfigInvalidException
-
-