Remove deprecated AccountInfo get... methods from events API
In version 2.13 these methods were superseded by the getWho() method in the ChangeEvent super-interface, and marked as deprecated. Change-Id: Id21a3ee72236f033740a2a3513230e434f938653
This commit is contained in:

committed by
Hugo Arès

parent
86cdf1b494
commit
26532ccac4
@@ -15,14 +15,11 @@
|
|||||||
package com.google.gerrit.extensions.events;
|
package com.google.gerrit.extensions.events;
|
||||||
|
|
||||||
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
||||||
import com.google.gerrit.extensions.common.AccountInfo;
|
|
||||||
|
|
||||||
/** Notified whenever a Change is abandoned. */
|
/** Notified whenever a Change is abandoned. */
|
||||||
@ExtensionPoint
|
@ExtensionPoint
|
||||||
public interface ChangeAbandonedListener {
|
public interface ChangeAbandonedListener {
|
||||||
interface Event extends RevisionEvent {
|
interface Event extends RevisionEvent {
|
||||||
@Deprecated
|
|
||||||
AccountInfo getAbandoner();
|
|
||||||
String getReason();
|
String getReason();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,14 +15,11 @@
|
|||||||
package com.google.gerrit.extensions.events;
|
package com.google.gerrit.extensions.events;
|
||||||
|
|
||||||
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
||||||
import com.google.gerrit.extensions.common.AccountInfo;
|
|
||||||
|
|
||||||
/** Notified whenever a Change is merged. */
|
/** Notified whenever a Change is merged. */
|
||||||
@ExtensionPoint
|
@ExtensionPoint
|
||||||
public interface ChangeMergedListener {
|
public interface ChangeMergedListener {
|
||||||
interface Event extends RevisionEvent {
|
interface Event extends RevisionEvent {
|
||||||
@Deprecated
|
|
||||||
AccountInfo getMerger();
|
|
||||||
/**
|
/**
|
||||||
* Represents the merged Revision when the submit strategy is cherry-pick or
|
* Represents the merged Revision when the submit strategy is cherry-pick or
|
||||||
* rebase-if-necessary.
|
* rebase-if-necessary.
|
||||||
|
@@ -15,14 +15,11 @@
|
|||||||
package com.google.gerrit.extensions.events;
|
package com.google.gerrit.extensions.events;
|
||||||
|
|
||||||
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
||||||
import com.google.gerrit.extensions.common.AccountInfo;
|
|
||||||
|
|
||||||
/** Notified whenever a Change is restored. */
|
/** Notified whenever a Change is restored. */
|
||||||
@ExtensionPoint
|
@ExtensionPoint
|
||||||
public interface ChangeRestoredListener {
|
public interface ChangeRestoredListener {
|
||||||
interface Event extends RevisionEvent {
|
interface Event extends RevisionEvent {
|
||||||
@Deprecated
|
|
||||||
AccountInfo getRestorer();
|
|
||||||
String getReason();
|
String getReason();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
package com.google.gerrit.extensions.events;
|
package com.google.gerrit.extensions.events;
|
||||||
|
|
||||||
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
||||||
import com.google.gerrit.extensions.common.AccountInfo;
|
|
||||||
import com.google.gerrit.extensions.common.ApprovalInfo;
|
import com.google.gerrit.extensions.common.ApprovalInfo;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -24,8 +23,6 @@ import java.util.Map;
|
|||||||
@ExtensionPoint
|
@ExtensionPoint
|
||||||
public interface CommentAddedListener {
|
public interface CommentAddedListener {
|
||||||
interface Event extends RevisionEvent {
|
interface Event extends RevisionEvent {
|
||||||
@Deprecated
|
|
||||||
AccountInfo getAuthor();
|
|
||||||
String getComment();
|
String getComment();
|
||||||
Map<String, ApprovalInfo> getApprovals();
|
Map<String, ApprovalInfo> getApprovals();
|
||||||
Map<String, ApprovalInfo> getOldApprovals();
|
Map<String, ApprovalInfo> getOldApprovals();
|
||||||
|
@@ -15,14 +15,11 @@
|
|||||||
package com.google.gerrit.extensions.events;
|
package com.google.gerrit.extensions.events;
|
||||||
|
|
||||||
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
||||||
import com.google.gerrit.extensions.common.AccountInfo;
|
|
||||||
|
|
||||||
/** Notified whenever a Draft is published. */
|
/** Notified whenever a Draft is published. */
|
||||||
@ExtensionPoint
|
@ExtensionPoint
|
||||||
public interface DraftPublishedListener {
|
public interface DraftPublishedListener {
|
||||||
interface Event extends RevisionEvent {
|
interface Event extends RevisionEvent {
|
||||||
@Deprecated
|
|
||||||
AccountInfo getPublisher();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void onDraftPublished(Event event);
|
void onDraftPublished(Event event);
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
package com.google.gerrit.extensions.events;
|
package com.google.gerrit.extensions.events;
|
||||||
|
|
||||||
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
||||||
import com.google.gerrit.extensions.common.AccountInfo;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
@@ -23,8 +22,6 @@ import java.util.Collection;
|
|||||||
@ExtensionPoint
|
@ExtensionPoint
|
||||||
public interface HashtagsEditedListener {
|
public interface HashtagsEditedListener {
|
||||||
interface Event extends ChangeEvent {
|
interface Event extends ChangeEvent {
|
||||||
@Deprecated
|
|
||||||
AccountInfo getEditor();
|
|
||||||
Collection<String> getHashtags();
|
Collection<String> getHashtags();
|
||||||
Collection<String> getAddedHashtags();
|
Collection<String> getAddedHashtags();
|
||||||
Collection<String> getRemovedHashtags();
|
Collection<String> getRemovedHashtags();
|
||||||
|
@@ -15,14 +15,11 @@
|
|||||||
package com.google.gerrit.extensions.events;
|
package com.google.gerrit.extensions.events;
|
||||||
|
|
||||||
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
||||||
import com.google.gerrit.extensions.common.AccountInfo;
|
|
||||||
|
|
||||||
/** Notified whenever a Change Revision is created. */
|
/** Notified whenever a Change Revision is created. */
|
||||||
@ExtensionPoint
|
@ExtensionPoint
|
||||||
public interface RevisionCreatedListener {
|
public interface RevisionCreatedListener {
|
||||||
interface Event extends RevisionEvent {
|
interface Event extends RevisionEvent {
|
||||||
@Deprecated
|
|
||||||
AccountInfo getUploader();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void onRevisionCreated(Event event);
|
void onRevisionCreated(Event event);
|
||||||
|
@@ -15,14 +15,11 @@
|
|||||||
package com.google.gerrit.extensions.events;
|
package com.google.gerrit.extensions.events;
|
||||||
|
|
||||||
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
||||||
import com.google.gerrit.extensions.common.AccountInfo;
|
|
||||||
|
|
||||||
/** Notified whenever a Change Topic is changed. */
|
/** Notified whenever a Change Topic is changed. */
|
||||||
@ExtensionPoint
|
@ExtensionPoint
|
||||||
public interface TopicEditedListener {
|
public interface TopicEditedListener {
|
||||||
interface Event extends ChangeEvent {
|
interface Event extends ChangeEvent {
|
||||||
@Deprecated
|
|
||||||
AccountInfo getEditor();
|
|
||||||
String getOldTopic();
|
String getOldTopic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -83,21 +83,14 @@ public class ChangeAbandoned {
|
|||||||
|
|
||||||
private static class Event extends AbstractRevisionEvent
|
private static class Event extends AbstractRevisionEvent
|
||||||
implements ChangeAbandonedListener.Event {
|
implements ChangeAbandonedListener.Event {
|
||||||
private final AccountInfo abandoner;
|
|
||||||
private final String reason;
|
private final String reason;
|
||||||
|
|
||||||
Event(ChangeInfo change, RevisionInfo revision, AccountInfo abandoner,
|
Event(ChangeInfo change, RevisionInfo revision, AccountInfo abandoner,
|
||||||
String reason, Timestamp when, NotifyHandling notifyHandling) {
|
String reason, Timestamp when, NotifyHandling notifyHandling) {
|
||||||
super(change, revision, abandoner, when, notifyHandling);
|
super(change, revision, abandoner, when, notifyHandling);
|
||||||
this.abandoner = abandoner;
|
|
||||||
this.reason = reason;
|
this.reason = reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public AccountInfo getAbandoner() {
|
|
||||||
return abandoner;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getReason() {
|
public String getReason() {
|
||||||
return reason;
|
return reason;
|
||||||
|
@@ -81,21 +81,14 @@ public class ChangeMerged {
|
|||||||
|
|
||||||
private static class Event extends AbstractRevisionEvent
|
private static class Event extends AbstractRevisionEvent
|
||||||
implements ChangeMergedListener.Event {
|
implements ChangeMergedListener.Event {
|
||||||
private final AccountInfo merger;
|
|
||||||
private final String newRevisionId;
|
private final String newRevisionId;
|
||||||
|
|
||||||
Event(ChangeInfo change, RevisionInfo revision, AccountInfo merger,
|
Event(ChangeInfo change, RevisionInfo revision, AccountInfo merger,
|
||||||
String newRevisionId, Timestamp when) {
|
String newRevisionId, Timestamp when) {
|
||||||
super(change, revision, merger, when, NotifyHandling.ALL);
|
super(change, revision, merger, when, NotifyHandling.ALL);
|
||||||
this.merger = merger;
|
|
||||||
this.newRevisionId = newRevisionId;
|
this.newRevisionId = newRevisionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public AccountInfo getMerger() {
|
|
||||||
return merger;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getNewRevisionId() {
|
public String getNewRevisionId() {
|
||||||
return newRevisionId;
|
return newRevisionId;
|
||||||
|
@@ -82,21 +82,14 @@ public class ChangeRestored {
|
|||||||
private static class Event extends AbstractRevisionEvent
|
private static class Event extends AbstractRevisionEvent
|
||||||
implements ChangeRestoredListener.Event {
|
implements ChangeRestoredListener.Event {
|
||||||
|
|
||||||
private AccountInfo restorer;
|
|
||||||
private String reason;
|
private String reason;
|
||||||
|
|
||||||
Event(ChangeInfo change, RevisionInfo revision, AccountInfo restorer,
|
Event(ChangeInfo change, RevisionInfo revision, AccountInfo restorer,
|
||||||
String reason, Timestamp when) {
|
String reason, Timestamp when) {
|
||||||
super(change, revision, restorer, when, NotifyHandling.ALL);
|
super(change, revision, restorer, when, NotifyHandling.ALL);
|
||||||
this.restorer = restorer;
|
|
||||||
this.reason = reason;
|
this.reason = reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public AccountInfo getRestorer() {
|
|
||||||
return restorer;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getReason() {
|
public String getReason() {
|
||||||
return reason;
|
return reason;
|
||||||
|
@@ -90,7 +90,6 @@ public class CommentAdded {
|
|||||||
private static class Event extends AbstractRevisionEvent
|
private static class Event extends AbstractRevisionEvent
|
||||||
implements CommentAddedListener.Event {
|
implements CommentAddedListener.Event {
|
||||||
|
|
||||||
private final AccountInfo author;
|
|
||||||
private final String comment;
|
private final String comment;
|
||||||
private final Map<String, ApprovalInfo> approvals;
|
private final Map<String, ApprovalInfo> approvals;
|
||||||
private final Map<String, ApprovalInfo> oldApprovals;
|
private final Map<String, ApprovalInfo> oldApprovals;
|
||||||
@@ -99,17 +98,11 @@ public class CommentAdded {
|
|||||||
String comment, Map<String, ApprovalInfo> approvals,
|
String comment, Map<String, ApprovalInfo> approvals,
|
||||||
Map<String, ApprovalInfo> oldApprovals, Timestamp when) {
|
Map<String, ApprovalInfo> oldApprovals, Timestamp when) {
|
||||||
super(change, revision, author, when, NotifyHandling.ALL);
|
super(change, revision, author, when, NotifyHandling.ALL);
|
||||||
this.author = author;
|
|
||||||
this.comment = comment;
|
this.comment = comment;
|
||||||
this.approvals = approvals;
|
this.approvals = approvals;
|
||||||
this.oldApprovals = oldApprovals;
|
this.oldApprovals = oldApprovals;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public AccountInfo getAuthor() {
|
|
||||||
return author;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getComment() {
|
public String getComment() {
|
||||||
return comment;
|
return comment;
|
||||||
|
@@ -78,17 +78,10 @@ public class DraftPublished {
|
|||||||
|
|
||||||
private static class Event extends AbstractRevisionEvent
|
private static class Event extends AbstractRevisionEvent
|
||||||
implements DraftPublishedListener.Event {
|
implements DraftPublishedListener.Event {
|
||||||
private final AccountInfo publisher;
|
|
||||||
|
|
||||||
Event(ChangeInfo change, RevisionInfo revision, AccountInfo publisher,
|
Event(ChangeInfo change, RevisionInfo revision, AccountInfo publisher,
|
||||||
Timestamp when) {
|
Timestamp when) {
|
||||||
super(change, revision, publisher, when, NotifyHandling.ALL);
|
super(change, revision, publisher, when, NotifyHandling.ALL);
|
||||||
this.publisher = publisher;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AccountInfo getPublisher() {
|
|
||||||
return publisher;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -81,7 +81,6 @@ public class HashtagsEdited {
|
|||||||
private static class Event extends AbstractChangeEvent
|
private static class Event extends AbstractChangeEvent
|
||||||
implements HashtagsEditedListener.Event {
|
implements HashtagsEditedListener.Event {
|
||||||
|
|
||||||
private AccountInfo editor;
|
|
||||||
private Collection<String> updatedHashtags;
|
private Collection<String> updatedHashtags;
|
||||||
private Collection<String> addedHashtags;
|
private Collection<String> addedHashtags;
|
||||||
private Collection<String> removedHashtags;
|
private Collection<String> removedHashtags;
|
||||||
@@ -89,17 +88,11 @@ public class HashtagsEdited {
|
|||||||
Event(ChangeInfo change, AccountInfo editor, Collection<String> updated,
|
Event(ChangeInfo change, AccountInfo editor, Collection<String> updated,
|
||||||
Collection<String> added, Collection<String> removed, Timestamp when) {
|
Collection<String> added, Collection<String> removed, Timestamp when) {
|
||||||
super(change, editor, when, NotifyHandling.ALL);
|
super(change, editor, when, NotifyHandling.ALL);
|
||||||
this.editor = editor;
|
|
||||||
this.updatedHashtags = updated;
|
this.updatedHashtags = updated;
|
||||||
this.addedHashtags = added;
|
this.addedHashtags = added;
|
||||||
this.removedHashtags = removed;
|
this.removedHashtags = removed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public AccountInfo getEditor() {
|
|
||||||
return editor;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<String> getHashtags() {
|
public Collection<String> getHashtags() {
|
||||||
return updatedHashtags;
|
return updatedHashtags;
|
||||||
|
@@ -81,17 +81,10 @@ public class RevisionCreated {
|
|||||||
|
|
||||||
private static class Event extends AbstractRevisionEvent
|
private static class Event extends AbstractRevisionEvent
|
||||||
implements RevisionCreatedListener.Event {
|
implements RevisionCreatedListener.Event {
|
||||||
private final AccountInfo uploader;
|
|
||||||
|
|
||||||
Event(ChangeInfo change, RevisionInfo revision, AccountInfo uploader,
|
Event(ChangeInfo change, RevisionInfo revision, AccountInfo uploader,
|
||||||
Timestamp when, NotifyHandling notify) {
|
Timestamp when, NotifyHandling notify) {
|
||||||
super(change, revision, uploader, when, notify);
|
super(change, revision, uploader, when, notify);
|
||||||
this.uploader = uploader;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AccountInfo getUploader() {
|
|
||||||
return uploader;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -75,21 +75,14 @@ public class TopicEdited {
|
|||||||
|
|
||||||
private static class Event extends AbstractChangeEvent
|
private static class Event extends AbstractChangeEvent
|
||||||
implements TopicEditedListener.Event {
|
implements TopicEditedListener.Event {
|
||||||
private final AccountInfo editor;
|
|
||||||
private final String oldTopic;
|
private final String oldTopic;
|
||||||
|
|
||||||
Event(ChangeInfo change, AccountInfo editor, String oldTopic,
|
Event(ChangeInfo change, AccountInfo editor, String oldTopic,
|
||||||
Timestamp when) {
|
Timestamp when) {
|
||||||
super(change, editor, when, NotifyHandling.ALL);
|
super(change, editor, when, NotifyHandling.ALL);
|
||||||
this.editor = editor;
|
|
||||||
this.oldTopic = oldTopic;
|
this.oldTopic = oldTopic;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public AccountInfo getEditor() {
|
|
||||||
return editor;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getOldTopic() {
|
public String getOldTopic() {
|
||||||
return oldTopic;
|
return oldTopic;
|
||||||
|
Reference in New Issue
Block a user