Repository: incubator-juneau
Updated Branches:
  refs/heads/master 9f059be90 -> fbdb85eb9


Add @RestResource.contextPath() annotation.

Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-juneau/commit/fbdb85eb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau/tree/fbdb85eb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau/diff/fbdb85eb

Branch: refs/heads/master
Commit: fbdb85eb9d569097553cd2c64e8f714721d02c8c
Parents: 9f059be
Author: JamesBognar <[email protected]>
Authored: Mon Aug 14 17:56:58 2017 -0400
Committer: JamesBognar <[email protected]>
Committed: Mon Aug 14 17:56:58 2017 -0400

----------------------------------------------------------------------
 juneau-core/src/main/javadoc/overview.html      |   5 +
 .../java/org/apache/juneau/rest/RestConfig.java |  18 ++
 .../org/apache/juneau/rest/RestContext.java     |  17 ++
 .../org/apache/juneau/rest/RestRequest.java     |  15 +-
 .../juneau/rest/annotation/RestResource.java    |  13 +-
 .../java/org/apache/juneau/rest/package.html    | 180 +++++++++++++------
 .../org/apache/juneau/rest/styles/dark.css      |   1 -
 7 files changed, 190 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/fbdb85eb/juneau-core/src/main/javadoc/overview.html
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/javadoc/overview.html 
b/juneau-core/src/main/javadoc/overview.html
index fa5ae9a..904bea8 100644
--- a/juneau-core/src/main/javadoc/overview.html
+++ b/juneau-core/src/main/javadoc/overview.html
@@ -6957,6 +6957,9 @@
                                <br>Allows you to specify a resource resolver 
on the servlet context to make it easier to work with
                                dependency injection frameworks.
                        <li>
+                               New annotation: {@link 
org.apache.juneau.rest.annotation.RestResource#contextPath()}.
+                               <br>Allows you to override the context path 
value inherited from the servlet container.
+                       <li>
                                The following implementation classes can now be 
defined as non-static inner classes of servlets/resources:
                                <ul>
                                        <li>{@link 
org.apache.juneau.rest.widget.Widget}
@@ -6976,6 +6979,8 @@
                                <br><img 
src='doc-files/ReleaseNotes_632_DarkStyle.png'>
                        <li>
                                Stylesheet selection now stored in HTTP session 
when passed in via <code>?stylesheet</code> query parameter.
+                       <li>
+                               New doc: <a class='doclink' 
href='/org/apache/juneau/rest/package-summary.html#RestResources.RestHooks'>Lifecycle
 Hooks</a>
                </ul>
 
                <h6 class='topic'>org.apache.juneau.rest.microservice</h6>

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/fbdb85eb/juneau-rest/src/main/java/org/apache/juneau/rest/RestConfig.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestConfig.java 
b/juneau-rest/src/main/java/org/apache/juneau/rest/RestConfig.java
index b452a53..ee94c6f 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestConfig.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestConfig.java
@@ -118,6 +118,7 @@ public class RestConfig implements ServletConfig {
        String path, htmlHeader, htmlNav, htmlAside, htmlFooter, htmlStyle, 
htmlStylesheet, htmlScript, htmlNoResultsMessage;
        String[] htmlLinks;
        String clientVersionHeader = "X-Client-Version";
+       String contextPath;
 
        Object resourceResolver = RestResourceResolverSimple.class;
        Object logger = RestLogger.Normal.class;
@@ -221,6 +222,7 @@ public class RestConfig implements ServletConfig {
                                addParamResolvers(r.paramResolvers());
                                serializerListener(r.serializerListener());
                                parserListener(r.parserListener());
+                               contextPath(r.contextPath());
                                if (! r.favicon().isEmpty())
                                        setFavIcon(c, r.favicon());
                                if (! r.staticFiles().isEmpty())
@@ -485,6 +487,22 @@ public class RestConfig implements ServletConfig {
        }
 
        /**
+        * Specifies the override context path for this resource.
+        *
+        * <p>
+        * This is the programmatic equivalent to the
+        * {@link RestResource#contextPath() @RestResource.contextPath()} 
annotation.
+        *
+        * @param contextPath The context path for this resource and any child 
resources.
+        * @return This object (for method chaining).
+        */
+       public RestConfig contextPath(String contextPath) {
+               if (! contextPath.isEmpty())
+                       this.contextPath = contextPath;
+               return this;
+       }
+
+       /**
         * Adds class-level parameter resolvers to this resource.
         *
         * <p>

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/fbdb85eb/juneau-rest/src/main/java/org/apache/juneau/rest/RestContext.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestContext.java 
b/juneau-rest/src/main/java/org/apache/juneau/rest/RestContext.java
index b0b950e..0d4e877 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestContext.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestContext.java
@@ -261,6 +261,7 @@ public final class RestContext extends Context {
                paramFormat,
                clientVersionHeader,
                fullPath,
+               contextPath,
                htmlHeader,
                htmlNav,
                htmlAside,
@@ -395,6 +396,7 @@ public final class RestContext extends Context {
                        this.childResources = Collections.synchronizedMap(new 
LinkedHashMap<String,RestContext>());  // Not unmodifiable on purpose so that 
children can be replaced.
                        this.logger = b.logger;
                        this.fullPath = b.fullPath;
+                       this.contextPath = nullIfEmpty(b.contextPath);
 
                        this.htmlWidgets = 
Collections.unmodifiableMap(b.htmlWidgets);
                        this.htmlHeader = b.htmlHeader;
@@ -695,6 +697,7 @@ public final class RestContext extends Context {
                String fullPath;
                Map<String,Widget> htmlWidgets;
                Object resourceResolver;
+               String contextPath;
 
                @SuppressWarnings("unchecked")
                private Builder(Object resource, ServletContext ctx, RestConfig 
sc) throws Exception {
@@ -764,6 +767,7 @@ public final class RestContext extends Context {
                        defaultRequestHeaders.putAll(sc.defaultRequestHeaders);
                        defaultResponseHeaders = 
Collections.unmodifiableMap(new 
LinkedHashMap<String,Object>(sc.defaultResponseHeaders));
                        beanContext = ps.getBeanContext();
+                       contextPath = sc.contextPath;
 
                        for (Object o : sc.converters)
                                converters.add(resolve(resource, 
RestConverter.class, o));
@@ -2018,6 +2022,19 @@ public final class RestContext extends Context {
                return childResources.get(path);
        }
 
+       /**
+        * Returns the context path of the resource if it's specified via the 
{@link RestResource#contextPath()} setting
+        * on this or a parent resource.
+        *
+        * @return The {@link RestResource#contextPath()} setting value, or 
<jk>null</jk> if it's not specified.
+        */
+       protected String getContextPath() {
+               if (contextPath != null)
+                       return contextPath;
+               if (parentContext != null)
+                       return parentContext.getContextPath();
+               return null;
+       }
 
        
//----------------------------------------------------------------------------------------------------
        // Utility methods

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/fbdb85eb/juneau-rest/src/main/java/org/apache/juneau/rest/RestRequest.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestRequest.java 
b/juneau-rest/src/main/java/org/apache/juneau/rest/RestRequest.java
index 95ab80e..1cca8ea 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestRequest.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestRequest.java
@@ -724,6 +724,19 @@ public final class RestRequest extends 
HttpServletRequestWrapper {
        // URI-related methods
        
//--------------------------------------------------------------------------------
 
+       @Override /* HttpServletRequest */
+       public String getContextPath() {
+               String cp = context.getContextPath();
+               return cp == null ? super.getContextPath() : cp;
+       }
+
+       @Override /* HttpServletRequest */
+       public String getServletPath() {
+               String cp = context.getContextPath();
+               String sp = super.getServletPath();
+               return cp == null || ! sp.startsWith(cp) ? sp : 
sp.substring(cp.length());
+       }
+
        /**
         * Returns the URI context of the request.
         *
@@ -740,7 +753,7 @@ public final class RestRequest extends 
HttpServletRequestWrapper {
                        StringBuilder authority = new 
StringBuilder(getScheme()).append("://").append(getServerName());
                        if (! (port == 80 && "http".equals(scheme) || port == 
443 && "https".equals(scheme)))
                                authority.append(':').append(port);
-                       uriContext = new UriContext(authority.toString(), 
super.getContextPath(), super.getServletPath(), super.getPathInfo());
+                       uriContext = new UriContext(authority.toString(), 
getContextPath(), getServletPath(), super.getPathInfo());
                }
                return uriContext;
        }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/fbdb85eb/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
----------------------------------------------------------------------
diff --git 
a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java 
b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
index 025bb03..3f62078 100644
--- 
a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
+++ 
b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
@@ -632,7 +632,7 @@ public @interface RestResource {
         * <p>
         * The programmatic equivalent to this annotation are the {@link 
RestConfig#setResourceResolver(Class)}/
         * {@link RestConfig#setResourceResolver(RestResourceResolver)} methods.
-        * <br>The value (class or instance) can also be set via the servlet 
context attribute 
+        * <br>The value (class or instance) can also be set via the servlet 
context attribute
         * * {@link RestContext#REST_resourceResolver}.
         */
        Class<? extends RestResourceResolver> resourceResolver() default 
RestResourceResolverSimple.class;
@@ -753,4 +753,15 @@ public @interface RestResource {
         * </p>
         */
        HtmlDoc htmldoc() default @HtmlDoc;
+
+       /**
+        * Overrides the context path value for this resource and any child 
resources.
+        *
+        * <p>
+        * This setting is useful if you want to use 
<js>"context:/child/path"</js> URLs in child resource POJOs but
+        * the context path is not actually specified on the servlet container.
+        * The net effect is that the {@link RestRequest#getContextPath()} and 
{@link RestRequest#getServletPath()} methods
+        * will return this value instead of the actual context path of the web 
app.
+        */
+       String contextPath() default "";
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/fbdb85eb/juneau-rest/src/main/java/org/apache/juneau/rest/package.html
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/package.html 
b/juneau-rest/src/main/java/org/apache/juneau/rest/package.html
index e3f1427..82b694f 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/package.html
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/package.html
@@ -65,43 +65,44 @@
        <li><p><a class='doclink' href='#Intro'>Introduction</a></p>
        <li><p><a class='doclink' href='#HelloWorldResource'>Hello World 
Example</a></p>
        <li><p><a class='doclink' href='#ClassHierarchy'>Class Hierarchy</a></p>
-       <li><p><a class='doclink' href='#RestServlets'>REST Servlets</a></p>
+       <li><p><a class='doclink' href='#RestResources'>REST Servlets</a></p>
        <ol>
-               <li><p><a class='doclink' 
href='#RestServlets.MethodSignature'>REST Java Method Signature</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.MethodSignature'>REST Java Method Signature</a></p>
                <ol>
-                       <li><p><a class='doclink' 
href='#RestServlets.MethodSignature.Path'>Path</a></p>
-                       <li><p><a class='doclink' 
href='#RestServlets.MethodSignature.Matchers'>Matchers</a></p>
+                       <li><p><a class='doclink' 
href='#RestResources.MethodSignature.Path'>Path</a></p>
+                       <li><p><a class='doclink' 
href='#RestResources.MethodSignature.Matchers'>Matchers</a></p>
                </ol>
-               <li><p><a class='doclink' 
href='#RestServlets.RequestContent'>Request Content</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.RequestContent'>Request Content</a></p>
        <ol>
-                       <li><p><a class='doclink' 
href='#RestServlets.RequestContent.FormPosts'>Form Posts</a></p>
-                       <li><p><a class='doclink' 
href='#RestServlets.RequestContent'>Multipart Form Posts</a></p>
+                       <li><p><a class='doclink' 
href='#RestResources.RequestContent.FormPosts'>Form Posts</a></p>
+                       <li><p><a class='doclink' 
href='#RestResources.RequestContent'>Multipart Form Posts</a></p>
                </ol>
-               <li><p><a class='doclink' 
href='#RestServlets.ResponseContent'>Response Content</a></p>
-               <li><p><a class='doclink' 
href='#RestServlets.OptionsPages'>OPTIONS Pages</a></p>
-               <li><p><a class='doclink' 
href='#RestServlets.Serializers'>Serializers</a></p>
-               <li><p><a class='doclink' 
href='#RestServlets.Parsers'>Parsers</a></p>
-               <li><p><a class='doclink' 
href='#RestServlets.Properties'>Properties</a></p>
-               <li><p><a class='doclink' 
href='#RestServlets.Transforms'>Transforms</a></p>
-               <li><p><a class='doclink' 
href='#RestServlets.Guards'>Guards</a></p>
-               <li><p><a class='doclink' 
href='#RestServlets.Converters'>Converters</a></p>
-               <li><p><a class='doclink' href='#RestServlets.Children'>Child 
Resources</a></p>
-               <li><p><a class='doclink' href='#RestServlets.Labels'>Localized 
Messages</a></p>
-               <li><p><a class='doclink' 
href='#RestServlets.Encoders'>Encoders</a></p>
-               <li><p><a class='doclink' href='#RestServlets.SvlVars'>SVL 
Vars</a></p>
-               <li><p><a class='doclink' 
href='#RestServlets.StaticFiles'>Static Files</a></p>
-               <li><p><a class='doclink' 
href='#RestServlets.Listeners'>Listener Methods</a></p>       
-               <li><p><a class='doclink' 
href='#RestServlets.Stylesheet'>Stylesheet</a></p>    
-               <li><p><a class='doclink' href='#RestServlets.Headers'>Default 
Headers</a></p>
-               <li><p><a class='doclink' href='#RestServlets.Errors'>Handling 
Errors / Logging</a></p>
-               <li><p><a class='doclink' 
href='#RestServlets.ConfigFile'>Configuration Files</a></p>
-               <li><p><a class='doclink' 
href='#RestServlets.Inheritence'>Annotation Inheritance</a></p>
-               <li><p><a class='doclink' 
href='#RestServlets.HttpStatusCodes'>HTTP Status Codes</a></p>
-               <li><p><a class='doclink' 
href='#RestServlets.OverloadedHttpMethods'>Overloaded HTTP Methods</a></p>
-               <li><p><a class='doclink' 
href='#RestServlets.BuildInParams'>Built-In Parameters</a></p>
-               <li><p><a class='doclink' 
href='#RestServlets.CustomSerializersParsers'>Defining your own 
serializers/parsers</a></p>
-               <li><p><a class='doclink' 
href='#RestServlets.ResponseHandlers'>Response Handlers</a></p>
-               <li><p><a class='doclink' href='#RestServlets.OtherNotes'>Other 
Notes</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.ResponseContent'>Response Content</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.RestHooks'>Lifecycle Hooks</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.OptionsPages'>OPTIONS Pages</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.Serializers'>Serializers</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.Parsers'>Parsers</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.Properties'>Properties</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.Transforms'>Transforms</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.Guards'>Guards</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.Converters'>Converters</a></p>
+               <li><p><a class='doclink' href='#RestResources.Children'>Child 
Resources</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.Labels'>Localized Messages</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.Encoders'>Encoders</a></p>
+               <li><p><a class='doclink' href='#RestResources.SvlVars'>SVL 
Vars</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.StaticFiles'>Static Files</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.Listeners'>Listener Methods</a></p>      
+               <li><p><a class='doclink' 
href='#RestResources.Stylesheet'>Stylesheet</a></p>   
+               <li><p><a class='doclink' href='#RestResources.Headers'>Default 
Headers</a></p>
+               <li><p><a class='doclink' href='#RestResources.Errors'>Handling 
Errors / Logging</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.ConfigFile'>Configuration Files</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.Inheritence'>Annotation Inheritance</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.HttpStatusCodes'>HTTP Status Codes</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.OverloadedHttpMethods'>Overloaded HTTP Methods</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.BuildInParams'>Built-In Parameters</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.CustomSerializersParsers'>Defining your own 
serializers/parsers</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.ResponseHandlers'>Response Handlers</a></p>
+               <li><p><a class='doclink' 
href='#RestResources.OtherNotes'>Other Notes</a></p>
        </ol>
        <li><p><a class='doclink' href='#Osgi'>Using with OSGi</a></p>
        <li><p><a class='doclink' href='#PojosConvertableFromString'>POJOs 
Convertible From Strings</a></p>
@@ -1140,8 +1141,75 @@
        </div>
 
        <!-- 
========================================================================================================
 -->
+       <a id="RestResources.RestHooks"></a>
+       <h3 class='topic' onclick='toggle(this)'>4.4 - Lifecycle Hooks</h3>
+       <div class='topic'>
+               <p>
+                       Lifecycle hooks allow you to hook into lifecycle events 
of the servlet or REST call.
+                       Like <ja>@RestMethod</ja> methods, the list of 
parameters are specified by the developer.
+               </p>
+               <p>
+                       For example, if you want to add an initialization 
method to your resource:
+               </p>
+               <p class='bcode'>
+       <ja>@RestResource</ja>(...)
+       <jk>public class</jk> MyResource  {
+
+               <jc>// Our database.</jc>
+               <jk>private</jk> Map&lt;Integer,Object&gt; <jf>myDatabase</jf>;
+
+               <ja>@RestHook</ja>(<jsf>INIT</jsf>)
+               <jk>public void</jk> initMyDatabase(RestConfig config) 
<jk>throws</jk> Exception {
+                       <jf>myDatabase</jf> = <jk>new</jk> 
LinkedHashMap&lt;&gt;();
+               }
+       }
+               </p>
+               <p>
+                       Or if you want to intercept REST calls:
+               </p>
+               <p class='bcode'>
+       <ja>@RestResource</ja>(...)
+       <jk>public class</jk> MyResource {
+
+               <jc>// Add a request attribute to all incoming requests.</jc>
+               <ja>@RestHook</ja>(<jsf>PRE_CALL</jsf>)
+               <jk>public void</jk> onPreCall(RestRequest req) {
+                       req.setAttribute(<js>"foo"</js>, <js>"bar"</js>);
+               }
+       }
+               </p>
+               <p>
+                       The hook events can be broken down into two categories:
+               </p>
+               <ul class='spaced-list'>
+                       <li>Resource lifecycle events:
+                               <ul>
+                                       <li>{@link 
org.apache.juneau.rest.annotation.HookEvent#INIT INIT} - Right before 
initialization.
+                                       <li>{@link 
org.apache.juneau.rest.annotation.HookEvent#POST_INIT POST_INIT} - Right after 
initialization.
+                                       <li>{@link 
org.apache.juneau.rest.annotation.HookEvent#POST_INIT_CHILD_FIRST 
POST_INIT_CHILD_FIRST} - Right after initialization, but run child methods 
first.
+                                       <li>{@link 
org.apache.juneau.rest.annotation.HookEvent#DESTROY DESTROY} - Right before 
servlet destroy.
+                               </ul>
+                       <li>REST call lifecycle events:
+                               <ul>
+                                       <li>{@link 
org.apache.juneau.rest.annotation.HookEvent#START_CALL START_CALL} - At the 
beginning of a REST call.
+                                       <li>{@link 
org.apache.juneau.rest.annotation.HookEvent#PRE_CALL PRE_CALL} - Right before 
the <ja>@RestMethod</ja> method is invoked.
+                                       <li>{@link 
org.apache.juneau.rest.annotation.HookEvent#POST_CALL POST_CALL} - Right after 
the <ja>@RestMethod</ja> method is invoked.
+                                       <li>{@link 
org.apache.juneau.rest.annotation.HookEvent#END_CALL END_CALL} - At the end of 
the REST call after the response has been flushed.
+                               </ul>
+               </ul>
+       
+       
+               <h6 class='topic'>Additional Information</h6>
+               <ul class='doctree'>
+                       <li class='jp'>
+                               {@link 
org.apache.juneau.rest.annotation.RestHook @RestHook}
+               </ul>
+       </div>  
+       
+
+       <!-- 
========================================================================================================
 -->
        <a id="RestResources.OptionsPages"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.4 - OPTIONS Pages</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.5 - OPTIONS Pages</h3>
        <div class='topic'>
                <p>
                        One of the most useful features of Juneau is that it 
can produce OPTIONS pages for self-documenting designs 
@@ -1441,7 +1509,7 @@
 
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.Serializers"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.5 - Serializers</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.6 - Serializers</h3>
        <div class='topic'>
                <p>
                        REST servlets use the {@link 
org.apache.juneau.serializer.Serializer} API for defining serializers for 
@@ -1511,7 +1579,7 @@
        
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.Parsers"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.6 - Parsers</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.7 - Parsers</h3>
        <div class='topic'>
                <p>
                        REST servlets use the {@link 
org.apache.juneau.parser.Parser} API for defining parsers for parsing request
@@ -1575,7 +1643,7 @@
 
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.Properties"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.7 - Properties</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.8 - Properties</h3>
        <div class='topic'>
                <p>
                        The Juneau serializers and parsers are 
highly-configurable through properties.
@@ -1680,7 +1748,7 @@
        
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.Transforms"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.8 - Transforms</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.9 - Transforms</h3>
        <div class='topic'>
                <p>
                        The Juneau serializers and parsers can be configured on 
how to handle POJOs through the use of Transforms.
@@ -1744,7 +1812,7 @@
        
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.Guards"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.9 - Guards</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.10 - Guards</h3>
        <div class='topic'>
                <p>
                        Guards are classes that control access to REST servlets 
and methods.
@@ -1813,7 +1881,7 @@
        
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.Converters"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.10 - Converters</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.11 - Converters</h3>
        <div class='topic'>
                <p>
                        Converters can be thought of as a "post-processor" for 
POJOs before they get passed to the serializers.
@@ -1922,7 +1990,7 @@
 
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.Children"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.11 - Child Resources</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.12 - Child Resources</h3>
        <div class='topic'>             
                <p>
                        Child Resources are REST servlets that are linked to 
parent servlets through the 
@@ -2037,7 +2105,7 @@
        
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.Labels"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.12 - Localized Messages</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.13 - Localized Messages</h3>
        <div class='topic'>
                <p>
                        The {@link 
org.apache.juneau.rest.annotation.RestResource#messages 
@RestResource.messages()} annotation can 
@@ -2084,7 +2152,7 @@
        
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.Encoders"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.13- Encoders</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.14- Encoders</h3>
        <div class='topic'>
                <p>
                        The {@link 
org.apache.juneau.rest.annotation.RestResource#encoders 
@RestResource.encoders()} annotation can 
@@ -2118,7 +2186,7 @@
        
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.SvlVars"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.14 - SVL Vars</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.15 - SVL Vars</h3>
        <div class='topic'>
                <p>     
                        In the previous examples, there were several cases 
where embedded variables were contained within
@@ -2431,7 +2499,7 @@
        
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.StaticFiles"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.15 - Static Files</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.16 - Static Files</h3>
        <div class='topic'>
                <p>
                        The {@link 
org.apache.juneau.rest.annotation.RestResource#staticFiles 
@RestResource.staticFiles()} 
@@ -2482,7 +2550,7 @@
 
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.Listeners"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.16 - Listener Methods</h3>   
+       <h3 class='topic' onclick='toggle(this)'>4.17 - Listener Methods</h3>   
        <div class='topic'>
                <p>
                        Various convenience listener methods can be implemented 
by using the {@link org.apache.juneau.rest.annotation.RestHook @RestHook}
@@ -2492,14 +2560,14 @@
 
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.Stylesheet"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.17 - Stylesheet</h3> 
+       <h3 class='topic' onclick='toggle(this)'>4.18 - Stylesheet</h3> 
        <div class='topic'>
                TODO
        </div>
 
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.Headers"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.18 - Default Headers</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.19 - Default Headers</h3>
        <div class='topic'>
                <p>
                        The following annotations are provided for specifying 
default header values for requests and responses:
@@ -2546,7 +2614,7 @@
 
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.Errors"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.19 - Handling Errors / 
Logging</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.20 - Handling Errors / 
Logging</h3>
        <div class='topic'>
                <p>
                        The following overridable methods are provided for 
handling errors on requests:
@@ -2622,7 +2690,7 @@
 
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.ConfigFile"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.20 - Configuration Files</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.21 - Configuration Files</h3>
        <div class='topic'>
                <p>
                        The Juneau Configuration API is an entirely separate 
topic from the REST support.
@@ -2801,7 +2869,7 @@
 
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.Inheritence"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.21 - Annotation 
Inheritance</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.22 - Annotation 
Inheritance</h3>
        <div class='topic'>
                <p>
                        The <ja>@RestResource</ja> annotation can be used on 
parent classes and interfaces.
@@ -2939,7 +3007,7 @@
        
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.HttpStatusCodes"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.22 - HTTP Status Codes</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.23 - HTTP Status Codes</h3>
        <div class='topic'>
                <p>
                        By default, a 200 (OK) status is automatically set as 
the HTTP status when a Java method executes 
@@ -3007,7 +3075,7 @@
 
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.OverloadedHttpMethods"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.23 - Overloaded HTTP 
Methods</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.24 - Overloaded HTTP 
Methods</h3>
        <div class='topic'>
                <p>
                        Through the use of the built-in <l>"method"</l> GET 
parameter, you can implement requests beyond the basic 
@@ -3038,7 +3106,7 @@
        
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.BuildInParams"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.24 - Built-In Parameters</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.25 - Built-In Parameters</h3>
        <div class='topic'>
                <p>
                        The following URL parameters have special meaning and 
can be passed in through the URL of the request:
@@ -3096,7 +3164,7 @@
        
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.CustomSerializersParsers"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.25 - Defining your own 
serializers/parsers</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.26 - Defining your own 
serializers/parsers</h3>
        <div class='topic'>
                <p>
                        A very easy-to-use API is provided for defining your 
own serializers and parsers at both the servlet and 
@@ -3220,7 +3288,7 @@
 
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.ResponseHandlers"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.26 - Response Handlers</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.27 - Response Handlers</h3>
        <div class='topic'>
                <p>
                        Juneau uses {@link 
org.apache.juneau.rest.ResponseHandler ResponseHandlers} to convert POJOS 
returned by 
@@ -3278,7 +3346,7 @@
 
        <!-- 
========================================================================================================
 -->
        <a id="RestResources.OtherNotes"></a>
-       <h3 class='topic' onclick='toggle(this)'>4.27 - Other Notes</h3>
+       <h3 class='topic' onclick='toggle(this)'>4.28 - Other Notes</h3>
        <div class='topic'>
                <ul class='spaced-list'>
                        <li>

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/fbdb85eb/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/dark.css
----------------------------------------------------------------------
diff --git 
a/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/dark.css 
b/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/dark.css
index 4384955..e1ef349 100644
--- a/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/dark.css
+++ b/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/dark.css
@@ -135,7 +135,6 @@ article div.data {
        display: inline-block;
        box-shadow: 2px 3px 3px 0px rgba(0, 0, 0, 0.5);
        font-family: sans-serif;
-       color: #26343F;
 }
 
 article table {

Reply via email to