ChangeEvent: Add 'who' and 'when' fields and methods
The 'when' field tells when the event occurred, and 'who' tells which account performed the action that triggered the event. Deprecate the existing events' get..() methods in favor of getWho(). Change-Id: I3fdae6c5b76eda8494bf3b5c95ea6bb077690d04
This commit is contained in:
@@ -21,6 +21,7 @@ import com.google.gerrit.extensions.common.AccountInfo;
|
||||
@ExtensionPoint
|
||||
public interface ChangeAbandonedListener {
|
||||
interface Event extends RevisionEvent {
|
||||
@Deprecated
|
||||
AccountInfo getAbandoner();
|
||||
String getReason();
|
||||
}
|
||||
|
@@ -14,10 +14,14 @@
|
||||
|
||||
package com.google.gerrit.extensions.events;
|
||||
|
||||
import com.google.gerrit.extensions.common.AccountInfo;
|
||||
import com.google.gerrit.extensions.common.ChangeInfo;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
|
||||
/** Interface to be extended by Events with a Change. */
|
||||
public interface ChangeEvent extends GerritEvent {
|
||||
ChangeInfo getChange();
|
||||
AccountInfo getWho();
|
||||
Timestamp getWhen();
|
||||
}
|
||||
|
||||
|
@@ -21,6 +21,7 @@ import com.google.gerrit.extensions.common.AccountInfo;
|
||||
@ExtensionPoint
|
||||
public interface ChangeMergedListener {
|
||||
interface Event extends RevisionEvent {
|
||||
@Deprecated
|
||||
AccountInfo getMerger();
|
||||
/**
|
||||
* Represents the merged Revision when the submit strategy is cherry-pick or
|
||||
|
@@ -21,6 +21,7 @@ import com.google.gerrit.extensions.common.AccountInfo;
|
||||
@ExtensionPoint
|
||||
public interface ChangeRestoredListener {
|
||||
interface Event extends RevisionEvent {
|
||||
@Deprecated
|
||||
AccountInfo getRestorer();
|
||||
String getReason();
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ import java.util.Map;
|
||||
@ExtensionPoint
|
||||
public interface CommentAddedListener {
|
||||
interface Event extends RevisionEvent {
|
||||
@Deprecated
|
||||
AccountInfo getAuthor();
|
||||
String getComment();
|
||||
Map<String, ApprovalInfo> getApprovals();
|
||||
|
@@ -21,6 +21,7 @@ import com.google.gerrit.extensions.common.AccountInfo;
|
||||
@ExtensionPoint
|
||||
public interface DraftPublishedListener {
|
||||
interface Event extends RevisionEvent {
|
||||
@Deprecated
|
||||
AccountInfo getPublisher();
|
||||
}
|
||||
|
||||
|
@@ -23,6 +23,7 @@ import java.util.Collection;
|
||||
@ExtensionPoint
|
||||
public interface HashtagsEditedListener {
|
||||
interface Event extends ChangeEvent {
|
||||
@Deprecated
|
||||
AccountInfo getEditor();
|
||||
Collection<String> getHashtags();
|
||||
Collection<String> getAddedHashtags();
|
||||
|
@@ -21,6 +21,7 @@ import com.google.gerrit.extensions.common.AccountInfo;
|
||||
@ExtensionPoint
|
||||
public interface RevisionCreatedListener {
|
||||
interface Event extends RevisionEvent {
|
||||
@Deprecated
|
||||
AccountInfo getUploader();
|
||||
}
|
||||
|
||||
|
@@ -21,6 +21,7 @@ import com.google.gerrit.extensions.common.AccountInfo;
|
||||
@ExtensionPoint
|
||||
public interface TopicEditedListener {
|
||||
interface Event extends ChangeEvent {
|
||||
@Deprecated
|
||||
AccountInfo getEditor();
|
||||
String getOldTopic();
|
||||
}
|
||||
|
Reference in New Issue
Block a user