diff options
author | Kevin Sawicki | 2011-04-27 19:48:01 +0000 |
---|---|---|
committer | Kevin Sawicki | 2011-04-27 19:48:01 +0000 |
commit | 89e6e655530b83dfeae60bc2f479979f12bd3a80 (patch) | |
tree | fb15a141259bd60322aef1cf31511fe04c923b23 | |
parent | a4642193cb73b4c89f51640087033b124e67d725 (diff) | |
download | egit-github-89e6e655530b83dfeae60bc2f479979f12bd3a80.tar.gz egit-github-89e6e655530b83dfeae60bc2f479979f12bd3a80.tar.xz egit-github-89e6e655530b83dfeae60bc2f479979f12bd3a80.zip |
Add pull request id and discussion model classes.
Change-Id: Ia8d5894e271a7c2856329521a75f1e3132493cdc
Signed-off-by: Kevin Sawicki <kevin@github.com>
-rw-r--r-- | org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Id.java | 29 | ||||
-rw-r--r-- | org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/PullRequestDiscussion.java | 188 |
2 files changed, 217 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Id.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Id.java new file mode 100644 index 00000000..41a8fb7d --- /dev/null +++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Id.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * 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; + +/** + * Id class. + */ +public class Id { + + private String id; + + /** + * Get id + * + * @return id + */ + public String getId() { + return this.id; + } + +} diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/PullRequestDiscussion.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/PullRequestDiscussion.java new file mode 100644 index 00000000..58fc11ce --- /dev/null +++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/PullRequestDiscussion.java @@ -0,0 +1,188 @@ +/******************************************************************************* + * 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; + +/** + * Pull request discussion model class. + */ +public class PullRequestDiscussion { + + /** + * TYPE_COMMIT + */ + public static final String TYPE_COMMIT = "Commit"; + + /** + * TYPE_ISSUE_COMMENT + */ + public static final String TYPE_ISSUE_COMMENT = "IssueComment"; + + private Date authoredDate; + private Date commitedDate; + private Date createdAt; + private Date updatedAt; + + private int position; + + private List<Id> parents; + + private String body; + private String commitId; + private String id; + private String diffHunk; + private String gravatarId; + private String message; + private String originalCommitId; + private String path; + private String tree; + private String type; + + private User author; + private User committer; + private User user; + + /** + * @return authoredDate + */ + public Date getAuthoredDate() { + return this.authoredDate; + } + + /** + * @return commitedDate + */ + public Date getCommitedDate() { + return this.commitedDate; + } + + /** + * @return createdAt + */ + public Date getCreatedAt() { + return this.createdAt; + } + + /** + * @return updatedAt + */ + public Date getUpdatedAt() { + return this.updatedAt; + } + + /** + * @return position + */ + public int getPosition() { + return this.position; + } + + /** + * @return parents + */ + public List<Id> getParents() { + return this.parents; + } + + /** + * @return body + */ + public String getBody() { + return this.body; + } + + /** + * @return commitId + */ + public String getCommitId() { + return this.commitId; + } + + /** + * @return id + */ + public String getId() { + return this.id; + } + + /** + * @return diffHunk + */ + public String getDiffHunk() { + return this.diffHunk; + } + + /** + * @return gravatarId + */ + public String getGravatarId() { + return this.gravatarId; + } + + /** + * @return message + */ + public String getMessage() { + return this.message; + } + + /** + * @return originalCommitId + */ + public String getOriginalCommitId() { + return this.originalCommitId; + } + + /** + * @return path + */ + public String getPath() { + return this.path; + } + + /** + * @return tree + */ + public String getTree() { + return this.tree; + } + + /** + * @return type + */ + public String getType() { + return this.type; + } + + /** + * @return author + */ + public User getAuthor() { + return this.author; + } + + /** + * @return committer + */ + public User getCommitter() { + return this.committer; + } + + /** + * @return user + */ + public User getUser() { + return this.user; + } + +} |