aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthallgren2011-09-26 17:13:10 (EDT)
committerKevin Sawicki2011-09-26 17:13:10 (EDT)
commit11f7b6dcb89046c953b8e3167045e3d05e259aa9 (patch)
tree8b1c72f23f784e62998ba08f5461a96ea1660c01
parentfd244b33d7ac8db13a1e876b96b8c05083244862 (diff)
downloadegit-github-11f7b6dcb89046c953b8e3167045e3d05e259aa9.zip
egit-github-11f7b6dcb89046c953b8e3167045e3d05e259aa9.tar.gz
egit-github-11f7b6dcb89046c953b8e3167045e3d05e259aa9.tar.bz2
Add content-type field to Download model classrefs/changes/89/4289/2
Change-Id: Ic66b1d2814cdeefa769158969c241e39071b92c0 Signed-off-by: Thomas Hallgren <thomas@tada.se> Signed-off-by: Kevin Sawicki <kevin@github.com>
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/DownloadTest.java2
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Download.java18
2 files changed, 20 insertions, 0 deletions
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/DownloadTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/DownloadTest.java
index 8bf9feb..5399f87 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/DownloadTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/DownloadTest.java
@@ -34,6 +34,7 @@ public class DownloadTest {
assertNull(dl.getName());
assertEquals(0, dl.getSize());
assertNull(dl.getUrl());
+ assertNull(dl.getContentType());
}
/**
@@ -51,6 +52,7 @@ public class DownloadTest {
assertEquals("download.jar", dl.setName("download.jar").getName());
assertEquals(12345, dl.setSize(12345).getSize());
assertEquals("/path/dl", dl.setUrl("/path/dl").getUrl());
+ assertEquals("text/plain", dl.setContentType("text/plain").getContentType());
}
}
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Download.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Download.java
index db6421b..1a4a718 100644
--- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Download.java
+++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Download.java
@@ -28,6 +28,8 @@ public class Download implements Serializable {
private String description;
+ private String contentType;
+
private String htmlUrl;
private String name;
@@ -99,6 +101,22 @@ public class Download implements Serializable {
}
/**
+ * @return contentType
+ */
+ public String getContentType() {
+ return contentType;
+ }
+
+ /**
+ * @param contentType
+ * @return this download
+ */
+ public Download setContentType(String contentType) {
+ this.contentType = contentType;
+ return this;
+ }
+
+ /**
* @return htmlUrl
*/
public String getHtmlUrl() {