summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2016-08-30 21:24:19 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2016-09-01 16:57:45 -0400
commit5a4dcceb7bedf31d22a44a4b0cd34e5bc33ff1cb (patch)
tree8321618a0a802bb9ebce4a1d055fbeb745b389ce
parentb67df51203bb0b7a0dda8a8cfe1ddf09493a13f9 (diff)
downloadjgit-5a4dcceb7bedf31d22a44a4b0cd34e5bc33ff1cb.tar.gz
jgit-5a4dcceb7bedf31d22a44a4b0cd34e5bc33ff1cb.zip
Improve JavaDoc for LfsProtocolServlet.getLargeFileRepository
Guide implementors which exception to throw in case of errors. Change-Id: I74fb76cdf6b7cdef513f3fe8c144572e869cc533 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java23
1 files changed, 23 insertions, 0 deletions
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 e9fb5051d0..eb49ff0939 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
@@ -108,6 +108,29 @@ public abstract class LfsProtocolServlet extends HttpServlet {
*
* @return the large file repository storing large files.
* @throws LfsException
+ * implementations should throw more specific exceptions to
+ * signal which type of error occurred:
+ * <dl>
+ * <dt>{@link LfsValidationError}</dt>
+ * <dd>when there is a validation error with one or more of the
+ * objects in the request</dd>
+ * <dt>{@link LfsRepositoryNotFound}</dt>
+ * <dd>when the repository does not exist for the user</dd>
+ * <dt>{@link LfsRepositoryReadOnly}</dt>
+ * <dd>when the user has read, but not write access. Only
+ * applicable when the operation in the request is "upload"</dd>
+ * <dt>{@link LfsRateLimitExceeded}</dt>
+ * <dd>when the user has hit a rate limit with the server</dd>
+ * <dt>{@link LfsBandwidthLimitExceeded}</dt>
+ * <dd>when the bandwidth limit for the user or repository has
+ * been exceeded</dd>
+ * <dt>{@link LfsInsufficientStorage}</dt>
+ * <dd>when there is insufficient storage on the server</dd>
+ * <dt>{@link LfsUnavailable}</dt>
+ * <dd>when LFS is not available</dd>
+ * <dt>{@link LfsException}</dt>
+ * <dd>when an unexpected internal server error occurred</dd>
+ * </dl>
* @since 4.5
*/
protected abstract LargeFileRepository getLargeFileRepository(