Browse Source

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>
stable-4.5
David Pursehouse 8 years ago
parent
commit
584035a5fb
  1. 20
      org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsObject.java
  2. 9
      org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java

20
org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsObject.java

@ -42,7 +42,25 @@
*/ */
package org.eclipse.jgit.lfs.server; package org.eclipse.jgit.lfs.server;
class LfsObject { /**
* LFS object.
*
*/
public class LfsObject {
String oid; String oid;
long size; long size;
/**
* @return the object ID.
*/
public String getOid() {
return oid;
}
/**
* @return the object size.
*/
public long getSize() {
return size;
}
} }

9
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() { public String getOperation() {
return operation; return operation;
} }
/**
* Get the LFS objects.
*
* @return the objects
*/
public List<LfsObject> getObjects() {
return objects;
}
} }
@Override @Override

Loading…
Cancel
Save