From 584035a5fb1a05c9294bcf3746c2fb93a77ba7c3 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Mon, 1 Aug 2016 09:50:09 +0900 Subject: [PATCH] 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 --- .../eclipse/jgit/lfs/server/LfsObject.java | 20 ++++++++++++++++++- .../jgit/lfs/server/LfsProtocolServlet.java | 9 +++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) 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 30ba22e88..bd6602019 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 c38f56754..fdd864903 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 getObjects() { + return objects; + } } @Override