aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-04-10 15:20:14 (EDT)
committerChris Aniszczyk2011-04-10 15:28:01 (EDT)
commit3301f6a91b852f0e181c912601fd05d6fc53e04c (patch)
treeca7c53a6713622d1624d968093ae3b08608a37e6
parent990790463e207419db4b939900fad466b99f4430 (diff)
downloadegit-github-3301f6a91b852f0e181c912601fd05d6fc53e04c.zip
egit-github-3301f6a91b852f0e181c912601fd05d6fc53e04c.tar.gz
egit-github-3301f6a91b852f0e181c912601fd05d6fc53e04c.tar.bz2
Add label and issue model classes for new APIrefs/changes/45/3045/2
Change-Id: I035aa1dd7e64354bc2cc07c1da9f36a73016c9f5 Signed-off-by: Kevin Sawicki <kevin@github.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Issue.java149
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Label.java47
2 files changed, 196 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Issue.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Issue.java
new file mode 100644
index 0000000..f1947d0
--- /dev/null
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Issue.java
@@ -0,0 +1,149 @@
+/*******************************************************************************
+ * Copyright (c) 2011 GitHub Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Kevin Sawicki (GitHub Inc.) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.mylyn.github.internal;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * GitHub issue class.
+ *
+ * @author Kevin Sawicki (kevin@github.com)
+ */
+public class Issue {
+
+ private Date closedAt;
+
+ private Date createdAt;
+
+ private Date updatedAt;
+
+ private int comments;
+
+ private int number;
+
+ private List<Label> labels;
+
+ private Milestone milestone;
+
+ private String body;
+
+ private String htmlUrl;
+
+ private String state;
+
+ private String title;
+
+ private String url;
+
+ private User assignee;
+
+ private User user;
+
+ /**
+ * @return closedAt
+ */
+ public Date getClosedAt() {
+ return this.closedAt;
+ }
+
+ /**
+ * @return createdAt
+ */
+ public Date getCreatedAt() {
+ return this.createdAt;
+ }
+
+ /**
+ * @return updatedAt
+ */
+ public Date getUpdatedAt() {
+ return this.updatedAt;
+ }
+
+ /**
+ * @return comments
+ */
+ public int getComments() {
+ return this.comments;
+ }
+
+ /**
+ * @return number
+ */
+ public int getNumber() {
+ return this.number;
+ }
+
+ /**
+ * @return labels
+ */
+ public List<Label> getLabels() {
+ return this.labels;
+ }
+
+ /**
+ * @return milestone
+ */
+ public Milestone getMilestone() {
+ return this.milestone;
+ }
+
+ /**
+ * @return body
+ */
+ public String getBody() {
+ return this.body;
+ }
+
+ /**
+ * @return htmlUrl
+ */
+ public String getHtmlUrl() {
+ return this.htmlUrl;
+ }
+
+ /**
+ * @return state
+ */
+ public String getState() {
+ return this.state;
+ }
+
+ /**
+ * @return title
+ */
+ public String getTitle() {
+ return this.title;
+ }
+
+ /**
+ * @return url
+ */
+ public String getUrl() {
+ return this.url;
+ }
+
+ /**
+ * @return assignee
+ */
+ public User getAssignee() {
+ return this.assignee;
+ }
+
+ /**
+ * @return user
+ */
+ public User getUser() {
+ return this.user;
+ }
+
+}
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Label.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Label.java
new file mode 100644
index 0000000..4b44fa9
--- /dev/null
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Label.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2011 GitHub Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Kevin Sawicki (GitHub Inc.) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.mylyn.github.internal;
+
+/**
+ * GitHub issue label class.
+ *
+ * @author Kevin Sawicki (kevin@github.com)
+ */
+public class Label {
+
+ private String color;
+
+ private String name;
+
+ private String url;
+
+ /**
+ * @return color
+ */
+ public String getColor() {
+ return this.color;
+ }
+
+ /**
+ * @return name
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * @return url
+ */
+ public String getUrl() {
+ return this.url;
+ }
+
+}