use of com.google.gerrit.server.git.AbandonOp in project gerrit by GerritCodeReview.
the class Abandon method abandon.
public Change abandon(BatchUpdate.Factory updateFactory, ChangeControl control, String msgTxt, NotifyHandling notifyHandling, ListMultimap<RecipientType, Account.Id> accountsToNotify) throws RestApiException, UpdateException {
CurrentUser user = control.getUser();
Account account = user.isIdentifiedUser() ? user.asIdentifiedUser().getAccount() : null;
AbandonOp op = abandonOpFactory.create(account, msgTxt, notifyHandling, accountsToNotify);
try (BatchUpdate u = updateFactory.create(dbProvider.get(), control.getProject().getNameKey(), control.getUser(), TimeUtil.nowTs())) {
u.addOp(control.getId(), op).execute();
}
return op.getChange();
}
Aggregations