ReviewerAddedListener: Notify multiple reviewers added in same event

When multiple reviewers were added to a change, notify them all with
a single event and let listeners act on each individual reviewer as
necessary.

This change is needed to allow splitting the mail notifications to a
listener.

Change-Id: I8b1f3918877b9635a6592beae6ad5aeea0a5adce
This commit is contained in:
David Pursehouse
2016-07-12 16:44:23 +09:00
committed by Edwin Kempin
parent 770af87746
commit 6f0fb43127
5 changed files with 43 additions and 27 deletions

View File

@@ -17,12 +17,14 @@ package com.google.gerrit.extensions.events;
import com.google.gerrit.extensions.annotations.ExtensionPoint;
import com.google.gerrit.extensions.common.AccountInfo;
/** Notified whenever a Reviewer is added to a change. */
import java.util.List;
/** Notified whenever one or more Reviewers are added to a change. */
@ExtensionPoint
public interface ReviewerAddedListener {
interface Event extends ChangeEvent {
AccountInfo getReviewer();
List<AccountInfo> getReviewers();
}
void onReviewerAdded(Event event);
void onReviewersAdded(Event event);
}