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));
}
Aggregations