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:
parent
571c9f5fd6
commit
584035a5fb
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,6 +117,15 @@ protected static class LfsRequest {
|
||||||
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…
Reference in New Issue