Search in sources :

Example 1 with Output

use of com.google.gerrit.server.change.Submit.Output in project gerrit by GerritCodeReview.

the class Submit method applyImpl.

@Override
protected Output applyImpl(BatchUpdate.Factory updateFactory, RevisionResource rsrc, SubmitInput input) throws RestApiException, RepositoryNotFoundException, IOException, OrmException, PermissionBackendException {
    input.onBehalfOf = Strings.emptyToNull(input.onBehalfOf);
    IdentifiedUser submitter;
    if (input.onBehalfOf != null) {
        submitter = onBehalfOf(rsrc, input);
    } else {
        rsrc.permissions().check(ChangePermission.SUBMIT);
        submitter = rsrc.getUser().asIdentifiedUser();
    }
    return new Output(mergeChange(updateFactory, rsrc, submitter, input));
}
Also used : Output(com.google.gerrit.server.change.Submit.Output) IdentifiedUser(com.google.gerrit.server.IdentifiedUser)

Aggregations

IdentifiedUser (com.google.gerrit.server.IdentifiedUser)1 Output (com.google.gerrit.server.change.Submit.Output)1