diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LargeFileRepository.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LargeFileRepository.java
index 3bdf8d08b..cfa53af9c 100644
--- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LargeFileRepository.java
+++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LargeFileRepository.java
@@ -55,6 +55,8 @@
public interface LargeFileRepository {
/**
+ * Get download action
+ *
* @param id
* id of the object to download
* @return Action for downloading the object
@@ -62,6 +64,8 @@ public interface LargeFileRepository {
public Response.Action getDownloadAction(AnyLongObjectId id);
/**
+ * Get upload action
+ *
* @param id
* id of the object to upload
* @param size
@@ -71,6 +75,8 @@ public interface LargeFileRepository {
public Response.Action getUploadAction(AnyLongObjectId id, long size);
/**
+ * Get verify action
+ *
* @param id
* id of the object to be verified
* @return Action for verifying the object, or {@code null} if the server
@@ -79,11 +85,13 @@ public interface LargeFileRepository {
public @Nullable Response.Action getVerifyAction(AnyLongObjectId id);
/**
+ * Get size of an object
+ *
* @param id
* id of the object
* @return length of the object content in bytes, -1 if the object doesn't
* exist
- * @throws IOException
+ * @throws java.io.IOException
*/
public long getSize(AnyLongObjectId id) throws IOException;
}
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 4d975024e..907e15603 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
@@ -52,6 +52,8 @@ public class LfsObject {
long size;
/**
+ * Get the oid
of this object.
+ *
* @return the object ID.
*/
public String getOid() {
@@ -59,6 +61,8 @@ public String getOid() {
}
/**
+ * Get the size
of this object.
+ *
* @return the object size.
*/
public long getSize() {
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 79f54f1ba..6968d7563 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
@@ -112,30 +112,29 @@ public abstract class LfsProtocolServlet extends HttpServlet {
* the request
* @param path
* the path
- *
* @return the large file repository storing large files.
- * @throws LfsException
+ * @throws org.eclipse.jgit.lfs.errors.LfsException
* implementations should throw more specific exceptions to
* signal which type of error occurred:
*
Constructor for FileLfsRepository.
+ * * @param url * external URL of this repository * @param dir * storage directory - * @throws IOException + * @throws java.io.IOException */ public FileLfsRepository(String url, Path dir) throws IOException { this.url = url; @@ -83,21 +85,25 @@ public FileLfsRepository(String url, Path dir) throws IOException { Files.createDirectories(dir); } + /** {@inheritDoc} */ @Override public Response.Action getDownloadAction(AnyLongObjectId id) { return getAction(id); } + /** {@inheritDoc} */ @Override public Action getUploadAction(AnyLongObjectId id, long size) { return getAction(id); } + /** {@inheritDoc} */ @Override public @Nullable Action getVerifyAction(AnyLongObjectId id) { return null; } + /** {@inheritDoc} */ @Override public long getSize(AnyLongObjectId id) throws IOException { Path p = getPath(id); diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java index 145fcd130..018102f79 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java @@ -79,6 +79,8 @@ public class FileLfsServlet extends HttpServlet { private final long timeout; /** + *Constructor for FileLfsServlet.
+ * * @param repository * the repository storing the large objects * @param timeout @@ -90,16 +92,9 @@ public FileLfsServlet(FileLfsRepository repository, long timeout) { } /** - * Handles object downloads + * {@inheritDoc} * - * @param req - * servlet request - * @param rsp - * servlet response - * @throws ServletException - * if a servlet-specific error occurs - * @throws IOException - * if an I/O error occurs + * Handle object downloads */ @Override protected void doGet(HttpServletRequest req, @@ -129,9 +124,9 @@ protected void doGet(HttpServletRequest req, * servlet response * @return object id, ornull
if the object id could not be
* retrieved
- * @throws IOException
+ * @throws java.io.IOException
* if an I/O error occurs
- * @since 4.6
+ * @since 4.6
*/
protected AnyLongObjectId getObjectToTransfer(HttpServletRequest req,
HttpServletResponse rsp) throws IOException {
@@ -151,16 +146,9 @@ protected AnyLongObjectId getObjectToTransfer(HttpServletRequest req,
}
/**
- * Handle object uploads
+ * {@inheritDoc}
*
- * @param req
- * servlet request
- * @param rsp
- * servlet response
- * @throws ServletException
- * if a servlet-specific error occurs
- * @throws IOException
- * if an I/O error occurs
+ * Handle object uploads
*/
@Override
protected void doPut(HttpServletRequest req,
@@ -183,7 +171,7 @@ protected void doPut(HttpServletRequest req,
* HTTP status code
* @param message
* error message
- * @throws IOException
+ * @throws java.io.IOException
* on failure to send the response
* @since 4.6
*/
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java
index cc4350090..ec1d3cd5d 100644
--- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java
+++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java
@@ -83,6 +83,8 @@ public class ObjectDownloadListener implements WriteListener {
private final ByteBuffer buffer = ByteBuffer.allocateDirect(8192);
/**
+ * Constructor for ObjectDownloadListener.
+ * * @param repository * the repository storing large objects * @param context @@ -91,7 +93,7 @@ public class ObjectDownloadListener implements WriteListener { * the servlet response * @param id * id of the object to be downloaded - * @throws IOException + * @throws java.io.IOException */ public ObjectDownloadListener(FileLfsRepository repository, AsyncContext context, HttpServletResponse response, @@ -108,9 +110,9 @@ public ObjectDownloadListener(FileLfsRepository repository, } /** - * Write file content + * {@inheritDoc} * - * @throws IOException + * Write file content */ @Override public void onWritePossible() throws IOException { @@ -134,10 +136,9 @@ public void onWritePossible() throws IOException { } /** - * Handle errors + * {@inheritDoc} * - * @param e - * the cause + * Handle errors */ @Override public void onError(Throwable e) { diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java index 84e4e6f1c..e4c04c19b 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java @@ -88,14 +88,20 @@ public class ObjectUploadListener implements ReadListener { private final ByteBuffer buffer = ByteBuffer.allocateDirect(8192); /** + * Constructor for ObjectUploadListener. + * * @param repository * the repository storing large objects * @param context + * a {@link javax.servlet.AsyncContext} object. * @param request + * a {@link javax.servlet.http.HttpServletRequest} object. * @param response + * a {@link javax.servlet.http.HttpServletResponse} object. * @param id - * @throws FileNotFoundException - * @throws IOException + * a {@link org.eclipse.jgit.lfs.lib.AnyLongObjectId} object. + * @throws java.io.FileNotFoundException + * @throws java.io.IOException */ public ObjectUploadListener(FileLfsRepository repository, AsyncContext context, HttpServletRequest request, @@ -111,9 +117,9 @@ public ObjectUploadListener(FileLfsRepository repository, } /** - * Writes all the received data to the output channel + * {@inheritDoc} * - * @throws IOException + * Writes all the received data to the output channel */ @Override public void onDataAvailable() throws IOException { @@ -133,16 +139,16 @@ public void onDataAvailable() throws IOException { } } - /** - * @throws IOException - */ + /** {@inheritDoc} */ @Override public void onAllDataRead() throws IOException { close(); } /** - * @throws IOException + * Close resources held by this listener + * + * @throws java.io.IOException */ protected void close() throws IOException { try { @@ -156,10 +162,7 @@ protected void close() throws IOException { } } - /** - * @param e - * the exception that caused the problem - */ + /** {@inheritDoc} */ @Override public void onError(Throwable e) { try { diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/internal/LfsGson.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/internal/LfsGson.java index c1659208a..7974b2412 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/internal/LfsGson.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/internal/LfsGson.java @@ -52,8 +52,9 @@ import com.google.gson.JsonSyntaxException; /** - * Wrapper for {@link Gson} used by LFS servlets. + * Wrapper for {@link com.google.gson.Gson} used by LFS servlets. * + * @since 4.10.0 */ public class LfsGson { private static final Gson gson = new GsonBuilder() @@ -78,10 +79,10 @@ static class Error { * @param src * the object for which Json representation is to be created. If * this is a String, it is wrapped in an instance of - * {@link Error}. + * {@link org.eclipse.jgit.lfs.server.internal.LfsGson.Error}. * @param writer * Writer to which the Json representation needs to be written - * @throws JsonIOException + * @throws com.google.gson.JsonIOException * if there was a problem writing to the writer * @see Gson#toJson(Object, Appendable) */ @@ -104,11 +105,13 @@ public static void toJson(Object src, Appendable writer) * @param classOfT * specified type to deserialize * @return an Object of type T - * @throws JsonIOException + * @throws com.google.gson.JsonIOException * if there was a problem reading from the Reader - * @throws JsonSyntaxException + * @throws com.google.gson.JsonSyntaxException * if json is not a valid representation for an object of type * @see Gson#fromJson(Reader, java.lang.reflect.Type) + * @paramConstructor for S3Config.
+ * * @param region * AWS region * @param bucket @@ -88,6 +90,8 @@ public S3Config(String region, String bucket, String storageClass, } /** + * Get theregion
.
+ *
* @return Get name of AWS region this bucket resides in
*/
public String getRegion() {
@@ -95,6 +99,8 @@ public String getRegion() {
}
/**
+ * Get the bucket
.
+ *
* @return Get S3 storage bucket name
*/
public String getBucket() {
@@ -102,6 +108,8 @@ public String getBucket() {
}
/**
+ * Get the storageClass
.
+ *
* @return S3 storage class to use for objects stored in this bucket
*/
public String getStorageClass() {
@@ -109,6 +117,8 @@ public String getStorageClass() {
}
/**
+ * Get the accessKey
.
+ *
* @return access key for authenticating to AWS
*/
public String getAccessKey() {
@@ -116,6 +126,8 @@ public String getAccessKey() {
}
/**
+ * Get the secretKey
.
+ *
* @return secret key for authenticating to AWS
*/
public String getSecretKey() {
@@ -123,6 +135,8 @@ public String getSecretKey() {
}
/**
+ * Get the expirationSeconds
.
+ *
* @return period in seconds after which requests signed for this bucket
* will expire
*/
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java
index ed896adff..043d3d0a3 100644
--- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java
+++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java
@@ -91,6 +91,7 @@ public S3Repository(S3Config config) {
this.s3Config = config;
}
+ /** {@inheritDoc} */
@Override
public Response.Action getDownloadAction(AnyLongObjectId oid) {
URL endpointUrl = getObjectUrl(oid);
@@ -107,6 +108,7 @@ public Response.Action getDownloadAction(AnyLongObjectId oid) {
return a;
}
+ /** {@inheritDoc} */
@Override
public Response.Action getUploadAction(AnyLongObjectId oid, long size) {
cacheObjectMetaData(oid, size);
@@ -126,11 +128,13 @@ public Response.Action getUploadAction(AnyLongObjectId oid, long size) {
return a;
}
+ /** {@inheritDoc} */
@Override
public Action getVerifyAction(AnyLongObjectId id) {
return null; // TODO(ms) implement this
}
+ /** {@inheritDoc} */
@Override
public long getSize(AnyLongObjectId oid) throws IOException {
URL endpointUrl = getObjectUrl(oid);