diff options
author | Kevin Sawicki | 2011-04-25 18:58:59 +0000 |
---|---|---|
committer | Kevin Sawicki | 2011-04-25 19:01:38 +0000 |
commit | 128aa1ca1417e52fcfc48f00c8b39cdef5cc9403 (patch) | |
tree | 381468d0c0e54edde619e7e9857986cc7479d653 | |
parent | 77072b9716fc10a1003f0b10398f0a1eeb328747 (diff) | |
download | egit-github-128aa1ca1417e52fcfc48f00c8b39cdef5cc9403.tar.gz egit-github-128aa1ca1417e52fcfc48f00c8b39cdef5cc9403.tar.xz egit-github-128aa1ca1417e52fcfc48f00c8b39cdef5cc9403.zip |
Add full repository model support.
Change-Id: I1a0bf341baad619ed1446d7bd28e8212150e69ac
Signed-off-by: Kevin Sawicki <kevin@github.com>
2 files changed, 169 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Repository.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Repository.java index 5cf1fad0..05c520d9 100644 --- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Repository.java +++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Repository.java @@ -10,6 +10,10 @@ *******************************************************************************/ package org.eclipse.mylyn.github.internal; +import com.google.gson.annotations.SerializedName; + +import java.util.Date; + import org.eclipse.core.runtime.Assert; /** @@ -19,8 +23,27 @@ import org.eclipse.core.runtime.Assert; */ public class Repository { - private String owner; + private boolean fork; + private boolean hasDownloads; + private boolean hasIssues; + private boolean hasWiki; + @SerializedName("private") + private boolean isPrivate; + + private Date createdAt; + private Date pushedAt; + + private String description; + private String homepage; + private String language; private String name; + private String owner; + private String url; + + private int forks; + private int openIssues; + private int size; + private int watchers; /** * Create repository with owner and name @@ -39,6 +62,13 @@ public class Repository { } /** + * Create repository + */ + Repository() { + + } + + /** * @see java.lang.Object#hashCode() */ public int hashCode() { @@ -87,4 +117,109 @@ public class Repository { return this.name; } + /** + * @return fork + */ + public boolean isFork() { + return this.fork; + } + + /** + * @return hasDownloads + */ + public boolean isHasDownloads() { + return this.hasDownloads; + } + + /** + * @return hasIssues + */ + public boolean isHasIssues() { + return this.hasIssues; + } + + /** + * @return hasWiki + */ + public boolean isHasWiki() { + return this.hasWiki; + } + + /** + * @return isPrivate + */ + public boolean isPrivate() { + return this.isPrivate; + } + + /** + * @return createdAt + */ + public Date getCreatedAt() { + return this.createdAt; + } + + /** + * @return pushedAt + */ + public Date getPushedAt() { + return this.pushedAt; + } + + /** + * @return description + */ + public String getDescription() { + return this.description; + } + + /** + * @return homepage + */ + public String getHomepage() { + return this.homepage; + } + + /** + * @return language + */ + public String getLanguage() { + return this.language; + } + + /** + * @return url + */ + public String getUrl() { + return this.url; + } + + /** + * @return forks + */ + public int getForks() { + return this.forks; + } + + /** + * @return openIssues + */ + public int getOpenIssues() { + return this.openIssues; + } + + /** + * @return size + */ + public int getSize() { + return this.size; + } + + /** + * @return watchers + */ + public int getWatchers() { + return this.watchers; + } + } diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/RepositoryContainer.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/RepositoryContainer.java new file mode 100644 index 00000000..aa0b1e99 --- /dev/null +++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/RepositoryContainer.java @@ -0,0 +1,33 @@ +/******************************************************************************* + * 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.List; + +/** + * Repository container class. + * + * @author Kevin Sawicki (kevin@github.com) + */ +public class RepositoryContainer { + + private List<Repository> repositories; + + /** + * Get repositories + * + * @return list of repositories + */ + public List<Repository> getRepositories() { + return this.repositories; + } + +} |