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>
This commit is contained in:
David Pursehouse 2016-08-01 09:50:09 +09:00
parent 571c9f5fd6
commit 584035a5fb
2 changed files with 28 additions and 1 deletions

View File

@ -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;
}
}

View File

@ -117,6 +117,15 @@ protected static class LfsRequest {
public String getOperation() {
return operation;
}
/**
* Get the LFS objects.
*
* @return the objects
*/
public List<LfsObject> getObjects() {
return objects;
}
}
@Override