]> source.dussan.org Git - jgit.git/commitdiff
Fix javadoc in org.eclipse.jgit.http.server 65/113565/1
authorMatthias Sohn <matthias.sohn@sap.com>
Sat, 16 Dec 2017 23:12:44 +0000 (00:12 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Sun, 17 Dec 2017 19:05:55 +0000 (20:05 +0100)
Change-Id: I732d773b21bbf64285493070964dd9e442eab5d8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
31 files changed:
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/AsIsFileFilter.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ClientVersionUtil.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitServlet.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitSmartHttpTools.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/HttpServerText.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/InfoPacksServlet.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/InfoRefsServlet.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/IsLocalFilter.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/NoCacheFilter.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ObjectFileServlet.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackServlet.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/RepositoryFilter.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ServletUtils.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartOutputStream.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartServiceInfoRefs.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/TextFileServlet.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackServlet.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/ErrorServlet.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaFilter.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaServlet.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/NoParameterFilterConfig.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexGroupFilter.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexPipeline.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/ServletBinder.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/ServletBinderImpl.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/SuffixPipeline.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/WrappedRequest.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/AsIsFileService.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultReceivePackFactory.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultUploadPackFactory.java

index 05391eb75d0b208e3ddda5c3d88ddbe85e2298ec..7f826d4f2730952cd79fedc0455e0e8e79007d92 100644 (file)
@@ -70,16 +70,19 @@ class AsIsFileFilter implements Filter {
                this.asIs = getAnyFile;
        }
 
+       /** {@inheritDoc} */
        @Override
        public void init(FilterConfig config) throws ServletException {
                // Do nothing.
        }
 
+       /** {@inheritDoc} */
        @Override
        public void destroy() {
                // Do nothing.
        }
 
+       /** {@inheritDoc} */
        @Override
        public void doFilter(ServletRequest request, ServletResponse response,
                        FilterChain chain) throws IOException, ServletException {
index c0d4b5e4dbc1d3088ff3edbd0e7b504285f3b1db..38a9ea75e75f3c3ba761e17422056a80a03c1bc6 100644 (file)
@@ -47,13 +47,19 @@ import static org.eclipse.jgit.http.server.ServletUtils.isChunked;
 
 import javax.servlet.http.HttpServletRequest;
 
-/** Parses Git client User-Agent strings. */
+/**
+ * Parses Git client User-Agent strings.
+ */
 public class ClientVersionUtil {
        private static final int[] v1_7_5 = { 1, 7, 5 };
        private static final int[] v1_7_8_6 = { 1, 7, 8, 6 };
        private static final int[] v1_7_9 = { 1, 7, 9 };
 
-       /** @return maximum version array, indicating an invalid version of Git. */
+       /**
+        * An invalid version of Git
+        *
+        * @return maximum version array, indicating an invalid version of Git.
+        */
        public static int[] invalidVersion() {
                return new int[] { Integer.MAX_VALUE };
        }
index 807037155cfca79fc5c62203934450958b92f30c..2ebe1b7d2f6e9e9970730826994c22f60884aba8 100644 (file)
@@ -62,8 +62,6 @@ import org.eclipse.jgit.http.server.resolver.AsIsFileService;
 import org.eclipse.jgit.http.server.resolver.DefaultReceivePackFactory;
 import org.eclipse.jgit.http.server.resolver.DefaultUploadPackFactory;
 import org.eclipse.jgit.lib.Constants;
-import org.eclipse.jgit.transport.ReceivePack;
-import org.eclipse.jgit.transport.UploadPack;
 import org.eclipse.jgit.transport.resolver.FileResolver;
 import org.eclipse.jgit.transport.resolver.ReceivePackFactory;
 import org.eclipse.jgit.transport.resolver.RepositoryResolver;
@@ -74,15 +72,16 @@ import org.eclipse.jgit.util.StringUtils;
  * Handles Git repository access over HTTP.
  * <p>
  * Applications embedding this filter should map a directory path within the
- * application to this filter. For a servlet version, see {@link GitServlet}.
+ * application to this filter. For a servlet version, see
+ * {@link org.eclipse.jgit.http.server.GitServlet}.
  * <p>
  * Applications may wish to add additional repository action URLs to this
- * servlet by taking advantage of its extension from {@link MetaFilter}.
- * Callers may register their own URL suffix translations through
- * {@link #serve(String)}, or their regex translations through
- * {@link #serveRegex(String)}. Each translation should contain a complete
- * filter pipeline which ends with the HttpServlet that should handle the
- * requested action.
+ * servlet by taking advantage of its extension from
+ * {@link org.eclipse.jgit.http.server.glue.MetaFilter}. Callers may register
+ * their own URL suffix translations through {@link #serve(String)}, or their
+ * regex translations through {@link #serveRegex(String)}. Each translation
+ * should contain a complete filter pipeline which ends with the HttpServlet
+ * that should handle the requested action.
  */
 public class GitFilter extends MetaFilter {
        private volatile boolean initialized;
@@ -124,6 +123,8 @@ public class GitFilter extends MetaFilter {
        }
 
        /**
+        * Set AsIsFileService
+        *
         * @param f
         *            the filter to validate direct access to repository files
         *            through a dumb client. If {@code null} then dumb client
@@ -135,9 +136,12 @@ public class GitFilter extends MetaFilter {
        }
 
        /**
+        * Set upload-pack factory
+        *
         * @param f
-        *            the factory to construct and configure an {@link UploadPack}
-        *            session when a fetch or clone is requested by a client.
+        *            the factory to construct and configure an
+        *            {@link org.eclipse.jgit.transport.UploadPack} session when a
+        *            fetch or clone is requested by a client.
         */
        @SuppressWarnings("unchecked")
        public void setUploadPackFactory(UploadPackFactory<HttpServletRequest> f) {
@@ -146,10 +150,12 @@ public class GitFilter extends MetaFilter {
        }
 
        /**
+        * Add upload-pack filter
+        *
         * @param filter
         *            filter to apply before any of the UploadPack operations. The
         *            UploadPack instance is available in the request attribute
-        *            {@link ServletUtils#ATTRIBUTE_HANDLER}.
+        *            {@link org.eclipse.jgit.http.server.ServletUtils#ATTRIBUTE_HANDLER}.
         */
        public void addUploadPackFilter(Filter filter) {
                assertNotInitialized();
@@ -157,9 +163,12 @@ public class GitFilter extends MetaFilter {
        }
 
        /**
+        * Set the receive-pack factory
+        *
         * @param f
-        *            the factory to construct and configure a {@link ReceivePack}
-        *            session when a push is requested by a client.
+        *            the factory to construct and configure a
+        *            {@link org.eclipse.jgit.transport.ReceivePack} session when a
+        *            push is requested by a client.
         */
        @SuppressWarnings("unchecked")
        public void setReceivePackFactory(ReceivePackFactory<HttpServletRequest> f) {
@@ -168,10 +177,12 @@ public class GitFilter extends MetaFilter {
        }
 
        /**
+        * Add receive-pack filter
+        *
         * @param filter
         *            filter to apply before any of the ReceivePack operations. The
         *            ReceivePack instance is available in the request attribute
-        *            {@link ServletUtils#ATTRIBUTE_HANDLER}.
+        *            {@link org.eclipse.jgit.http.server.ServletUtils#ATTRIBUTE_HANDLER}.
         */
        public void addReceivePackFilter(Filter filter) {
                assertNotInitialized();
@@ -183,6 +194,7 @@ public class GitFilter extends MetaFilter {
                        throw new IllegalStateException(HttpServerText.get().alreadyInitializedByContainer);
        }
 
+       /** {@inheritDoc} */
        @Override
        public void init(FilterConfig filterConfig) throws ServletException {
                super.init(filterConfig);
@@ -297,6 +309,7 @@ public class GitFilter extends MetaFilter {
                }
        }
 
+       /** {@inheritDoc} */
        @Override
        protected ServletBinder register(ServletBinder binder) {
                if (resolver == null)
index 3a5edeebee811143def5619fee00ef719546644b..ee23677caa8a435d36cc1de549a5fe103eb54c91 100644 (file)
@@ -54,8 +54,6 @@ import javax.servlet.http.HttpServletRequest;
 
 import org.eclipse.jgit.http.server.glue.MetaServlet;
 import org.eclipse.jgit.http.server.resolver.AsIsFileService;
-import org.eclipse.jgit.transport.ReceivePack;
-import org.eclipse.jgit.transport.UploadPack;
 import org.eclipse.jgit.transport.resolver.ReceivePackFactory;
 import org.eclipse.jgit.transport.resolver.RepositoryResolver;
 import org.eclipse.jgit.transport.resolver.UploadPackFactory;
@@ -87,12 +85,12 @@ import org.eclipse.jgit.transport.resolver.UploadPackFactory;
  *
  * <p>
  * Applications may wish to add additional repository action URLs to this
- * servlet by taking advantage of its extension from {@link MetaServlet}.
- * Callers may register their own URL suffix translations through
- * {@link #serve(String)}, or their regex translations through
- * {@link #serveRegex(String)}. Each translation should contain a complete
- * filter pipeline which ends with the HttpServlet that should handle the
- * requested action.
+ * servlet by taking advantage of its extension from
+ * {@link org.eclipse.jgit.http.server.glue.MetaServlet}. Callers may register
+ * their own URL suffix translations through {@link #serve(String)}, or their
+ * regex translations through {@link #serveRegex(String)}. Each translation
+ * should contain a complete filter pipeline which ends with the HttpServlet
+ * that should handle the requested action.
  */
 public class GitServlet extends MetaServlet {
        private static final long serialVersionUID = 1L;
@@ -124,6 +122,8 @@ public class GitServlet extends MetaServlet {
        }
 
        /**
+        * Set AsIsFileService
+        *
         * @param f
         *            the filter to validate direct access to repository files
         *            through a dumb client. If {@code null} then dumb client
@@ -134,43 +134,54 @@ public class GitServlet extends MetaServlet {
        }
 
        /**
+        * Set upload-pack factory
+        *
         * @param f
-        *            the factory to construct and configure an {@link UploadPack}
-        *            session when a fetch or clone is requested by a client.
+        *            the factory to construct and configure an
+        *            {@link org.eclipse.jgit.transport.UploadPack} session when a
+        *            fetch or clone is requested by a client.
         */
        public void setUploadPackFactory(UploadPackFactory<HttpServletRequest> f) {
                gitFilter.setUploadPackFactory(f);
        }
 
        /**
+        * Add upload-pack filter
+        *
         * @param filter
         *            filter to apply before any of the UploadPack operations. The
         *            UploadPack instance is available in the request attribute
-        *            {@link ServletUtils#ATTRIBUTE_HANDLER}.
+        *            {@link org.eclipse.jgit.http.server.ServletUtils#ATTRIBUTE_HANDLER}.
         */
        public void addUploadPackFilter(Filter filter) {
                gitFilter.addUploadPackFilter(filter);
        }
 
        /**
+        * Set receive-pack factory
+        *
         * @param f
-        *            the factory to construct and configure a {@link ReceivePack}
-        *            session when a push is requested by a client.
+        *            the factory to construct and configure a
+        *            {@link org.eclipse.jgit.transport.ReceivePack} session when a
+        *            push is requested by a client.
         */
        public void setReceivePackFactory(ReceivePackFactory<HttpServletRequest> f) {
                gitFilter.setReceivePackFactory(f);
        }
 
        /**
+        * Add receive-pack filter
+        *
         * @param filter
         *            filter to apply before any of the ReceivePack operations. The
         *            ReceivePack instance is available in the request attribute
-        *            {@link ServletUtils#ATTRIBUTE_HANDLER}.
+        *            {@link org.eclipse.jgit.http.server.ServletUtils#ATTRIBUTE_HANDLER}.
         */
        public void addReceivePackFilter(Filter filter) {
                gitFilter.addReceivePackFilter(filter);
        }
 
+       /** {@inheritDoc} */
        @Override
        public void init(final ServletConfig config) throws ServletException {
                gitFilter.init(new FilterConfig() {
index cfe48223da07259668d473fe479187497d19a80b..d6955b4a58b905b52b3bcdb9e69161364ebbd694 100644 (file)
@@ -154,9 +154,9 @@ public class GitSmartHttpTools {
         * an HTTP response code is returned instead.
         * <p>
         * This method may only be called before handing off the request to
-        * {@link UploadPack#upload(java.io.InputStream, OutputStream, OutputStream)}
+        * {@link org.eclipse.jgit.transport.UploadPack#upload(java.io.InputStream, OutputStream, OutputStream)}
         * or
-        * {@link ReceivePack#receive(java.io.InputStream, OutputStream, OutputStream)}.
+        * {@link org.eclipse.jgit.transport.ReceivePack#receive(java.io.InputStream, OutputStream, OutputStream)}.
         *
         * @param req
         *            current request.
index dff90a6c8b2ea1e2ada28eb6cb2f7c33bc0d4038..fbb2061fa33c39726c2a5ce0ddbb824033667b21 100644 (file)
@@ -52,6 +52,8 @@ import org.eclipse.jgit.nls.TranslationBundle;
 public class HttpServerText extends TranslationBundle {
 
        /**
+        * Get an instance of this translation bundle
+        *
         * @return an instance of this translation bundle
         */
        public static HttpServerText get() {
index 91c2f9fd9ec143b0a6fb00de8b3cd2c5782f61bf..830e0611b7a54847f8bd7d7356da29be03081901 100644 (file)
@@ -60,6 +60,7 @@ import org.eclipse.jgit.lib.ObjectDatabase;
 class InfoPacksServlet extends HttpServlet {
        private static final long serialVersionUID = 1L;
 
+       /** {@inheritDoc} */
        @Override
        public void doGet(final HttpServletRequest req,
                        final HttpServletResponse rsp) throws IOException {
index 72c71369dc1d692a2f4aa5d99737a0c52a7ba0cf..ccb76adca0192a7ec29f0a4269dc038569d4e528 100644 (file)
@@ -64,6 +64,7 @@ import org.eclipse.jgit.util.HttpSupport;
 class InfoRefsServlet extends HttpServlet {
        private static final long serialVersionUID = 1L;
 
+       /** {@inheritDoc} */
        @Override
        public void doGet(final HttpServletRequest req,
                        final HttpServletResponse rsp) throws IOException {
index 223813feb3e9ce0454dfd396eb8a8aaec0edf785..b0b831f3d6fd94c3f410714e60863cf10228209e 100644 (file)
@@ -66,16 +66,19 @@ import org.eclipse.jgit.lib.Repository;
  * downstream servlet can directly access its contents on disk.
  */
 class IsLocalFilter implements Filter {
+       /** {@inheritDoc} */
        @Override
        public void init(FilterConfig config) throws ServletException {
                // Do nothing.
        }
 
+       /** {@inheritDoc} */
        @Override
        public void destroy() {
                // Do nothing.
        }
 
+       /** {@inheritDoc} */
        @Override
        public void doFilter(ServletRequest request, ServletResponse response,
                        FilterChain chain) throws IOException, ServletException {
index bdc3420aa9a14a93332c01f3b63976c3eac6a83b..5177858b1f7234e5f2468e7b983dee06f59f2fc4 100644 (file)
@@ -57,18 +57,21 @@ import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletResponse;
 
-/** Adds HTTP response headers to prevent caching by proxies/browsers. */
+/** Add HTTP response headers to prevent caching by proxies/browsers. */
 class NoCacheFilter implements Filter {
+       /** {@inheritDoc} */
        @Override
        public void init(FilterConfig config) throws ServletException {
                // Do nothing.
        }
 
+       /** {@inheritDoc} */
        @Override
        public void destroy() {
                // Do nothing.
        }
 
+       /** {@inheritDoc} */
        @Override
        public void doFilter(ServletRequest request, ServletResponse response,
                        FilterChain chain) throws IOException, ServletException {
index babc036dfc133c1c40d5a1fef0851aca66f307db..50dc68f99fde134542fd76781ff3a80086ff4c10 100644 (file)
@@ -117,12 +117,14 @@ abstract class ObjectFileServlet extends HttpServlet {
 
        abstract String etag(FileSender sender) throws IOException;
 
+       /** {@inheritDoc} */
        @Override
        public void doGet(final HttpServletRequest req,
                        final HttpServletResponse rsp) throws IOException {
                serve(req, rsp, true);
        }
 
+       /** {@inheritDoc} */
        @Override
        protected void doHead(final HttpServletRequest req,
                        final HttpServletResponse rsp) throws ServletException, IOException {
index 9d24bf7d075d4a4c986ebe773f6be09a26ed9a36..a46652ee42e9006401f0190045e4277a39ef7841 100644 (file)
@@ -165,6 +165,7 @@ class ReceivePackServlet extends HttpServlet {
                }
        }
 
+       /** {@inheritDoc} */
        @Override
        public void doPost(final HttpServletRequest req,
                        final HttpServletResponse rsp) throws IOException {
index de09c545e5a5eb59e09454f6ce9ceb5ae73e9a21..c89a5d762c99f9cb5171c3a5385e393a2b29692e 100644 (file)
@@ -71,16 +71,19 @@ import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException;
 import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
 
 /**
- * Opens a repository named by the path info through {@link RepositoryResolver}.
+ * Open a repository named by the path info through
+ * {@link org.eclipse.jgit.transport.resolver.RepositoryResolver}.
  * <p>
- * This filter assumes it is invoked by {@link GitServlet} and is likely to not
- * work as expected if called from any other class. This filter assumes the path
- * info of the current request is a repository name which can be used by the
- * configured {@link RepositoryResolver} to open a {@link Repository} and attach
- * it to the current request.
+ * This filter assumes it is invoked by
+ * {@link org.eclipse.jgit.http.server.GitServlet} and is likely to not work as
+ * expected if called from any other class. This filter assumes the path info of
+ * the current request is a repository name which can be used by the configured
+ * {@link org.eclipse.jgit.transport.resolver.RepositoryResolver} to open a
+ * {@link org.eclipse.jgit.lib.Repository} and attach it to the current request.
  * <p>
- * This filter sets request attribute {@link ServletUtils#ATTRIBUTE_REPOSITORY}
- * when it discovers the repository, and automatically closes and removes the
+ * This filter sets request attribute
+ * {@link org.eclipse.jgit.http.server.ServletUtils#ATTRIBUTE_REPOSITORY} when
+ * it discovers the repository, and automatically closes and removes the
  * attribute when the request is complete.
  */
 public class RepositoryFilter implements Filter {
@@ -93,23 +96,27 @@ public class RepositoryFilter implements Filter {
         *
         * @param resolver
         *            the resolver which will be used to translate the URL name
-        *            component to the actual {@link Repository} instance for the
+        *            component to the actual
+        *            {@link org.eclipse.jgit.lib.Repository} instance for the
         *            current web request.
         */
        public RepositoryFilter(final RepositoryResolver<HttpServletRequest> resolver) {
                this.resolver = resolver;
        }
 
+       /** {@inheritDoc} */
        @Override
        public void init(final FilterConfig config) throws ServletException {
                context = config.getServletContext();
        }
 
+       /** {@inheritDoc} */
        @Override
        public void destroy() {
                context = null;
        }
 
+       /** {@inheritDoc} */
        @Override
        public void doFilter(final ServletRequest request,
                        final ServletResponse response, final FilterChain chain)
index c7fbaf60a7fd2eefc9470582fc5cdbdce4832458..f1ff547ea742305e98af0eb1e13e43a9e190709f 100644 (file)
@@ -68,7 +68,9 @@ import org.eclipse.jgit.lib.Constants;
 import org.eclipse.jgit.lib.ObjectId;
 import org.eclipse.jgit.lib.Repository;
 
-/** Common utility functions for servlets. */
+/**
+ * Common utility functions for servlets.
+ */
 public final class ServletUtils {
        /** Request attribute which stores the {@link Repository} instance. */
        public static final String ATTRIBUTE_REPOSITORY = "org.eclipse.jgit.Repository";
index 08a5eba15f4b36de77e3b983e880853889a8cf04..4eb94a3a22bdde9310f176c6d22c3da2906b751d 100644 (file)
@@ -83,6 +83,7 @@ class SmartOutputStream extends TemporaryBuffer {
                this.compressStream = compressStream;
        }
 
+       /** {@inheritDoc} */
        @Override
        protected OutputStream overflow() throws IOException {
                startedOutput = true;
@@ -95,6 +96,7 @@ class SmartOutputStream extends TemporaryBuffer {
                return out;
        }
 
+       /** {@inheritDoc} */
        @Override
        public void close() throws IOException {
                super.close();
index fe34f6691fd8dca27294e08c83f61cb6bfecb6f9..6417877e1bc52d95437766b844e58a60c431c3c5 100644 (file)
@@ -80,16 +80,19 @@ abstract class SmartServiceInfoRefs implements Filter {
                this.filters = filters.toArray(new Filter[filters.size()]);
        }
 
+       /** {@inheritDoc} */
        @Override
        public void init(FilterConfig config) throws ServletException {
                // Do nothing.
        }
 
+       /** {@inheritDoc} */
        @Override
        public void destroy() {
                // Do nothing.
        }
 
+       /** {@inheritDoc} */
        @Override
        public void doFilter(ServletRequest request, ServletResponse response,
                        FilterChain chain) throws IOException, ServletException {
@@ -146,10 +149,31 @@ abstract class SmartServiceInfoRefs implements Filter {
                }
        }
 
+       /**
+        * Begin service.
+        *
+        * @param req
+        *            request
+        * @param db
+        *            repository
+        * @throws IOException
+        * @throws ServiceNotEnabledException
+        * @throws ServiceNotAuthorizedException
+        */
        protected abstract void begin(HttpServletRequest req, Repository db)
                        throws IOException, ServiceNotEnabledException,
                        ServiceNotAuthorizedException;
 
+       /**
+        * Advertise.
+        *
+        * @param req
+        *            request
+        * @param pck
+        * @throws IOException
+        * @throws ServiceNotEnabledException
+        * @throws ServiceNotAuthorizedException
+        */
        protected abstract void advertise(HttpServletRequest req,
                        PacketLineOutRefAdvertiser pck) throws IOException,
                        ServiceNotEnabledException, ServiceNotAuthorizedException;
index 28ee17dcd1100dd1e208195606f887fea02e0e8d..00851cfbe4738cd7c172f5092d9228be644c21a5 100644 (file)
@@ -68,6 +68,7 @@ class TextFileServlet extends HttpServlet {
                this.fileName = name;
        }
 
+       /** {@inheritDoc} */
        @Override
        public void doGet(final HttpServletRequest req,
                        final HttpServletResponse rsp) throws IOException {
index 97d00c10a192eba1b5958f8cc7fe48b18fce6483..3e9c1fefac5cd81c4dbf19f11b12d3ab59bf1c97 100644 (file)
@@ -164,6 +164,7 @@ class UploadPackServlet extends HttpServlet {
                }
        }
 
+       /** {@inheritDoc} */
        @Override
        public void doPost(final HttpServletRequest req,
                        final HttpServletResponse rsp) throws IOException {
index c0a9e0e6084e8554e1677fd0809c021c7bb602ba..57fdddaf39428ec91e3355e58fbf12f23be335a2 100644 (file)
@@ -50,7 +50,9 @@ import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-/** Sends a fixed status code to the client. */
+/**
+ * Send a fixed status code to the client.
+ */
 public class ErrorServlet extends HttpServlet {
        private static final long serialVersionUID = 1L;
 
@@ -66,6 +68,7 @@ public class ErrorServlet extends HttpServlet {
                this.status = status;
        }
 
+       /** {@inheritDoc} */
        @Override
        protected void doGet(HttpServletRequest req, HttpServletResponse rsp)
                        throws ServletException, IOException {
index adb6c425df479ec5233e402a7c71fb1bd10c9870..43e22b3b30fc3c43c1d9716767fe6ff8e9479916 100644 (file)
@@ -87,7 +87,9 @@ public class MetaFilter implements Filter {
 
        private volatile UrlPipeline[] pipelines;
 
-       /** Empty filter with no bindings. */
+       /**
+        * Empty filter with no bindings.
+        */
        public MetaFilter() {
                this.bindings = new ArrayList<>();
        }
@@ -128,11 +130,13 @@ public class MetaFilter implements Filter {
                return register(new RegexPipeline.Binder(pattern));
        }
 
+       /** {@inheritDoc} */
        @Override
        public void init(FilterConfig filterConfig) throws ServletException {
                servletContext = filterConfig.getServletContext();
        }
 
+       /** {@inheritDoc} */
        @Override
        public void destroy() {
                if (pipelines != null) {
@@ -168,6 +172,7 @@ public class MetaFilter implements Filter {
                };
        }
 
+       /** {@inheritDoc} */
        @Override
        public void doFilter(ServletRequest request, ServletResponse response,
                        FilterChain chain) throws IOException, ServletException {
index 71365c8f44a72952d06b700a3d9074edf740f586..d8fa712ebfd5028209cbf9dbd873b54501d3cf86 100644 (file)
@@ -74,7 +74,9 @@ public class MetaServlet extends HttpServlet {
 
        private final MetaFilter filter;
 
-       /** Empty servlet with no bindings. */
+       /**
+        * Empty servlet with no bindings.
+        */
        public MetaServlet() {
                this(new MetaFilter());
        }
@@ -89,7 +91,11 @@ public class MetaServlet extends HttpServlet {
                filter = delegateFilter;
        }
 
-       /** @return filter this servlet delegates all routing logic to. */
+       /**
+        * Get delegate filter
+        *
+        * @return filter this servlet delegates all routing logic to.
+        */
        protected MetaFilter getDelegateFilter() {
                return filter;
        }
@@ -116,6 +122,7 @@ public class MetaServlet extends HttpServlet {
                return filter.serveRegex(expression);
        }
 
+       /** {@inheritDoc} */
        @Override
        public void init(ServletConfig config) throws ServletException {
                String name = filter.getClass().getName();
@@ -123,11 +130,13 @@ public class MetaServlet extends HttpServlet {
                filter.init(new NoParameterFilterConfig(name, ctx));
        }
 
+       /** {@inheritDoc} */
        @Override
        public void destroy() {
                filter.destroy();
        }
 
+       /** {@inheritDoc} */
        @Override
        protected void service(HttpServletRequest req, HttpServletResponse res)
                        throws ServletException, IOException {
index 961f88e4f86f142934f3f998211a82fe7eaf554b..b4b7455dbfd791d73a8174438886a5d71550a009 100644 (file)
@@ -59,11 +59,13 @@ final class NoParameterFilterConfig implements FilterConfig {
                this.context = context;
        }
 
+       /** {@inheritDoc} */
        @Override
        public String getInitParameter(String name) {
                return null;
        }
 
+       /** {@inheritDoc} */
        @Override
        public Enumeration<String> getInitParameterNames() {
                return new Enumeration<String>() {
@@ -79,11 +81,13 @@ final class NoParameterFilterConfig implements FilterConfig {
                };
        }
 
+       /** {@inheritDoc} */
        @Override
        public ServletContext getServletContext() {
                return context;
        }
 
+       /** {@inheritDoc} */
        @Override
        public String getFilterName() {
                return filterName;
index a402977ad1f3a3ba265f42f4f871ad50c34ff8ab..a3dc6c3702757952373a158f257bc9d5140df464 100644 (file)
@@ -61,14 +61,17 @@ import org.eclipse.jgit.http.server.HttpServerText;
  * Switch servlet path and path info to use another regex match group.
  * <p>
  * This filter is meant to be installed in the middle of a pipeline created by
- * {@link MetaServlet#serveRegex(String)}. The passed request's servlet path is
- * updated to be all text up to the start of the designated capture group, and
- * the path info is changed to the contents of the capture group.
- **/
+ * {@link org.eclipse.jgit.http.server.glue.MetaServlet#serveRegex(String)}. The
+ * passed request's servlet path is updated to be all text up to the start of
+ * the designated capture group, and the path info is changed to the contents of
+ * the capture group.
+ */
 public class RegexGroupFilter implements Filter {
        private final int groupIdx;
 
        /**
+        * Constructor for RegexGroupFilter
+        *
         * @param groupIdx
         *            capture group number, 1 through the number of groups.
         */
@@ -79,16 +82,19 @@ public class RegexGroupFilter implements Filter {
                this.groupIdx = groupIdx - 1;
        }
 
+       /** {@inheritDoc} */
        @Override
        public void init(FilterConfig config) throws ServletException {
                // Do nothing.
        }
 
+       /** {@inheritDoc} */
        @Override
        public void destroy() {
                // Do nothing.
        }
 
+       /** {@inheritDoc} */
        @Override
        public void doFilter(final ServletRequest request,
                        final ServletResponse rsp, final FilterChain chain)
index f33243b3b5d7e36203c30cfc8d26d72c1a29c136..bf2d6dbb4df123c9b9b02e97212e55114e55c2bd 100644 (file)
@@ -164,6 +164,7 @@ class RegexPipeline extends UrlPipeline {
                }
        }
 
+       /** {@inheritDoc} */
        @Override
        public String toString() {
                return "Pipeline[regex: " + pattern + " ]";
index 47443f58861a7d674c620d5b520da9cca79facf9..b2b474898936415aa09e3b37544dbb8be9921e23 100644 (file)
@@ -46,9 +46,13 @@ package org.eclipse.jgit.http.server.glue;
 import javax.servlet.Filter;
 import javax.servlet.http.HttpServlet;
 
-/** Binds a servlet to a URL. */
+/**
+ * Binds a servlet to a URL.
+ */
 public interface ServletBinder {
        /**
+        * Set the filter to trigger while processing the path.
+        *
         * @param filter
         *            the filter to trigger while processing the path.
         * @return {@code this}.
@@ -56,6 +60,8 @@ public interface ServletBinder {
        public ServletBinder through(Filter filter);
 
        /**
+        * Set the servlet to execute on this path
+        *
         * @param servlet
         *            the servlet to execute on this path.
         */
index 4e879a97609418b7eca46a6a28be8ec1a5c0458e..18650eb95bbecf6a33ce5ea714ec941300857fde 100644 (file)
@@ -61,6 +61,7 @@ abstract class ServletBinderImpl implements ServletBinder {
                this.filters = new ArrayList<>();
        }
 
+       /** {@inheritDoc} */
        @Override
        public ServletBinder through(Filter filter) {
                if (filter == null)
@@ -69,6 +70,7 @@ abstract class ServletBinderImpl implements ServletBinder {
                return this;
        }
 
+       /** {@inheritDoc} */
        @Override
        public void with(HttpServlet servlet) {
                if (servlet == null)
@@ -78,7 +80,11 @@ abstract class ServletBinderImpl implements ServletBinder {
                httpServlet = servlet;
        }
 
-       /** @return the configured servlet, or singleton returning 404 if none. */
+       /**
+        * Get the servlet
+        *
+        * @return the configured servlet, or singleton returning 404 if none.
+        */
        protected HttpServlet getServlet() {
                if (httpServlet != null)
                        return httpServlet;
@@ -86,7 +92,11 @@ abstract class ServletBinderImpl implements ServletBinder {
                        return new ErrorServlet(HttpServletResponse.SC_NOT_FOUND);
        }
 
-       /** @return the configured filters; zero-length array if none. */
+       /**
+        * Get filters
+        *
+        * @return the configured filters; zero-length array if none.
+        */
        protected Filter[] getFilters() {
                return filters.toArray(new Filter[filters.size()]);
        }
index 903de63b8e6291bf317d32d4cda9d2cab438cc7a..6742c9f7217bbeef82b06e2ce4b81d5e6ea7023e 100644 (file)
@@ -103,6 +103,7 @@ class SuffixPipeline extends UrlPipeline {
                super.service(new WrappedRequest(req, newPath, newInfo), rsp);
        }
 
+       /** {@inheritDoc} */
        @Override
        public String toString() {
                return "Pipeline[ *" + suffix + " ]";
index b702c074864e5d8c8ba7c59808a7fe663db3f1bb..096456866c28e4e63ff99169bde645e44d575e82 100644 (file)
@@ -46,7 +46,9 @@ package org.eclipse.jgit.http.server.glue;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequestWrapper;
 
-/** Overrides the path and path info. */
+/**
+ * Overrides the path and path info.
+ */
 public class WrappedRequest extends HttpServletRequestWrapper {
        private final String path;
 
@@ -69,17 +71,20 @@ public class WrappedRequest extends HttpServletRequestWrapper {
                this.pathInfo = pathInfo;
        }
 
+       /** {@inheritDoc} */
        @Override
        public String getPathTranslated() {
                final String p = getPathInfo();
                return p != null ? getSession().getServletContext().getRealPath(p) : null;
        }
 
+       /** {@inheritDoc} */
        @Override
        public String getPathInfo() {
                return pathInfo;
        }
 
+       /** {@inheritDoc} */
        @Override
        public String getServletPath() {
                return path;
index d20fe9f27a7cdbfcaf11046257bbedb49e82f3bf..11ad5e0e1a5cde93c0e7feea1737d907cab6f7b1 100644 (file)
@@ -45,7 +45,6 @@ package org.eclipse.jgit.http.server.resolver;
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.eclipse.jgit.http.server.GitServlet;
 import org.eclipse.jgit.lib.Config;
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException;
@@ -57,8 +56,9 @@ import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
  * Older HTTP clients which do not speak the smart HTTP variant of the Git
  * protocol fetch from a repository by directly getting its objects and pack
  * files. This class, along with the {@code http.getanyfile} per-repository
- * configuration setting, can be used by {@link GitServlet} to control whether
- * or not these older clients are permitted to read these direct files.
+ * configuration setting, can be used by
+ * {@link org.eclipse.jgit.http.server.GitServlet} to control whether or not
+ * these older clients are permitted to read these direct files.
  */
 public class AsIsFileService {
        /** Always throws {@link ServiceNotEnabledException}. */
@@ -98,8 +98,10 @@ public class AsIsFileService {
         * throwing a checked exception if access should be denied.
         * <p>
         * The default implementation of this method checks {@code http.getanyfile},
-        * throwing {@link ServiceNotEnabledException} if it was explicitly set to
-        * {@code false}, and otherwise succeeding silently.
+        * throwing
+        * {@link org.eclipse.jgit.transport.resolver.ServiceNotEnabledException} if
+        * it was explicitly set to {@code false}, and otherwise succeeding
+        * silently.
         *
         * @param req
         *            current HTTP request, in case information from the request may
index c0ffbb64d79f9f984e1a1e834b87d349849d7194..95eb8d52d798f8084849c68da681010a137edc76 100644 (file)
@@ -54,12 +54,14 @@ import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException;
 import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
 
 /**
- * Create and configure {@link ReceivePack} service instance.
+ * Create and configure {@link org.eclipse.jgit.transport.ReceivePack} service
+ * instance.
  * <p>
  * Writing by receive-pack is permitted if any of the following is true:
  * <ul>
  * <li>The container has authenticated the user and set
- * {@link HttpServletRequest#getRemoteUser()} to the authenticated name.
+ * {@link javax.servlet.http.HttpServletRequest#getRemoteUser()} to the
+ * authenticated name.
  * <li>The repository configuration file has {@code http.receivepack} explicitly
  * set to true.
  * </ul>
@@ -78,6 +80,7 @@ public class DefaultReceivePackFactory implements
                }
        }
 
+       /** {@inheritDoc} */
        @Override
        public ReceivePack create(final HttpServletRequest req, final Repository db)
                        throws ServiceNotEnabledException, ServiceNotAuthorizedException {
index 642623bdd98c84feae2e46176834c302f2331dd4..f5afa1ecd006d36c1615e0dad1531809f42f6686 100644 (file)
@@ -53,7 +53,8 @@ import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
 import org.eclipse.jgit.transport.resolver.UploadPackFactory;
 
 /**
- * Create and configure {@link UploadPack} service instance.
+ * Create and configure {@link org.eclipse.jgit.transport.UploadPack} service
+ * instance.
  * <p>
  * Reading by upload-pack is permitted unless {@code http.uploadpack} is
  * explicitly set to false.
@@ -68,6 +69,7 @@ public class DefaultUploadPackFactory implements
                }
        }
 
+       /** {@inheritDoc} */
        @Override
        public UploadPack create(final HttpServletRequest req, final Repository db)
                        throws ServiceNotEnabledException, ServiceNotAuthorizedException {