public class PostReviewers extends java.lang.Object implements RestModifyView<ChangeResource,AddReviewerInput>
Modifier and Type | Class and Description |
---|---|
class |
PostReviewers.Addition |
class |
PostReviewers.Op |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_REVIEWERS |
static int |
DEFAULT_MAX_REVIEWERS_WITHOUT_CHECK |
Modifier and Type | Method and Description |
---|---|
AddReviewerResult |
apply(ChangeResource rsrc,
AddReviewerInput input)
Process the view operation by altering the resource.
|
void |
emailReviewers(Change change,
java.util.Collection<Account.Id> added,
java.util.Collection<Account.Id> copied,
NotifyHandling notify,
com.google.common.collect.ListMultimap<RecipientType,Account.Id> accountsToNotify) |
static boolean |
isLegalReviewerGroup(AccountGroup.UUID groupUUID) |
PostReviewers.Addition |
prepareApplication(ChangeResource rsrc,
AddReviewerInput input,
boolean allowGroup) |
public static final int DEFAULT_MAX_REVIEWERS_WITHOUT_CHECK
public static final int DEFAULT_MAX_REVIEWERS
public AddReviewerResult apply(ChangeResource rsrc, AddReviewerInput input) throws java.io.IOException, com.google.gwtorm.server.OrmException, RestApiException, UpdateException
RestModifyView
apply
in interface RestModifyView<ChangeResource,AddReviewerInput>
rsrc
- resource to modify.input
- input after parsing from request.BinaryResult
to avoid automatic conversion
to JSON.AuthException
- the client is not permitted to access this view.BadRequestException
- the request was incorrectly specified and cannot be handled by this
view.ResourceConflictException
- the resource state does not permit this view to make the
changes at this time.java.io.IOException
com.google.gwtorm.server.OrmException
RestApiException
UpdateException
public PostReviewers.Addition prepareApplication(ChangeResource rsrc, AddReviewerInput input, boolean allowGroup) throws com.google.gwtorm.server.OrmException, RestApiException, java.io.IOException
com.google.gwtorm.server.OrmException
RestApiException
java.io.IOException
public void emailReviewers(Change change, java.util.Collection<Account.Id> added, java.util.Collection<Account.Id> copied, NotifyHandling notify, com.google.common.collect.ListMultimap<RecipientType,Account.Id> accountsToNotify)
public static boolean isLegalReviewerGroup(AccountGroup.UUID groupUUID)