Package com.google.gerrit.server.change
Class ReviewerModifier
- java.lang.Object
-
- com.google.gerrit.server.change.ReviewerModifier
-
public class ReviewerModifier extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReviewerModifier.FailureBehavior
static class
ReviewerModifier.InternalReviewerInput
class
ReviewerModifier.ReviewerModification
static class
ReviewerModifier.ReviewerModificationList
-
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 ReviewerModifier.ReviewerModification
ccCurrentUser(CurrentUser user, RevisionResource revision)
static boolean
isLegalReviewerGroup(AccountGroup.UUID groupUUID)
static ReviewerModifier.InternalReviewerInput
newReviewerInput(String reviewer, ReviewerState state, NotifyHandling notify)
static Optional<ReviewerModifier.InternalReviewerInput>
newReviewerInputFromCommitIdentity(Change change, org.eclipse.jgit.lib.ObjectId commitId, Account.Id accountId, NotifyHandling notify, Account.Id mostRecentUploader)
ReviewerModifier.ReviewerModification
prepare(ChangeNotes notes, CurrentUser user, ReviewerInput input, boolean allowGroup)
Prepare application of a singleReviewerInput
.ReviewerModifier.ReviewerModificationList
prepare(ChangeNotes notes, CurrentUser user, Iterable<? extends ReviewerInput> 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
-
newReviewerInput
public static ReviewerModifier.InternalReviewerInput newReviewerInput(String reviewer, ReviewerState state, NotifyHandling notify)
-
newReviewerInputFromCommitIdentity
public static Optional<ReviewerModifier.InternalReviewerInput> newReviewerInputFromCommitIdentity(Change change, org.eclipse.jgit.lib.ObjectId commitId, Account.Id accountId, NotifyHandling notify, Account.Id mostRecentUploader)
-
prepare
public ReviewerModifier.ReviewerModification prepare(ChangeNotes notes, CurrentUser user, ReviewerInput input, boolean allowGroup) throws IOException, PermissionBackendException, org.eclipse.jgit.errors.ConfigInvalidException
Prepare application of a singleReviewerInput
.- 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 ReviewerModifier.ReviewerModification ccCurrentUser(CurrentUser user, RevisionResource revision)
-
isLegalReviewerGroup
public static boolean isLegalReviewerGroup(AccountGroup.UUID groupUUID)
-
prepare
public ReviewerModifier.ReviewerModificationList prepare(ChangeNotes notes, CurrentUser user, Iterable<? extends ReviewerInput> inputs, boolean allowGroup) throws IOException, PermissionBackendException, org.eclipse.jgit.errors.ConfigInvalidException
- Throws:
IOException
PermissionBackendException
org.eclipse.jgit.errors.ConfigInvalidException
-
-