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