aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.lfs.server
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2016-08-01 09:50:09 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2016-08-05 11:22:27 +0900
commit584035a5fb1a05c9294bcf3746c2fb93a77ba7c3 (patch)
tree2d88adfdee4b5ac2656b06458635d3e9ea14efda /org.eclipse.jgit.lfs.server
parent571c9f5fd6f7c25f0729088e4f23bb38ea743e7b (diff)
downloadjgit-584035a5fb1a05c9294bcf3746c2fb93a77ba7c3.tar.gz
jgit-584035a5fb1a05c9294bcf3746c2fb93a77ba7c3.zip
LfsProtocolServlet: Allow access to objects in request
Classes implementing the LFS servlet should be able to inspect the objects given in the request. Add a getObjects method. Make the LfsObject class public, and add accessor methods. Change-Id: I27961679f620eb3a89dc8521aadd4ea2f936c60e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.lfs.server')
-rw-r--r--org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsObject.java20
-rw-r--r--org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java9
2 files changed, 28 insertions, 1 deletions
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsObject.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsObject.java
index 30ba22e885..bd6602019f 100644
--- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsObject.java
+++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsObject.java
@@ -42,7 +42,25 @@
*/
package org.eclipse.jgit.lfs.server;
-class LfsObject {
+/**
+ * LFS object.
+ *
+ */
+public class LfsObject {
String oid;
long size;
+
+ /**
+ * @return the object ID.
+ */
+ public String getOid() {
+ return oid;
+ }
+
+ /**
+ * @return the object size.
+ */
+ public long getSize() {
+ return size;
+ }
}
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java
index c38f567540..fdd8649036 100644
--- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java
+++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java
@@ -117,6 +117,15 @@ public abstract class LfsProtocolServlet extends HttpServlet {
public String getOperation() {
return operation;
}
+
+ /**
+ * Get the LFS objects.
+ *
+ * @return the objects
+ */
+ public List<LfsObject> getObjects() {
+ return objects;
+ }
}
@Override