Search in sources :

Example 1 with SetAssigneeSender

use of com.google.gerrit.server.mail.send.SetAssigneeSender in project gerrit by GerritCodeReview.

the class SetAssigneeOp method postUpdate.

@Override
public void postUpdate(Context ctx) throws OrmException {
    try {
        SetAssigneeSender cm = setAssigneeSenderFactory.create(change.getProject(), change.getId(), newAssignee.getAccountId());
        cm.setFrom(user.get().getAccountId());
        cm.send();
    } catch (Exception err) {
        log.error("Cannot send email to new assignee of change " + change.getId(), err);
    }
    assigneeChanged.fire(change, ctx.getAccount(), oldAssignee != null ? oldAssignee.getAccount() : null, ctx.getWhen());
}
Also used : SetAssigneeSender(com.google.gerrit.server.mail.send.SetAssigneeSender) OrmException(com.google.gwtorm.server.OrmException) ValidationException(com.google.gerrit.server.validators.ValidationException) ResourceConflictException(com.google.gerrit.extensions.restapi.ResourceConflictException) RestApiException(com.google.gerrit.extensions.restapi.RestApiException)

Aggregations

ResourceConflictException (com.google.gerrit.extensions.restapi.ResourceConflictException)1 RestApiException (com.google.gerrit.extensions.restapi.RestApiException)1 SetAssigneeSender (com.google.gerrit.server.mail.send.SetAssigneeSender)1 ValidationException (com.google.gerrit.server.validators.ValidationException)1 OrmException (com.google.gwtorm.server.OrmException)1