This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new 0642440  Javadocs
0642440 is described below

commit 0642440e28c2216cb2898a954c6186e767e275ed
Author: JamesBognar <jamesbog...@apache.org>
AuthorDate: Thu Aug 30 13:07:09 2018 -0400

    Javadocs
---
 juneau-doc/src/main/javadoc/overview.html          | 198 +++++++++++----------
 .../27.HtmlDocAnnotation/02.PredefinedWidgets.html |  42 ++++-
 .../27.HtmlDocAnnotation/03.UiCustomization.html   | 154 +++++++---------
 3 files changed, 215 insertions(+), 179 deletions(-)

diff --git a/juneau-doc/src/main/javadoc/overview.html 
b/juneau-doc/src/main/javadoc/overview.html
index 064e6fc..c3c5de8 100644
--- a/juneau-doc/src/main/javadoc/overview.html
+++ b/juneau-doc/src/main/javadoc/overview.html
@@ -338,7 +338,7 @@
                <ol>
                        <li><p class=''><a class='doclink' 
href='#juneau-rest-server.HtmlDocAnnotation.Widgets'>Widgets</a></p>
                        <li><p class='todo'><a class='doclink' 
href='#juneau-rest-server.HtmlDocAnnotation.PredefinedWidgets'>Predefined 
Widgets</a></p>
-                       <li><p class='todo'><a class='doclink' 
href='#juneau-rest-server.HtmlDocAnnotation.UiCustomization'>UI 
Customization</a></p>
+                       <li><p class='updated'><a class='doclink' 
href='#juneau-rest-server.HtmlDocAnnotation.UiCustomization'>UI 
Customization</a></p>
                        <li><p class=''><a class='doclink' 
href='#juneau-rest-server.HtmlDocAnnotation.Stylesheets'>Stylesheets</a></p>
                </ol>
                <li><p class=''><a class='doclink' 
href='#juneau-rest-server.DefaultHeaders'>Default Headers</a></p>
@@ -18750,18 +18750,58 @@
 
 <h4 class='topic todo' onclick='toggle(this)'><a 
href='#juneau-rest-server.HtmlDocAnnotation.PredefinedWidgets' 
id='juneau-rest-server.HtmlDocAnnotation.PredefinedWidgets'>7.27.2 - Predefined 
Widgets</a></h4>
 <div class='topic'><!-- START: 7.27.2 - 
juneau-rest-server.HtmlDocAnnotation.PredefinedWidgets -->
-TODO(7.2.0)
+<ul class='doctree'>
+       <li class='jac'>{@link org.apache.juneau.rest.widget.Widget}
+       <ul>
+               <li class='jac'>{@link 
org.apache.juneau.rest.widget.MenuItemWidget}
+               <ul>
+                       <li class='jc'>{@link 
org.apache.juneau.rest.widget.ContentTypeMenuItem}
+                       <li class='jc'>{@link 
org.apache.juneau.rest.widget.QueryMenuItem}
+                       <li class='jc'>{@link 
org.apache.juneau.rest.widget.ThemeMenuItem}
+               </ul>
+               <li class='jc'>{@link 
org.apache.juneau.rest.widget.PoweredByJuneau}
+       </ul>
+       <li class='jc'>{@link org.apache.juneau.rest.widget.Tooltip}
+</ul>
+
+<h5 class='topic'>Widget</h5>
+<p>
+</p>
+
+<h5 class='topic'>MenuItemWidget</h5>
+<p>
+</p>
+
+<h5 class='topic'>ContentTypeMenuItem</h5>
+<p>
+</p>
+
+<h5 class='topic'>QueryMenuItem</h5>
+<p>
+</p>
+
+<h5 class='topic'>ThemeMenuItem</h5>
+<p>
+</p>
+
+<h5 class='topic'>PoweredByJuneau</h5>
+<p>
+</p>
+
+<h5 class='topic'>Tooltip</h5>
+<p>
+</p>
 </div><!-- END: 7.27.2 - 
juneau-rest-server.HtmlDocAnnotation.PredefinedWidgets -->
 
 <!-- 
====================================================================================================
 -->
 
-<h4 class='topic todo' onclick='toggle(this)'><a 
href='#juneau-rest-server.HtmlDocAnnotation.UiCustomization' 
id='juneau-rest-server.HtmlDocAnnotation.UiCustomization'>7.27.3 - UI 
Customization</a></h4>
+<h4 class='topic updated' onclick='toggle(this)'><a 
href='#juneau-rest-server.HtmlDocAnnotation.UiCustomization' 
id='juneau-rest-server.HtmlDocAnnotation.UiCustomization'>7.27.3 - UI 
Customization</a></h4>
 <div class='topic'><!-- START: 7.27.3 - 
juneau-rest-server.HtmlDocAnnotation.UiCustomization -->
 <p>
        The HTML views of POJOs can somewhat be considered a rudimentary User 
Interface.
-       <br>In reality, a better term for them would be a Developer Interface 
as they're meant to be used 
+       In reality, a better term for them would be a Developer Interface as 
they're meant to be used 
        primarily by developers and not end users.
-       <br>Despite that distinction, it is possible to 'brand' the HTML page 
to whatever you desire.
+       Despite that distinction, it is possible to 'brand' the HTML page to 
whatever you desire.
 </p>
 <p>
        The sample root page below includes some default branding for Juneau 
and Apache:
@@ -18771,17 +18811,9 @@ TODO(7.2.0)
 </p>
 <img class='bordered w800' 
src='doc-files/juneau-rest-server.UiCustomization.1.png'>
 <p>
-       In particular, you may want to replace these icons:
-</p>
-<img class='bordered' 
src='doc-files/juneau-rest-server.UiCustomization.2.png'/>
-<img class='bordered' 
src='doc-files/juneau-rest-server.UiCustomization.3.png'/>
-<p>
        The Juneau REST framework does not provide specific branding support 
(i.e. there is no concept of a brand icon).
-       <br>Instead, it just uses the existing open-ended API for defining 
branding.
+       Instead, it just uses the existing open-ended API for defining branding 
via annotations on your REST classes.
 </p>
-<p>
-       The Juneau icon shown is a result of the header annotation on the 
{@link org.apache.juneau.rest.BasicRestConfig} class:
-</p>   
 <p class='bpcode w800'>
        <ja>@RestResource</ja>(
                ...
@@ -18825,103 +18857,89 @@ TODO(7.2.0)
        <ja>@RestResource</ja>(
                ...
                htmldoc=<ja>@HtmlDoc</ja>(
-                       header={
-                               
<js>"&lt;h1&gt;$R{resourceTitle}&lt;/h1&gt;"</js>,
-                               
<js>"&lt;h2&gt;$R{methodSummary,resourceDescription}&lt;/h2&gt;"</js>,
-                               <js>"&lt;a 
href='http://my.project.org'&gt;"</js>
-                                       +<js>"&lt;img 
src='$U{servlet:/my-htdocs/my-project.png}' 
style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/&gt;"</js>
-                               +<js>"&lt;/a&gt;"</js>
-                       },
-                       head={
-                               <jc>// Browser tab icon.</jc>
-                               <js>"&lt;link rel='icon' 
href='$U{servlet:/my-htdocs/my-project.png}'/&gt;"</js>
-                       }
+                       htmldoc=<ja>@HtmlDoc</ja>(
+                               <jc>// Basic page navigation links.</jc>
+                               navlinks={
+                                       <js>"up: request:/.."</js>,
+                                       <js>"options: 
servlet:/?method=OPTIONS"</js>
+                               }
+                       )
                ),
-               staticFiles={<js>"my-htdocs:my-htdocs"</js>}
+               ...
        )
        <jk>public abstract class</jk> BasicRestServlet <jk>extends</jk> 
RestServlet <jk>implements</jk> BasicRestConfig {...}
 </p>
-
-<p>
-       The <js>"juneau.png"</js> image file is located in 
<code>org.apache.juneau.rest.htdocs</code> package and 
-       is served up via the <code>staticFiles</code> annotation (i.e. anything 
in the <code>org.apache.juneau.rest.htdocs</code> 
-       package is served up under the path <code>/servlet-path/htdocs</code>). 
 
-       <br>Then we just reference using a URI resolution variable 
<js>"$U{servlet:/htdocs/juneau.png}"</js>.
-</p>
-<p>
-       To change this image, you can extend the <l>BasicRestServlet</l> class 
and simply override the annotations
-       pointing to your own icon.
-</p>
 <p class='bpcode w800'>                        
-       <ja>@RestResource</ja>(
-               ...
-               htmldoc=<ja>@HtmlDoc</ja>(
-                       header={
-                               
<js>"&lt;h1&gt;$R{resourceTitle}&lt;/h1&gt;"</js>,
-                               
<js>"&lt;h2&gt;$R{methodSummary,resourceDescription}&lt;/h2&gt;"</js>,
-                               <js>"&lt;a 
href='http://my.project.org'&gt;"</js>
-                                       +<js>"&lt;img 
src='$U{servlet:/my-htdocs/my-project.png}' 
style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/&gt;"</js>
-                               +<js>"&lt;/a&gt;"</js>
-                       },
-                       head={
-                               <jc>// Browser tab icon.</jc>
-                               <js>"&lt;link rel='icon' 
href='$U{servlet:/my-htdocs/my-project.png}'/&gt;"</js>
-                       }
-               ),
-               staticFiles={<js>"my-htdocs:my-htdocs"</js>}
-       )
-       <jk>public class</jk> MyResourceBaseClass <jk>extends</jk> 
BasicRestServlet {...}
-</p>
-<p>
-       The footer icon shown is generated by a predefined widget:
+       <ja>@RestResource</ja>
+       <jk>public abstract class</jk> BasicRestServletGroup <jk>extends</jk> 
BasicRestServlet {...}
 </p>
-<p class='bpcode w800'>
+<p class='bpcode w800'>                        
        <ja>@RestResource</ja>(
                htmldoc=<ja>@HtmlDoc</ja>(
                        widgets={
-                               PoweredByApache.<jk>class</jk>
+                               ContentTypeMenuItem.<jk>class</jk>,
+                               ThemeMenuItem.<jk>class</jk>
                        },
-                       footer=<js>"$W{PoweredByApache}"</js>
+                       navlinks={
+                               <js>"options: ?method=OPTIONS"</js>,
+                               <js>"$W{ContentTypeMenuItem}"</js>,
+                               <js>"$W{ThemeMenuItem}"</js>,
+                               <js>"source: 
$C{Source/gitHub}/org/apache/juneau/examples/rest/$R{servletClassSimple}.java"</js>
+                       },
+                       aside={
+                               <js>"&lt;div style='max-width:400px' 
class='text'&gt;"</js>,
+                               <js>"   &lt;p&gt;This is an example of a 
'router' page that serves as a jumping-off point to child 
resources.&lt;/p&gt;"</js>,
+                               <js>"   &lt;p&gt;Resources can be nested 
arbitrarily deep through router pages.&lt;/p&gt;"</js>,
+                               <js>"   &lt;p&gt;Note the &lt;span 
class='link'&gt;options&lt;/span&gt; link provided that lets you see the 
generated swagger doc for this page.&lt;/p&gt;"</js>,
+                               <js>"   &lt;p&gt;Also note the &lt;span 
class='link'&gt;sources&lt;/span&gt; link on these pages to view the source 
code for the page.&lt;/p&gt;"</js>,
+                               <js>"   &lt;p&gt;All content on pages in the UI 
are serialized POJOs.  In this case, it's a serialized array of beans with 2 
properties, 'name' and 'description'.&lt;/p&gt;"</js>,
+                               <js>"   &lt;p&gt;Other features (such as this 
aside) are added through annotations.&lt;/p&gt;"</js>,
+                               <js>"&lt;/div&gt;"</js>
+                       }
                ),
                ...
        )
-       <jk>public class</jk> RootResources <jk>extends</jk> 
BasicRestServletJenaGroup {...}
-</p>                   
-<p>
-       The widget definition is shown below:
-</p>
-<p class='bpcode w800'>
-       <jk>public class</jk> PoweredByApache <jk>extends</jk> Widget {
-       
-               <jd>/**
-                * Returns an Apache image tag hyperlinked to 
<js>"http://apache.org";</js>
-                */</jd>
-               <ja>@Override</ja> <jc>/* Widget */</jc>
-               <jk>public</jk> String getHtml(RestRequest req) <jk>throws</jk> 
Exception {
-                       UriResolver r = req.getUriResolver();
-                       <jk>return</jk> <js>"&lt;a 
href='http://apache.org'&gt;&lt;img 
style='float:right;padding-right:20px;height:32px' 
src='"</js>+r.resolve(<js>"servlet:/htdocs/asf.png"</js>)+<js>"'&gt;"</js>;
-               }
-       }
+       <jk>public class</jk> RootResources <jk>extends</jk> 
BasicRestServletGroup {...}
 </p>
+
 <p>
-       To provide your own footer icon, simply define it in your own footer 
section:
+       The default annotation values use {@link 
org.apache.juneau.config.vars.ConfigVar $C} variables to pull in values from an 
optional
+       external configuration file, such as the one shown below:
 </p>
 <p class='bpcode w800'>
-       <ja>@RestResource</ja>(
-               htmldoc=<ja>@HtmlDoc</ja>(
-                       footer=<js>"&lt;img 
style='float:right;padding-right:20px;height:32px' 
src='$U{servlet:/my-htdocs/my-project.png}'&gt;"</js>
-               ),
-               staticFiles={<js>"my-htdocs:my-htdocs"</js>}
-               ...
-       )
-       <jk>public class</jk> MyResourceBaseClass <jk>extends</jk> 
BasicRestServlet {...}
+       
<cc>#=======================================================================================================================
+       # REST settings
+       
#=======================================================================================================================</cc>
+       <cs>[REST]</cs>
+       
+       <ck>staticFiles</ck> = <cv>htdocs:files/htdocs</cv>
+       
+       <cc># Stylesheet to use for HTML views.</cc>
+       <ck>theme</ck> = <cv>servlet:/htdocs/themes/devops.css</cv>
+       
+       <ck>headerIcon</ck> = <cv>servlet:/htdocs/images/juneau.png</cv>
+       <ck>headerLink</ck> = <cv>http://juneau.apache.org</cv>
+       <ck>footerIcon</ck> = <cv>servlet:/htdocs/images/asf.png</cv>
+       <ck>footerLink</ck> = <cv>http://www.apache.org</cv>
+       
+       <ck>favicon</ck> = <cv>$C{REST/headerIcon}</cv>
+       <ck>header</ck> = 
+               <cv>&lt;a href='$U{$C{REST/headerLink}}'&gt;</cv>
+                       <cv>&lt;img src='$U{$C{REST/headerIcon}}' 
style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/&gt;</cv>
+               <cv>&lt;/a&gt;</cv>
+       <ck>footer</ck> = 
+               <cv>&lt;a href='$U{$C{REST/footerLink}}'&gt;</cv>
+                       <cv>&lt;img src='$U{$C{REST/footerIcon}}' 
style='float:right;padding-right:20px;height:32px'/&gt;</cv>
+               <cv>&lt;/a&gt;</cv>
 </p>
 <p>
-       Note how the "User Interface" is open-ended to pretty much lets you do 
whatever you want.
+       The take-away here is that the "User Interface" is open-ended, lets you 
define pretty much anything you want through arbitrary HTML, 
+       and allows you either hardcode your interface inside annotations or 
pull them in via string variables from other places such as
+       external config files.
 </p>
-<h5 class='figure'>See Also:</h5>
+<h5 class='section'>See Also:</h5>
 <ul>
-       <li class='doclink'>{@doc juneau-microservice-server.UiCustomization}
+       <li class='link'>{@doc juneau-microservice-server.UiCustomization}
 </ul>
 </div><!-- END: 7.27.3 - juneau-rest-server.HtmlDocAnnotation.UiCustomization 
-->
 
diff --git 
a/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/27.HtmlDocAnnotation/02.PredefinedWidgets.html
 
b/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/27.HtmlDocAnnotation/02.PredefinedWidgets.html
index 236bc8a..b54de40 100644
--- 
a/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/27.HtmlDocAnnotation/02.PredefinedWidgets.html
+++ 
b/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/27.HtmlDocAnnotation/02.PredefinedWidgets.html
@@ -15,4 +15,44 @@
 
 {todo} Predefined Widgets
 
-TODO(7.2.0)
\ No newline at end of file
+<ul class='doctree'>
+       <li class='jac'>{@link oajr.widget.Widget}
+       <ul>
+               <li class='jac'>{@link oajr.widget.MenuItemWidget}
+               <ul>
+                       <li class='jc'>{@link oajr.widget.ContentTypeMenuItem}
+                       <li class='jc'>{@link oajr.widget.QueryMenuItem}
+                       <li class='jc'>{@link oajr.widget.ThemeMenuItem}
+               </ul>
+               <li class='jc'>{@link oajr.widget.PoweredByJuneau}
+       </ul>
+       <li class='jc'>{@link oajr.widget.Tooltip}
+</ul>
+
+<h5 class='topic'>Widget</h5>
+<p>
+</p>
+
+<h5 class='topic'>MenuItemWidget</h5>
+<p>
+</p>
+
+<h5 class='topic'>ContentTypeMenuItem</h5>
+<p>
+</p>
+
+<h5 class='topic'>QueryMenuItem</h5>
+<p>
+</p>
+
+<h5 class='topic'>ThemeMenuItem</h5>
+<p>
+</p>
+
+<h5 class='topic'>PoweredByJuneau</h5>
+<p>
+</p>
+
+<h5 class='topic'>Tooltip</h5>
+<p>
+</p>
\ No newline at end of file
diff --git 
a/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/27.HtmlDocAnnotation/03.UiCustomization.html
 
b/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/27.HtmlDocAnnotation/03.UiCustomization.html
index e44573e..c4e4bbf 100644
--- 
a/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/27.HtmlDocAnnotation/03.UiCustomization.html
+++ 
b/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/27.HtmlDocAnnotation/03.UiCustomization.html
@@ -13,13 +13,13 @@
  
***************************************************************************************************************************/
  -->
 
-{todo} UI Customization
+{updated} UI Customization
 
 <p>
        The HTML views of POJOs can somewhat be considered a rudimentary User 
Interface.
-       <br>In reality, a better term for them would be a Developer Interface 
as they're meant to be used 
+       In reality, a better term for them would be a Developer Interface as 
they're meant to be used 
        primarily by developers and not end users.
-       <br>Despite that distinction, it is possible to 'brand' the HTML page 
to whatever you desire.
+       Despite that distinction, it is possible to 'brand' the HTML page to 
whatever you desire.
 </p>
 <p>
        The sample root page below includes some default branding for Juneau 
and Apache:
@@ -29,17 +29,9 @@
 </p>
 <img class='bordered w800' 
src='doc-files/juneau-rest-server.UiCustomization.1.png'>
 <p>
-       In particular, you may want to replace these icons:
-</p>
-<img class='bordered' 
src='doc-files/juneau-rest-server.UiCustomization.2.png'/>
-<img class='bordered' 
src='doc-files/juneau-rest-server.UiCustomization.3.png'/>
-<p>
        The Juneau REST framework does not provide specific branding support 
(i.e. there is no concept of a brand icon).
-       <br>Instead, it just uses the existing open-ended API for defining 
branding.
+       Instead, it just uses the existing open-ended API for defining branding 
via annotations on your REST classes.
 </p>
-<p>
-       The Juneau icon shown is a result of the header annotation on the 
{@link oajr.BasicRestConfig} class:
-</p>   
 <p class='bpcode w800'>
        <ja>@RestResource</ja>(
                ...
@@ -83,101 +75,87 @@
        <ja>@RestResource</ja>(
                ...
                htmldoc=<ja>@HtmlDoc</ja>(
-                       header={
-                               
<js>"&lt;h1&gt;$R{resourceTitle}&lt;/h1&gt;"</js>,
-                               
<js>"&lt;h2&gt;$R{methodSummary,resourceDescription}&lt;/h2&gt;"</js>,
-                               <js>"&lt;a 
href='http://my.project.org'&gt;"</js>
-                                       +<js>"&lt;img 
src='$U{servlet:/my-htdocs/my-project.png}' 
style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/&gt;"</js>
-                               +<js>"&lt;/a&gt;"</js>
-                       },
-                       head={
-                               <jc>// Browser tab icon.</jc>
-                               <js>"&lt;link rel='icon' 
href='$U{servlet:/my-htdocs/my-project.png}'/&gt;"</js>
-                       }
+                       htmldoc=<ja>@HtmlDoc</ja>(
+                               <jc>// Basic page navigation links.</jc>
+                               navlinks={
+                                       <js>"up: request:/.."</js>,
+                                       <js>"options: 
servlet:/?method=OPTIONS"</js>
+                               }
+                       )
                ),
-               staticFiles={<js>"my-htdocs:my-htdocs"</js>}
+               ...
        )
        <jk>public abstract class</jk> BasicRestServlet <jk>extends</jk> 
RestServlet <jk>implements</jk> BasicRestConfig {...}
 </p>
-
-<p>
-       The <js>"juneau.png"</js> image file is located in 
<code>org.apache.juneau.rest.htdocs</code> package and 
-       is served up via the <code>staticFiles</code> annotation (i.e. anything 
in the <code>org.apache.juneau.rest.htdocs</code> 
-       package is served up under the path <code>/servlet-path/htdocs</code>). 
 
-       <br>Then we just reference using a URI resolution variable 
<js>"$U{servlet:/htdocs/juneau.png}"</js>.
-</p>
-<p>
-       To change this image, you can extend the <l>BasicRestServlet</l> class 
and simply override the annotations
-       pointing to your own icon.
-</p>
 <p class='bpcode w800'>                        
-       <ja>@RestResource</ja>(
-               ...
-               htmldoc=<ja>@HtmlDoc</ja>(
-                       header={
-                               
<js>"&lt;h1&gt;$R{resourceTitle}&lt;/h1&gt;"</js>,
-                               
<js>"&lt;h2&gt;$R{methodSummary,resourceDescription}&lt;/h2&gt;"</js>,
-                               <js>"&lt;a 
href='http://my.project.org'&gt;"</js>
-                                       +<js>"&lt;img 
src='$U{servlet:/my-htdocs/my-project.png}' 
style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/&gt;"</js>
-                               +<js>"&lt;/a&gt;"</js>
-                       },
-                       head={
-                               <jc>// Browser tab icon.</jc>
-                               <js>"&lt;link rel='icon' 
href='$U{servlet:/my-htdocs/my-project.png}'/&gt;"</js>
-                       }
-               ),
-               staticFiles={<js>"my-htdocs:my-htdocs"</js>}
-       )
-       <jk>public class</jk> MyResourceBaseClass <jk>extends</jk> 
BasicRestServlet {...}
-</p>
-<p>
-       The footer icon shown is generated by a predefined widget:
+       <ja>@RestResource</ja>
+       <jk>public abstract class</jk> BasicRestServletGroup <jk>extends</jk> 
BasicRestServlet {...}
 </p>
-<p class='bpcode w800'>
+<p class='bpcode w800'>                        
        <ja>@RestResource</ja>(
                htmldoc=<ja>@HtmlDoc</ja>(
                        widgets={
-                               PoweredByApache.<jk>class</jk>
+                               ContentTypeMenuItem.<jk>class</jk>,
+                               ThemeMenuItem.<jk>class</jk>
+                       },
+                       navlinks={
+                               <js>"options: ?method=OPTIONS"</js>,
+                               <js>"$W{ContentTypeMenuItem}"</js>,
+                               <js>"$W{ThemeMenuItem}"</js>,
+                               <js>"source: 
$C{Source/gitHub}/org/apache/juneau/examples/rest/$R{servletClassSimple}.java"</js>
                        },
-                       footer=<js>"$W{PoweredByApache}"</js>
+                       aside={
+                               <js>"&lt;div style='max-width:400px' 
class='text'&gt;"</js>,
+                               <js>"   &lt;p&gt;This is an example of a 
'router' page that serves as a jumping-off point to child 
resources.&lt;/p&gt;"</js>,
+                               <js>"   &lt;p&gt;Resources can be nested 
arbitrarily deep through router pages.&lt;/p&gt;"</js>,
+                               <js>"   &lt;p&gt;Note the &lt;span 
class='link'&gt;options&lt;/span&gt; link provided that lets you see the 
generated swagger doc for this page.&lt;/p&gt;"</js>,
+                               <js>"   &lt;p&gt;Also note the &lt;span 
class='link'&gt;sources&lt;/span&gt; link on these pages to view the source 
code for the page.&lt;/p&gt;"</js>,
+                               <js>"   &lt;p&gt;All content on pages in the UI 
are serialized POJOs.  In this case, it's a serialized array of beans with 2 
properties, 'name' and 'description'.&lt;/p&gt;"</js>,
+                               <js>"   &lt;p&gt;Other features (such as this 
aside) are added through annotations.&lt;/p&gt;"</js>,
+                               <js>"&lt;/div&gt;"</js>
+                       }
                ),
                ...
        )
-       <jk>public class</jk> RootResources <jk>extends</jk> 
BasicRestServletJenaGroup {...}
-</p>                   
-<p>
-       The widget definition is shown below:
-</p>
-<p class='bpcode w800'>
-       <jk>public class</jk> PoweredByApache <jk>extends</jk> Widget {
-       
-               <jd>/**
-                * Returns an Apache image tag hyperlinked to 
<js>"http://apache.org";</js>
-                */</jd>
-               <ja>@Override</ja> <jc>/* Widget */</jc>
-               <jk>public</jk> String getHtml(RestRequest req) <jk>throws</jk> 
Exception {
-                       UriResolver r = req.getUriResolver();
-                       <jk>return</jk> <js>"&lt;a 
href='http://apache.org'&gt;&lt;img 
style='float:right;padding-right:20px;height:32px' 
src='"</js>+r.resolve(<js>"servlet:/htdocs/asf.png"</js>)+<js>"'&gt;"</js>;
-               }
-       }
+       <jk>public class</jk> RootResources <jk>extends</jk> 
BasicRestServletGroup {...}
 </p>
+
 <p>
-       To provide your own footer icon, simply define it in your own footer 
section:
+       The default annotation values use {@link oaj.config.vars.ConfigVar $C} 
variables to pull in values from an optional
+       external configuration file such as the one shown below:
 </p>
 <p class='bpcode w800'>
-       <ja>@RestResource</ja>(
-               htmldoc=<ja>@HtmlDoc</ja>(
-                       footer=<js>"&lt;img 
style='float:right;padding-right:20px;height:32px' 
src='$U{servlet:/my-htdocs/my-project.png}'&gt;"</js>
-               ),
-               staticFiles={<js>"my-htdocs:my-htdocs"</js>}
-               ...
-       )
-       <jk>public class</jk> MyResourceBaseClass <jk>extends</jk> 
BasicRestServlet {...}
+       
<cc>#=======================================================================================================================
+       # REST settings
+       
#=======================================================================================================================</cc>
+       <cs>[REST]</cs>
+       
+       <ck>staticFiles</ck> = <cv>htdocs:files/htdocs</cv>
+       
+       <cc># Stylesheet to use for HTML views.</cc>
+       <ck>theme</ck> = <cv>servlet:/htdocs/themes/devops.css</cv>
+       
+       <ck>headerIcon</ck> = <cv>servlet:/htdocs/images/juneau.png</cv>
+       <ck>headerLink</ck> = <cv>http://juneau.apache.org</cv>
+       <ck>footerIcon</ck> = <cv>servlet:/htdocs/images/asf.png</cv>
+       <ck>footerLink</ck> = <cv>http://www.apache.org</cv>
+       
+       <ck>favicon</ck> = <cv>$C{REST/headerIcon}</cv>
+       <ck>header</ck> = 
+               <cv>&lt;a href='$U{$C{REST/headerLink}}'&gt;</cv>
+                       <cv>&lt;img src='$U{$C{REST/headerIcon}}' 
style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/&gt;</cv>
+               <cv>&lt;/a&gt;</cv>
+       <ck>footer</ck> = 
+               <cv>&lt;a href='$U{$C{REST/footerLink}}'&gt;</cv>
+                       <cv>&lt;img src='$U{$C{REST/footerIcon}}' 
style='float:right;padding-right:20px;height:32px'/&gt;</cv>
+               <cv>&lt;/a&gt;</cv>
 </p>
 <p>
-       Note how the "User Interface" is open-ended to pretty much lets you do 
whatever you want.
+       The take-away here is that the "User Interface" is open-ended, lets you 
define pretty much anything you want through arbitrary HTML, 
+       and allows you either hardcode your interface inside annotations or 
pull them in via string variables from other places such as
+       external config files.
 </p>
-<h5 class='figure'>See Also:</h5>
+<h5 class='section'>See Also:</h5>
 <ul>
-       <li class='doclink'>{@doc juneau-microservice-server.UiCustomization}
+       <li class='link'>{@doc juneau-microservice-server.UiCustomization}
 </ul>

Reply via email to