diff options
| author | Kevin Sawicki | 2011-04-10 19:20:14 +0000 |
|---|---|---|
| committer | Chris Aniszczyk | 2011-04-10 19:28:01 +0000 |
| commit | 3301f6a91b852f0e181c912601fd05d6fc53e04c (patch) | |
| tree | ca7c53a6713622d1624d968093ae3b08608a37e6 | |
| parent | 990790463e207419db4b939900fad466b99f4430 (diff) | |
| download | egit-github-3301f6a91b852f0e181c912601fd05d6fc53e04c.tar.gz egit-github-3301f6a91b852f0e181c912601fd05d6fc53e04c.tar.xz egit-github-3301f6a91b852f0e181c912601fd05d6fc53e04c.zip | |
Add label and issue model classes for new API
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.java | 149 | ||||
| -rw-r--r-- | org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Label.java | 47 |
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 00000000..f1947d0c --- /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 00000000..4b44fa97 --- /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; + } + +} |
