public class CreateEmail extends java.lang.Object implements RestCollectionCreateView<AccountResource,AccountResource.Email,EmailInput>
Modifier and Type | Method and Description |
---|---|
Response<EmailInfo> |
apply(AccountResource rsrc,
IdString id,
EmailInput input)
Process the view operation by creating the resource.
|
Response<EmailInfo> |
apply(IdentifiedUser user,
IdString id,
EmailInput input)
To be used from plugins that want to create emails without permission checks.
|
public Response<EmailInfo> apply(AccountResource rsrc, IdString id, EmailInput input) throws RestApiException, com.google.gerrit.exceptions.EmailException, MethodNotAllowedException, java.io.IOException, org.eclipse.jgit.errors.ConfigInvalidException, PermissionBackendException
RestCollectionCreateView
apply
in interface RestCollectionCreateView<AccountResource,AccountResource.Email,EmailInput>
rsrc
- parent resource of the resource that should be createdinput
- input after parsing from request.BinaryResult
to avoid automatic conversion
to JSON.RestApiException
- if the resource creation is rejectedcom.google.gerrit.exceptions.EmailException
MethodNotAllowedException
java.io.IOException
org.eclipse.jgit.errors.ConfigInvalidException
PermissionBackendException
public Response<EmailInfo> apply(IdentifiedUser user, IdString id, EmailInput input) throws RestApiException, com.google.gerrit.exceptions.EmailException, MethodNotAllowedException, java.io.IOException, org.eclipse.jgit.errors.ConfigInvalidException, PermissionBackendException
RestApiException
com.google.gerrit.exceptions.EmailException
MethodNotAllowedException
java.io.IOException
org.eclipse.jgit.errors.ConfigInvalidException
PermissionBackendException