diff options
author | Jon Ander Peñalba | 2015-03-05 09:51:14 +0000 |
---|---|---|
committer | Jon Ander Peñalba | 2015-03-10 23:39:35 +0000 |
commit | 25724ff0dfa9ff7adec2c4b428c9e2809b881f6d (patch) | |
tree | 4df7653db046e8c232cfb1d2570f0b7fbeff3f78 /org.eclipse.egit.github.core/src | |
parent | 76dc8a6ef060de819a3e3c99d535fdca2a8785d9 (diff) | |
download | egit-github-25724ff0dfa9ff7adec2c4b428c9e2809b881f6d.tar.gz egit-github-25724ff0dfa9ff7adec2c4b428c9e2809b881f6d.tar.xz egit-github-25724ff0dfa9ff7adec2c4b428c9e2809b881f6d.zip |
Improve the IssueEvent class adding more fields
Relevant GitHub API docs: https://developer.github.com/v3/issues/events/
Change-Id: I5f4e64558ca3eb010bdd01680c0056676c0f7738
Signed-off-by: Jon Ander Peñalba <jonan88@gmail.com>
Diffstat (limited to 'org.eclipse.egit.github.core/src')
-rw-r--r-- | org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/IssueEvent.java | 413 |
1 files changed, 267 insertions, 146 deletions
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/IssueEvent.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/IssueEvent.java index 68772f0f..a1e63312 100644 --- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/IssueEvent.java +++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/IssueEvent.java @@ -20,150 +20,271 @@ import org.eclipse.egit.github.core.util.DateUtils; */ public class IssueEvent implements Serializable { - /** serialVersionUID */ - private static final long serialVersionUID = -842754108817725707L; - - private Date createdAt; - - private Issue issue; - - private long id; - - private String commitId; - - private String event; - - private String url; - - private User actor; - - private Label label; - - /** - * @return createdAt - */ - public Date getCreatedAt() { - return DateUtils.clone(createdAt); - } - - /** - * @param createdAt - * @return this issue event - */ - public IssueEvent setCreatedAt(Date createdAt) { - this.createdAt = DateUtils.clone(createdAt); - return this; - } - - /** - * @return issue - */ - public Issue getIssue() { - return issue; - } - - /** - * @param issue - * @return this issue event - */ - public IssueEvent setIssue(Issue issue) { - this.issue = issue; - return this; - } - - /** - * @return id - */ - public long getId() { - return id; - } - - /** - * @param id - * @return this issue event - */ - public IssueEvent setId(long id) { - this.id = id; - return this; - } - - /** - * @return commitId - */ - public String getCommitId() { - return commitId; - } - - /** - * @param commitId - * @return this issue event - */ - public IssueEvent setCommitId(String commitId) { - this.commitId = commitId; - return this; - } - - /** - * @return event - */ - public String getEvent() { - return event; - } - - /** - * @param event - * @return this issue event - */ - public IssueEvent setEvent(String event) { - this.event = event; - return this; - } - - /** - * @return url - */ - public String getUrl() { - return url; - } - - /** - * @param url - * @return this issue event - */ - public IssueEvent setUrl(String url) { - this.url = url; - return this; - } - - /** - * @return actor - */ - public User getActor() { - return actor; - } - - /** - * @param actor - * @return this issue event - */ - public IssueEvent setActor(User actor) { - this.actor = actor; - return this; - } - - /** - * @return label - */ - public Label getLabel() { - return label; - } - - /** - * @param label - * @return this issue event - */ - public IssueEvent setLabel(Label label) { - this.label = label; - return this; - } + /** + * Closed event + */ + public static final String TYPE_CLOSED = "closed"; //$NON-NLS-1$ + + /** + * Reopened event + */ + public static final String TYPE_REOPENED = "reopened"; //$NON-NLS-1$ + + /** + * Subscribed event + */ + public static final String TYPE_SUBSCRIBED = "subscribed"; //$NON-NLS-1$ + + /** + * Merged event + */ + public static final String TYPE_MERGED = "merged"; //$NON-NLS-1$ + + /** + * Referenced event + */ + public static final String TYPE_REFERENCED = "referenced"; //$NON-NLS-1$ + + /** + * Mentioned event + */ + public static final String TYPE_MENTIONED = "mentioned"; //$NON-NLS-1$ + + /** + * Assigned event + */ + public static final String TYPE_ASSIGNED = "assigned"; //$NON-NLS-1$ + + /** + * Unassigned event + */ + public static final String TYPE_UNASSIGNED = "unassigned"; //$NON-NLS-1$ + + /** + * Labeled event + */ + public static final String TYPE_LABELED = "labeled"; //$NON-NLS-1$ + + /** + * Unlabeled event + */ + public static final String TYPE_UNLABELED = "unlabeled"; //$NON-NLS-1$ + + /** + * Milestoned event + */ + public static final String TYPE_MILESTONED = "milestoned"; //$NON-NLS-1$ + + /** + * Demilestoned event + */ + public static final String TYPE_DEMILESTONED = "demilestoned"; //$NON-NLS-1$ + + /** + * Renamed event + */ + public static final String TYPE_RENAMED = "renamed"; //$NON-NLS-1$ + + /** + * Locked event + */ + public static final String TYPE_LOCKED = "locked"; //$NON-NLS-1$ + + /** + * Unlocked event + */ + public static final String TYPE_UNLOCKED = "unlocked"; //$NON-NLS-1$ + + /** + * HEAD ref deleted event + */ + public static final String TYPE_HEAD_REF_DELETED = "head_ref_deleted"; //$NON-NLS-1$ + + /** + * HEAD ref restored event + */ + public static final String TYPE_HEAD_REF_RESTORED = "head_ref_restored"; //$NON-NLS-1$ + + /** serialVersionUID */ + private static final long serialVersionUID = -842754108817725707L; + + private long id; + + private String url; + + private User actor; + + private String commitId; + + private String event; + + private Date createdAt; + + private Label label; + + private User assignee; + + private Milestone milestone; + + private Issue issue; + + /** + * @return id + */ + public long getId() { + return id; + } + + /** + * @param id + * @return this issue event + */ + public IssueEvent setId(long id) { + this.id = id; + return this; + } + + /** + * @return url + */ + public String getUrl() { + return url; + } + + /** + * @param url + * @return this issue event + */ + public IssueEvent setUrl(String url) { + this.url = url; + return this; + } + + /** + * @return actor + */ + public User getActor() { + return actor; + } + + /** + * @param actor + * @return this issue event + */ + public IssueEvent setActor(User actor) { + this.actor = actor; + return this; + } + + /** + * @return commitId + */ + public String getCommitId() { + return commitId; + } + + /** + * @param commitId + * @return this issue event + */ + public IssueEvent setCommitId(String commitId) { + this.commitId = commitId; + return this; + } + + /** + * @return event + */ + public String getEvent() { + return event; + } + + /** + * @param event + * @return this issue event + */ + public IssueEvent setEvent(String event) { + this.event = event; + return this; + } + + /** + * @return createdAt + */ + public Date getCreatedAt() { + return DateUtils.clone(createdAt); + } + + /** + * @param createdAt + * @return this issue event + */ + public IssueEvent setCreatedAt(Date createdAt) { + this.createdAt = DateUtils.clone(createdAt); + return this; + } + + /** + * @return label + */ + public Label getLabel() { + return label; + } + + /** + * @param label + * @return this issue event + */ + public IssueEvent setLabel(Label label) { + this.label = label; + return this; + } + + /** + * @return actor + */ + public User getAssignee() { + return assignee; + } + + /** + * @param assignee + * @return this issue event + */ + public IssueEvent setAssignee(User assignee) { + this.assignee = assignee; + return this; + } + + /** + * @return milestone + */ + public Milestone getMilestone() { + return milestone; + } + + /** + * @param milestone + * @return this issue event + */ + public IssueEvent setMilestone(Milestone milestone) { + this.milestone = milestone; + return this; + } + + /** + * @return issue + */ + public Issue getIssue() { + return issue; + } + + /** + * @param issue + * @return this issue event + */ + public IssueEvent setIssue(Issue issue) { + this.issue = issue; + return this; + } } |