Document and validate web-api constructs
[aaa.git] / web / api / src / main / java / org / opendaylight / aaa / web / WebContextSecurer.java
index 2b7f6e7e708291b80bc7795cf96e3dc5f5609ff8..fac18b871318f7ea99a98810198b0c40c3005e34 100644 (file)
@@ -8,13 +8,16 @@
 package org.opendaylight.aaa.web;
 
 /**
- * Secures a {@link WebContextBuilder}.
+ * Secures a {@link WebContext.Builder}.
  *
  * @author Michael Vorburger.ch
  */
 public interface WebContextSecurer {
     /**
-     * Configures the WebContext in an implementation specific manner so that it requires authentication to access the
+     * Configure the WebContext to require auth for specified URLs.
+     *
+     * <p>
+     * Configure the WebContext so that it requires authentication to access the
      * given URL Patterns. Typically, this will be done by adding a {@code javax.servlet.Filter} (or several, and
      * whatever else they need).
      *
@@ -22,25 +25,36 @@ public interface WebContextSecurer {
      * @param asyncSupported true if asynchronous communication should also be supported
      * @param urlPatterns URL patterns that require authentication
      */
-    void requireAuthentication(WebContextBuilder webContextBuilder, boolean asyncSupported, String... urlPatterns);
+    void requireAuthentication(WebContext.Builder webContextBuilder, boolean asyncSupported, String... urlPatterns);
 
     /**
-     * Configures the WebContext in an implementation specific manner so that it requires authentication to access the
+     * Configure the WebContext to require auth for specified URLs.
+     *
+     * <p>
+     * Configures the WebContext so that it requires authentication to access the
      * given URL Patterns. Typically, this will be done by adding a {@code javax.servlet.Filter} (or several, and
      * whatever else they need).
      *
      * <p>
      * This method is equivalent to {@code requireAuthentication(webContextBuilder, false, urlPatterns}.
+     *
+     * @param webContextBuilder builder to secure
+     * @param urlPatterns URL patterns that require authentication
      */
-    default void requireAuthentication(final WebContextBuilder webContextBuilder, final String... urlPatterns) {
+    default void requireAuthentication(final WebContext.Builder webContextBuilder, final String... urlPatterns) {
         requireAuthentication(webContextBuilder, false, urlPatterns);
     }
 
     /**
+     * Configure the WebContext to require auth all URLs.
+     *
+     * <p>
      * Configures the WebContext so that all its URL patterns ({@code/**}) require authentication.
-     * @see #requireAuthentication(WebContextBuilder, String...)
+     *
+     * @param webContextBuilder builder to secure
+     * @see #requireAuthentication(WebContext.Builder, String...)
      */
-    default void requireAuthentication(final WebContextBuilder webContextBuilder) {
+    default void requireAuthentication(final WebContext.Builder webContextBuilder) {
         requireAuthentication(webContextBuilder, "/*");
     }
 }