6.3.1 (Aug 1, 2017)

Juneau 6.3.1 is a minor release.

##### org.apache.juneau

- {@link oaj.utils.PojoQuery} improvements.
- New {@del RemoteMethod#returns()} annotation.
  Allows you to specify whether the remote method returns the HTTP body or status code.
- Fixed bugs with {@del BEAN_includeProperties} and {@del BEAN_excludeProperties} settings.
- New/modified settings in {@del HtmlDocSerializerContext}:
  - {@del HTMLDOC_script}
  - {@del HTMLDOC_style} - Was HTMLDOC_css.
  - {@del HTMLDOC_stylesheet} - Was HTMLDOC_cssUrl. Now an array.
- New {@del ResourceFinder} utility class. Allows you to search for resources up the parent hierarchy chain. Also allows you to search for localized resources.
- Eliminated the following properties from {@del HtmlDocSerializerContext}: HTMLDOC_title, HTMLDOC_description, HTMLDOC_description
  See below on changes to simplify HTML headers.
- {@link oaj.svl.Var} implementations can now throw exceptions and will be converted to ""{exceptionMessage}" values.

##### org.apache.juneau.rest

- New 'light' stylesheet:
  Compared with previous 'devops':
  For those nolstalgic for old times, there's also 'original':
- Simplified the stylesheets and HTML code.
  For example, the nav links are now an ordered list of elements which makes rendering as as side-bar (for example) easier to do in CSS.
- Modifications to the following @HtmlDoc annotations:
  - {@del oajr.annotation.HtmlDoc#navlinks() navlinks()} - Now an array of strings instead of a JSON object. Simplified syntax.
    For example:

    // Old syntax htmldoc=@HtmlDoc( links="{" + "up:'request:/..'," + "options:'servlet:/?method=OPTIONS'," + "contentTypes:'$W{ContentTypeMenuItem}'," + "styles:'$W{StyleMenuItem}'," + "source:'$C{Source/gitHub}/org/apache/juneau/examples/rest/PetStoreResource.java'" + "}" ) // New syntax htmldoc=@HtmlDoc( navlinks={ "up: request:/..", "options: servlet:/?method=OPTIONS", "$W{ContentTypeMenuItem}", "$W{StyleMenuItem}", "source: $C{Source/gitHub}/org/apache/juneau/examples/rest/PetStoreResource.java" } )

    Previous syntax will still work, but you're encouraged to use the simplified syntax.
  - Several annotations are now arrays of strings instead of simple strings. Values are simply concatenated with newlines which makes multi-line values cleaner.
    - {@del oajr.annotation.HtmlDoc#header() header()}
    - {@del oajr.annotation.HtmlDoc#nav() nav()}
    - {@del oajr.annotation.HtmlDoc#aside() aside()}
    - {@del oajr.annotation.HtmlDoc#footer() footer()}
    - {@del oajr.annotation.HtmlDoc#script() script()}
    - {@del oajr.annotation.HtmlDoc#style() style()}
    Additionally, the "INHERIT" string literal can be used to combine the value with the value defined on the servlet or parent class. Links can also be inserted at specific index positions.
- Improvements made to the {@link oajr.widget.Widget} API.
  - You can now add arbitrary CSS and Javascript along with your widgets through new methods:
    - {@del Widget#getHtml(RestRequest)}
    - {@del Widget#getScript(RestRequest)}
    - {@del Widget#getStyle(RestRequest)}
  - Declaration of widgets moved to {@del oajr.annotation.HtmlDoc#widgets() @HtmlDoc(widgets)} instead of separately on {@del @RestResource} and @RestMethod annotations.
  - {@link oajr.widget.Widget#getName()} now defaults to the simple class name.
    So now you can just refer to the class name: "$W{ContentTypeMenuItem}".
  - Renamed widgets:
    - PoweredByApacheWidget -> PoweredByApache
    - PoweredByJuneauWidget -> PoweredByJuneau
  - New {@link oajr.widget.MenuItemWidget} can be used as a starting point for creatint pull-down menu items.
  - New {@link oajr.widget.ContentTypeMenuItem} widget that provides a pull-down menu with hyperlinks for all supported languages for that page:
  - Improved {@link oajr.widget.QueryMenuItem} widget that provides a pull-down menu of a search/view/order-by/page form:
    Fields are now pre-filled with current query parameters.
  - New {@link oajr.widget.ThemeMenuItem} widget that provides a pull-down menu with hyperlinks to show the content in the default stylesheets:
- New/modified annotations on {@del oajr.annotation.HtmlDoc @HtmlDoc}:
  - {@del oajr.annotation.HtmlDoc#style() style()} - Renamed from css().
  - {@del oajr.annotation.HtmlDoc#stylesheet() stylesheet()} - Renamed from cssUrl().
    Can now be a comma-delimited list of URLs.
  - {@del oajr.annotation.HtmlDoc#script() script()} - Add arbitrary Javascript to page header.
- Bug fix with {@del oajr.annotation.HtmlDoc#nowrap() @HtmlDoc(nowrap)} so that the setting only applies to the data contents, not the whole page.
- Two convenience methods added to {@link oajr.RestRequest}:
  - {@del RestRequest#attr(String,Object)}
  - {@del RestRequest#prop(String,Object)}
- Annotations added:
  - {@del @RestResource(siteName)}
  - {@del @RestResource(flags)}
  - {@del oajr.annotation.RestMethod#flags() @RestMethod(flags)}
- Eliminated the {@del @RestResource(stylesheet)} annotation. It's no longer needed now that you can easily specify styles via @Htmldoc.
- Eliminated the following annotations since they are now redundant with {@del oajr.annotation.HtmlDoc#header() @HtmlDoc(header)}:
  - title()
  - description()
  - branding()
  Instead, the {@del oajr.BasicRestServlet} class defines the following default header that can be easily overridden:

  htmldoc=@HtmlDoc( header={ "<h1>$R{resourceTitle}</h1>", "<h2>$R{methodSummary,resourceDescription}</h2>", "<a href='http://juneau.apache.org'><img src='$U{servlet:/htdocs/juneau.png}' style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/></a>" } )

  Note that the subtitle first tries using the method summary and then the servlet description.
- New {@link oajr.vars.FileVar $F} variable resolver for resolving the contents of files in the classpath.
  The DockerRegistryResource examples shows how it can be used to pull in a localized file from the classpath to populate the aside section of a page.

  htmldoc=@HtmlDoc( // Pull in aside contents from file. aside="$F{resources/DockerRegistryResourceAside.html}" )

- New {@del ReaderResource#toCommentStrippedString()} method.
- The bpIncludes() and bpExcludes() annotations on @RestMethod has been replaced with the following:
  - {@del oajr.annotation.RestMethod#bpi() bpi()} - Now an array of simplified values instead of LAX JSON.
  - {@del oajr.annotation.RestMethod#bpx() bpx()} - Now an array of simplified values instead of LAX JSON.
- Two new variables added to $R variable: "$R{servletClass}", "$R{servletClassSimple}"

##### org.apache.juneau.rest.examples

- Added CONTENT-TYPE and STYLES menu items to most pages.
- Added improved QUERY menu item to PetStore page.