Javadocs
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlDocConfig.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlDocConfig.java
index 13cbf24..b3ae95f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlDocConfig.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlDocConfig.java
@@ -392,6 +392,7 @@
* Adds the specified Javascript code to the HTML page.
*
* <h5 class='section'>Example:</h5>
+ * <p class='bpcode w800'>
* htmldoc=<ja>@HtmlDocConfig</ja>(
* script={
* <js>"alert('hello!');"</js>
@@ -433,6 +434,7 @@
* Adds the specified CSS instructions to the HTML page.
*
* <h5 class='section'>Example:</h5>
+ * <p class='bpcode w800'>
* <ja>@HtmlDocConfig</ja>(
* style={
* <js>"h3 { color: red; }"</js>,
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/annotation/JsonSchemaConfig.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/annotation/JsonSchemaConfig.java
index 064ab0c..b289d54 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/annotation/JsonSchemaConfig.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/annotation/JsonSchemaConfig.java
@@ -220,6 +220,7 @@
* Swagger documentation.
*
* <ul class='notes'>
+ * <li>
* Format: Comma-delimited list of patterns
* <li>
* Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>).
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/reflect/ClassInfo.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/reflect/ClassInfo.java
index 7aeb365..06014db 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/reflect/ClassInfo.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/reflect/ClassInfo.java
@@ -37,7 +37,7 @@
* <p>
* Objects are designed to be lightweight to create and threadsafe.
*
- * <h5 class='figure'>
+ * <h5 class='figure'>Example:</h5>
* <p class='bpcode w800'>
* <jc>// Wrap our class inside a ClassInfo.</jc>
* ClassInfo ci = ClassInfo.<jsm>of</jsm>(MyClass.<jk>class</jk>);
@@ -1853,7 +1853,7 @@
}
/**
- * Same as {@link #getSimpleName()} but uses <js>"Array"</j> instead of <js>"[]"</js>.
+ * Same as {@link #getSimpleName()} but uses <js>"Array"</js> instead of <js>"[]"</js>.
*
* @return The readable name for this class.
*/
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/StringExpressionMatcher.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/StringExpressionMatcher.java
index 2285def..cdaed56 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/StringExpressionMatcher.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/StringExpressionMatcher.java
@@ -31,8 +31,8 @@
* <li><js>"foo | bar | bqz"</js> - Multiple OR'ed arguments, pipe syntax.
* <li><js>"foo || bar || bqz"</js> - Multiple OR'ed arguments, Java-OR syntax.
* <li><js>"fo*"</js> - Patterns including <js>'*'</js> and <js>'?'</js>.
- * <li><js>"fo* & *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
- * <li><js>"fo* && *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
+ * <li><js>"fo* & *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
+ * <li><js>"fo* && *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
* <li><js>"fo* || (*oo || bar)"</js> - Parenthesis.
* </ul>
*
diff --git a/juneau-doc/docs/ReleaseNotes/8.1.1.html b/juneau-doc/docs/ReleaseNotes/8.1.1.html
index a8c2e29..32224cc 100644
--- a/juneau-doc/docs/ReleaseNotes/8.1.1.html
+++ b/juneau-doc/docs/ReleaseNotes/8.1.1.html
@@ -46,10 +46,10 @@
<h5 class='topic w800'>juneau-rest-server</h5>
<ul class='spaced-list'>
<li>
- Support for {@link Optional} on method parameters annotated with {@link oaj.http.annotation.Header}, {@link oaj.http.annotation.FormData},
- {@link oaj.http.annotation.Query}, {@link oaj.http.annotation.Path}, and {@link oaj.http.annotation.PathRemainder}.
+ Support for {@link java.util.Optional} on method parameters annotated with {@link oaj.http.annotation.Header}, {@link oaj.http.annotation.FormData},
+ {@link oaj.http.annotation.Query}, {@link oaj.http.annotation.Path}.
<li>
- Fixed issue where {@link oajr.annotation.RestRequest#debug() RestRequest.debug()} annotation wasn't resulting
+ Fixed issue where {@link oajr.annotation.RestMethod#debug() RestMethod.debug()} annotation wasn't resulting
in the HTTP request being logged.
<li>
{@link oajr.RestException} has been deprecated and replaced by {@link oaj.http.exception.HttpException}.
diff --git a/juneau-doc/docs/Topics/07.juneau-rest-server/20.RoleGuards.html b/juneau-doc/docs/Topics/07.juneau-rest-server/20.RoleGuards.html
index 0c0bf1f..7649fc6 100644
--- a/juneau-doc/docs/Topics/07.juneau-rest-server/20.RoleGuards.html
+++ b/juneau-doc/docs/Topics/07.juneau-rest-server/20.RoleGuards.html
@@ -41,7 +41,7 @@
// can run any methods on this class.</jc>
<ja>@RestResource</ja>(
path=<js>"/foo"</js>,
- roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
+ roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
)
<jk>public class</jk> MyResource <jk>extends</jk> RestServlet {
...
@@ -56,8 +56,8 @@
<li><js>"foo | bar | baz"</js> - Multiple OR'ed arguments, pipe syntax.
<li><js>"foo || bar || baz"</js> - Multiple OR'ed arguments, Java-OR syntax.
<li><js>"fo*"</js> - Patterns including <js>'*'</js> and <js>'?'</js>.
- <li><js>"fo* & *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
- <li><js>"fo* && *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
+ <li><js>"fo* & *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
+ <li><js>"fo* && *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
<li><js>"fo* || (*oo || bar)"</js> - Parenthesis.
</ul>
@@ -71,7 +71,7 @@
<p class='bpcode w800'>
<ja>@RestResource</ja>(
rolesDeclared=<js>"ROLE_ADMIN,ROLE_READ_WRITE,ROLE_READ_ONLY,ROLE_SPECIAL"</js>,
- roleGuard=<js>"ROLE_ADMIN || (*WRITE* && *SPECIAL*)"</js>
+ roleGuard=<js>"ROLE_ADMIN || (*WRITE* && *SPECIAL*)"</js>
)
<jk>public class</jk> MyResource <jk>extends</jk> RestServlet {
...
diff --git a/juneau-doc/src/main/javadoc/overview.html b/juneau-doc/src/main/javadoc/overview.html
index 4730b30..55b9002 100644
--- a/juneau-doc/src/main/javadoc/overview.html
+++ b/juneau-doc/src/main/javadoc/overview.html
@@ -72,7 +72,7 @@
<ol class='toc'>
<li><p class='toc2'><a class='doclink' href='#Introduction'>Introduction</a></p>
<ol>
- <li><p class='updated'><a class='doclink' href='#Introduction.Features'>Features</a></p>
+ <li><p class=''><a class='doclink' href='#Introduction.Features'>Features</a></p>
<li><p class=''><a class='doclink' href='#Introduction.Components'>Components</a></p>
</ol>
<li><p class='toc2'><a class='doclink' href='#juneau-marshall'>juneau-marshall</a></p>
@@ -85,26 +85,26 @@
<li><p class=''><a class='doclink' href='#juneau-marshall.ConfigurableProperties'>Configurable Properties</a></p>
<ol>
<li><p class=''><a class='doclink' href='#juneau-marshall.ConfigurableProperties.Common'>Common Serializer Properties</a></p>
- <li><p class='updated'><a class='doclink' href='#juneau-marshall.ConfigurableProperties.CommonSerializer'>Common Serializer Properties</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-marshall.ConfigurableProperties.CommonSerializer'>Common Serializer Properties</a></p>
<li><p class='update'><a class='doclink' href='#juneau-marshall.ConfigurableProperties.CommonParser'>Common Parser Properties</a></p>
</ol>
- <li><p class='new'><a class='doclink' href='#juneau-marshall.ConfigurableAnnotations'>Configurable Annotations</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-marshall.ConfigurableAnnotations'>Configurable Annotations</a></p>
<li><p class=''><a class='doclink' href='#juneau-marshall.ObjectMap'>ObjectMap and ObjectList</a></p>
<li><p class=''><a class='doclink' href='#juneau-marshall.Groups'>SerializerGroups and ParserGroups</a></p>
<li><p class=''><a class='doclink' href='#juneau-marshall.ContextsBuildersSessionsPropertyStores'>Contexts, Builders, Sessions, and PropertyStores</a></p>
<li><p class=''><a class='doclink' href='#juneau-marshall.Transforms'>Transforms</a></p>
<ol>
- <li><p class='updated'><a class='doclink' href='#juneau-marshall.Transforms.PojoSwaps'>PojoSwaps</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-marshall.Transforms.PojoSwaps'>PojoSwaps</a></p>
<li><p class=''><a class='doclink' href='#juneau-marshall.Transforms.DefaultPojoSwaps'>Default PojoSwaps</a></p>
- <li><p class='new'><a class='doclink' href='#juneau-marshall.Transforms.AutoPojoSwaps'>Auto-detected POJO swaps</a></p>
- <li><p class='updated'><a class='doclink' href='#juneau-marshall.Transforms.PerMediaTypePojoSwaps'>Per-media-type PojoSwaps</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-marshall.Transforms.AutoPojoSwaps'>Auto-detected POJO swaps</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-marshall.Transforms.PerMediaTypePojoSwaps'>Per-media-type PojoSwaps</a></p>
<li><p class=''><a class='doclink' href='#juneau-marshall.Transforms.OneWayPojoSwaps'>One-way PojoSwaps</a></p>
<li><p class=''><a class='doclink' href='#juneau-marshall.Transforms.SwapAnnotation'>@Swap Annotation</a></p>
<li><p class=''><a class='doclink' href='#juneau-marshall.Transforms.TemplatedSwaps'>Templated Swaps</a></p>
<li><p class=''><a class='doclink' href='#juneau-marshall.Transforms.SurrogateClasses'>Surrogate Classes</a></p>
<li><p class=''><a class='doclink' href='#juneau-marshall.Transforms.BeanAnnotation'>@Bean Annotation</a></p>
- <li><p class='updated'><a class='doclink' href='#juneau-marshall.Transforms.BeanPropertyAnnotation'>@BeanProperty Annotation</a></p>
- <li><p class='updated'><a class='doclink' href='#juneau-marshall.Transforms.BeanConstructorAnnotation'>@BeanConstructor Annotation</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-marshall.Transforms.BeanPropertyAnnotation'>@BeanProperty Annotation</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-marshall.Transforms.BeanConstructorAnnotation'>@BeanConstructor Annotation</a></p>
<li><p class=''><a class='doclink' href='#juneau-marshall.Transforms.BeanIgnoreAnnotation'>@BeanIgnore Annotation</a></p>
<li><p class=''><a class='doclink' href='#juneau-marshall.Transforms.NamePropertyAnnotation'>@NameProperty Annotation</a></p>
<li><p class=''><a class='doclink' href='#juneau-marshall.Transforms.ParentPropertyAnnotation'>@ParentProperty Annotation</a></p>
@@ -206,9 +206,9 @@
<li><p class='toc2'><a class='doclink' href='#juneau-svl'>juneau-svl</a></p>
<ol>
<li><p class=''><a class='doclink' href='#juneau-svl.SimpleVarLanguage'>Simple Variable Language</a></p>
- <li><p class='updated'><a class='doclink' href='#juneau-svl.SvlVariables'>SVL Variables</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-svl.SvlVariables'>SVL Variables</a></p>
<li><p class=''><a class='doclink' href='#juneau-svl.VarResolvers'>VarResolvers and VarResolverSessions</a></p>
- <li><p class='new'><a class='doclink' href='#juneau-svl.DefaultVarResolver'>VarResolver.DEFAULT</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-svl.DefaultVarResolver'>VarResolver.DEFAULT</a></p>
<li><p class=''><a class='doclink' href='#juneau-svl.OtherNotes'>Other Notes</a></p>
</ol>
<li><p class='toc2'><a class='doclink' href='#juneau-config'>juneau-config</a></p>
@@ -241,7 +241,7 @@
</ol>
<li><p class=''><a class='doclink' href='#juneau-config.Listeners'>Listeners</a></p>
<li><p class=''><a class='doclink' href='#juneau-config.Serializing'>Serializing</a></p>
- <li><p class='new'><a class='doclink' href='#juneau-config.Imports'>Imports</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-config.Imports'>Imports</a></p>
<li><p class=''><a class='doclink' href='#juneau-config.ConfigStores'>Config Stores</a></p>
<ol>
<li><p class=''><a class='doclink' href='#juneau-config.ConfigStores.ConfigMemoryStore'>ConfigMemoryStore</a></p>
@@ -251,27 +251,27 @@
</ol>
<li><p class=''><a class='doclink' href='#juneau-config.ReadOnlyConfigs'>Read-only Configs</a></p>
<li><p class=''><a class='doclink' href='#juneau-config.ClosingConfigs'>Closing Configs</a></p>
- <li><p class='updated'><a class='doclink' href='#juneau-config.SystemDefaultConfig'>System Default Config</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-config.SystemDefaultConfig'>System Default Config</a></p>
</ol>
<li><p class='toc2'><a class='doclink' href='#juneau-rest-server'>juneau-rest-server</a></p>
<ol>
<li><p class=''><a class='doclink' href='#juneau-rest-server.HelloWorldExample'>Hello World Example</a></p>
- <li><p class='updated'><a class='doclink' href='#juneau-rest-server.ClassHierarchy'>Class Hierarchy</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-server.ClassHierarchy'>Class Hierarchy</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Instantiation'>Instantiation</a></p>
<ol>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Instantiation.RestServlet'>RestServlet</a></p>
- <li><p class='updated'><a class='doclink' href='#juneau-rest-server.Instantiation.BasicRestServlet'>BasicRestServlet</a></p>
- <li><p class='new'><a class='doclink' href='#juneau-rest-server.Instantiation.BasicRest'>BasicRest</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-server.Instantiation.BasicRestServlet'>BasicRestServlet</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-server.Instantiation.BasicRest'>BasicRest</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Instantiation.Children'>Children</a></p>
- <li><p class='updated'><a class='doclink' href='#juneau-rest-server.Instantiation.BasicRestServletGroup'>BasicRestServletGroup</a></p>
- <li><p class='new'><a class='doclink' href='#juneau-rest-server.Instantiation.BasicRestGroup'>BasicRestGroup</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-server.Instantiation.BasicRestServletGroup'>BasicRestServletGroup</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-server.Instantiation.BasicRestGroup'>BasicRestGroup</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Instantiation.ResourceResolvers'>Resource Resolvers</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Instantiation.LifecycleHooks'>Lifecycle Hooks</a></p>
</ol>
<li><p class=''><a class='doclink' href='#juneau-rest-server.RestResource'>@RestResource</a></p>
<ol>
<li><p class=''><a class='doclink' href='#juneau-rest-server.RestResource.AnnotationInheritance'>Annotation Inheritance</a></p>
- <li><p class='new'><a class='doclink' href='#juneau-rest-server.RestResource.RestResourcePath'>@RestResource(path)</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-server.RestResource.RestResourcePath'>@RestResource(path)</a></p>
</ol>
<li><p class=''><a class='doclink' href='#juneau-rest-server.RestContext'>RestContext</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.RestMethod'>@RestMethod</a></p>
@@ -281,7 +281,7 @@
<li><p class=''><a class='doclink' href='#juneau-rest-server.RestMethod.RestResponse'>RestResponse</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.RestMethod.RequestBody'>RequestBody</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.RestMethod.RequestHeaders'>RequestHeaders</a></p>
- <li><p class='new'><a class='doclink' href='#juneau-rest-server.RestMethod.RequestAttributes'>RequestAttributes</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-server.RestMethod.RequestAttributes'>RequestAttributes</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.RestMethod.RequestQuery'>RequestQuery</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.RestMethod.RequestFormData'>RequestFormData</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.RestMethod.RestMethodPath'>@RestMethod(path)</a></p>
@@ -299,8 +299,8 @@
<li><p class=''><a class='doclink' href='#juneau-rest-server.OpenApiSchemaPartSerializing'>OpenAPI Schema Part Serializing</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.HttpPartAnnotations'>HTTP-Part Annotations</a></p>
<ol>
- <li><p class='updated'><a class='doclink' href='#juneau-rest-server.HttpPartAnnotations.Body'>@Body</a></p>
- <li><p class='updated'><a class='doclink' href='#juneau-rest-server.HttpPartAnnotations.FormData'>@FormData</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-server.HttpPartAnnotations.Body'>@Body</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-server.HttpPartAnnotations.FormData'>@FormData</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.HttpPartAnnotations.HasFormData'>@HasFormData</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.HttpPartAnnotations.Query'>@Query</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.HttpPartAnnotations.HasQuery'>@HasQuery</a></p>
@@ -315,18 +315,18 @@
<li><p class=''><a class='doclink' href='#juneau-rest-server.HandlingMultiPartFormPosts'>Handling Multi-Part Form Posts</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Serializers'>Serializers</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Parsers'>Parsers</a></p>
- <li><p class='updated'><a class='doclink' href='#juneau-rest-server.ConfigurableProperties'>Configurable Properties</a></p>
- <li><p class='new'><a class='doclink' href='#juneau-rest-server.ConfigurableAnnotations'>Configurable Annotations</a></p>
- <li><p class='updated'><a class='doclink' href='#juneau-rest-server.Transforms'>Transforms</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-server.ConfigurableProperties'>Configurable Properties</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-server.ConfigurableAnnotations'>Configurable Annotations</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-server.Transforms'>Transforms</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.URIs'>URIs</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Guards'>Guards</a></p>
- <li><p class='new'><a class='doclink' href='#juneau-rest-server.RoleGuards'>Role guards</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-server.RoleGuards'>Role guards</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Converters'>Converters</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Messages'>Messages</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Encoders'>Encoders</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.SvlVariables'>SVL Variables</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.ConfigurationFiles'>Configuration Files</a></p>
- <li><p class=''><a class='doclink' href='#juneau-rest-server.StaticFiles'>Static files</a></p>
+ <li><p class='todo'><a class='doclink' href='#juneau-rest-server.StaticFiles'>Static files</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.ClientVersioning'>Client Versioning</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.RestInfoProvider'>RestInfoProvider</a></p>
<ol>
@@ -334,27 +334,27 @@
</ol>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Swagger'>Swagger</a></p>
<ol>
- <li><p class='updated'><a class='doclink' href='#juneau-rest-server.Swagger.BasicRestServlet'>BasicRestServlet</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-server.Swagger.BasicRestServlet'>BasicRestServlet</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Swagger.BasicSwaggerInfo'>Basic Swagger Info</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Swagger.Tags'>Tags</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Swagger.Operations'>Operations</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Swagger.Parameters'>Parameters</a></p>
- <li><p class='updated'><a class='doclink' href='#juneau-rest-server.Swagger.ParameterExamples'>Parameter Examples</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-server.Swagger.ParameterExamples'>Parameter Examples</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Swagger.Responses'>Responses</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Swagger.ResponseExamples'>Response Examples</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Swagger.Models'>Models</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.Swagger.Stylesheet'>SwaggerUI.css</a></p>
</ol>
- <li><p class='updated'><a class='doclink' href='#juneau-rest-server.HtmlDocAnnotation'>@HtmlDocConfig</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-server.HtmlDocAnnotation'>@HtmlDocConfig</a></p>
<ol>
<li><p class=''><a class='doclink' href='#juneau-rest-server.HtmlDocAnnotation.UIvsDI'>User Interfaces (UI) vs. Developer Interfaces (DI)</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.HtmlDocAnnotation.Widgets'>Widgets</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.HtmlDocAnnotation.PredefinedWidgets'>Predefined Widgets</a></p>
<li><p class=''><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.Stylesheets'>Stylesheets</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>
- <li><p class='new'><a class='doclink' href='#juneau-rest-server.LoggingAndDebugging'>Logging / Debugging</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-server.LoggingAndDebugging'>Logging / Debugging</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.HttpStatusCodes'>HTTP Status Codes</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.OverloadingHttpMethods'>Overloading HTTP Methods</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-server.BuiltInParameters'>Built-in Parameters</a></p>
@@ -371,7 +371,7 @@
<li><p class='toc2'><a class='doclink' href='#juneau-rest-server-springboot'>juneau-rest-server-springboot</a></p>
<ol>
<li><p class=''><a class='doclink' href='#juneau-rest-server-springboot.Overview'>Overview</a></p>
- <li><p class='new'><a class='doclink' href='#juneau-rest-server-springboot.ChildResources'>Child Resources</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-server-springboot.ChildResources'>Child Resources</a></p>
</ol>
<li><p class='toc2'><a class='doclink' href='#juneau-rest-client'>juneau-rest-client</a></p>
<ol>
@@ -402,10 +402,10 @@
<li><p class=''><a class='doclink' href='#juneau-rest-client.Interceptors'>Interceptors</a></p>
<li><p class=''><a class='doclink' href='#juneau-rest-client.Other'>Other Useful Methods</a></p>
</ol>
- <li><p class='new'><a class='doclink' href='#juneau-rest-mock'>juneau-rest-mock</a></p>
+ <li><p class='toc2'><a class='doclink' href='#juneau-rest-mock'>juneau-rest-mock</a></p>
<ol>
- <li><p class='new'><a class='doclink' href='#juneau-rest-mock.MockRest'>MockRest</a></p>
- <li><p class='new'><a class='doclink' href='#juneau-rest-mock.MockRemoteResource'>MockRemoteResource</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-mock.MockRest'>MockRest</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-rest-mock.MockRemoteResource'>MockRemoteResource</a></p>
</ol>
<li><p class='toc2'><a class='doclink' href='#juneau-microservice-core'>juneau-microservice-core</a></p>
<ol>
@@ -450,10 +450,9 @@
</ol>
<li><p class='toc2'><a class='doclink' href='#juneau-examples-rest'>juneau-examples-rest</a></p>
<ol>
- <li><p class='updated'><a class='doclink' href='#juneau-examples-rest.RootResources'>RootResources</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-examples-rest.RootResources'>RootResources</a></p>
<li><p class=''><a class='doclink' href='#juneau-examples-rest.HelloWorldResource'>HelloWorldResource</a></p>
- <li><p class=''><a class='doclink' href='#juneau-examples-rest.PetStoreResource'>PetStore</a></p>
- <li><p class='updated'><a class='doclink' href='#juneau-examples-rest.DtoExamples'>DtoExamples</a></p>
+ <li><p class=''><a class='doclink' href='#juneau-examples-rest.DtoExamples'>DtoExamples</a></p>
<li><p class=''><a class='doclink' href='#juneau-examples-rest.ConfigResource'>ConfigResource</a></p>
<li><p class=''><a class='doclink' href='#juneau-examples-rest.LogsResource'>LogsResource</a></p>
</ol>
@@ -597,7 +596,7 @@
<!-- ==================================================================================================== -->
-<h3 class='topic updated' onclick='toggle(this)'><a href='#Introduction.Features' id='Introduction.Features'>1.1 - Features</a></h3>
+<h3 class='topic ' onclick='toggle(this)'><a href='#Introduction.Features' id='Introduction.Features'>1.1 - Features</a></h3>
<div class='topic'><!-- START: 1.1 - Introduction.Features -->
<ul class='spaced-list'>
<li>
@@ -1469,7 +1468,7 @@
<!-- ==================================================================================================== -->
-<h4 class='topic updated' onclick='toggle(this)'><a href='#juneau-marshall.ConfigurableProperties.CommonSerializer' id='juneau-marshall.ConfigurableProperties.CommonSerializer'>2.6.2 - Common Serializer Properties</a></h4>
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-marshall.ConfigurableProperties.CommonSerializer' id='juneau-marshall.ConfigurableProperties.CommonSerializer'>2.6.2 - Common Serializer Properties</a></h4>
<div class='topic'><!-- START: 2.6.2 - juneau-marshall.ConfigurableProperties.CommonSerializer -->
<p>
In addition to the common properties above, the following properties are common to all serializers:
@@ -1544,7 +1543,7 @@
<!-- ==================================================================================================== -->
-<h3 class='topic new' onclick='toggle(this)'><a href='#juneau-marshall.ConfigurableAnnotations' id='juneau-marshall.ConfigurableAnnotations'>2.7 - Configurable Annotations</a></h3>
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-marshall.ConfigurableAnnotations' id='juneau-marshall.ConfigurableAnnotations'>2.7 - Configurable Annotations</a></h3>
<div class='topic'><!-- START: 2.7 - juneau-marshall.ConfigurableAnnotations -->
<p>
All configurable properties described in the previous section have annotation equivalents that can be applied on
@@ -1975,7 +1974,7 @@
<!-- ==================================================================================================== -->
-<h4 class='topic updated' onclick='toggle(this)'><a href='#juneau-marshall.Transforms.PojoSwaps' id='juneau-marshall.Transforms.PojoSwaps'>2.11.1 - PojoSwaps</a></h4>
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-marshall.Transforms.PojoSwaps' id='juneau-marshall.Transforms.PojoSwaps'>2.11.1 - PojoSwaps</a></h4>
<div class='topic'><!-- START: 2.11.1 - juneau-marshall.Transforms.PojoSwaps -->
<p>
{@link org.apache.juneau.transform.PojoSwap PojoSwaps} are a critical component of Juneau.
@@ -2182,7 +2181,7 @@
<!-- ==================================================================================================== -->
-<h4 class='topic new' onclick='toggle(this)'><a href='#juneau-marshall.Transforms.AutoPojoSwaps' id='juneau-marshall.Transforms.AutoPojoSwaps'>2.11.3 - Auto-detected POJO swaps</a></h4>
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-marshall.Transforms.AutoPojoSwaps' id='juneau-marshall.Transforms.AutoPojoSwaps'>2.11.3 - Auto-detected POJO swaps</a></h4>
<div class='topic'><!-- START: 2.11.3 - juneau-marshall.Transforms.AutoPojoSwaps -->
<p>
Various methods can be defined on a class directly to affect how it gets serialized.
@@ -2341,7 +2340,7 @@
<!-- ==================================================================================================== -->
-<h4 class='topic updated' onclick='toggle(this)'><a href='#juneau-marshall.Transforms.PerMediaTypePojoSwaps' id='juneau-marshall.Transforms.PerMediaTypePojoSwaps'>2.11.4 - Per-media-type PojoSwaps</a></h4>
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-marshall.Transforms.PerMediaTypePojoSwaps' id='juneau-marshall.Transforms.PerMediaTypePojoSwaps'>2.11.4 - Per-media-type PojoSwaps</a></h4>
<div class='topic'><!-- START: 2.11.4 - juneau-marshall.Transforms.PerMediaTypePojoSwaps -->
<p>
Swaps can also be defined per-media-type.
@@ -2832,7 +2831,7 @@
<!-- ==================================================================================================== -->
-<h4 class='topic updated' onclick='toggle(this)'><a href='#juneau-marshall.Transforms.BeanPropertyAnnotation' id='juneau-marshall.Transforms.BeanPropertyAnnotation'>2.11.10 - @BeanProperty Annotation</a></h4>
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-marshall.Transforms.BeanPropertyAnnotation' id='juneau-marshall.Transforms.BeanPropertyAnnotation'>2.11.10 - @BeanProperty Annotation</a></h4>
<div class='topic'><!-- START: 2.11.10 - juneau-marshall.Transforms.BeanPropertyAnnotation -->
<p>
The {@link org.apache.juneau.annotation.BeanProperty @BeanProperty} annotation is used to tailor how
@@ -3029,7 +3028,7 @@
<!-- ==================================================================================================== -->
-<h4 class='topic updated' onclick='toggle(this)'><a href='#juneau-marshall.Transforms.BeanConstructorAnnotation' id='juneau-marshall.Transforms.BeanConstructorAnnotation'>2.11.11 - @BeanConstructor Annotation</a></h4>
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-marshall.Transforms.BeanConstructorAnnotation' id='juneau-marshall.Transforms.BeanConstructorAnnotation'>2.11.11 - @BeanConstructor Annotation</a></h4>
<div class='topic'><!-- START: 2.11.11 - juneau-marshall.Transforms.BeanConstructorAnnotation -->
<p>
The {@link org.apache.juneau.annotation.BeanConstructor @BeanConstructor} annotation is used to
@@ -4378,7 +4377,7 @@
</tr>
<tr class='dark bb' style='background-color:lightyellow'>
<td style='text-align:center'>2</td>
- <td><b>Java Collections Framework objects and Java arrays</b></td>
+ <td><b>Java Collections Framework objects, Java arrays, Java Optionals</b></td>
<td> </td>
<td> </td>
<td> </td>
@@ -4388,7 +4387,7 @@
<td>
<b>With standard keys/values</b>
<br>Map keys are group [1, 4a, 6a] objects.
- <br>Map, Collection, and array values are group [1, 2, 3ac, 4a, 6a] objects.
+ <br>Map, Collection, Optional, and array values are group [1, 2, 3ac, 4a, 6a] objects.
</td>
<td>
<ul class='normal'>
@@ -4396,6 +4395,7 @@
<li><c>TreeMap<Integer,Bean></c>
<li><c>List<<jk>int</jk>[][]></c>
<li><c>Bean[]</c>
+ <li><c>Optional<Bean></c>
</ul>
</td>
<td style='background-color:lightgreen;text-align:center'><b>yes</b></td>
@@ -4412,6 +4412,7 @@
<ul class='normal'>
<li><c>HashSet<Bean,Integer></c>
<li><c>TreeMap<Integer,Reader></c>
+ <li><c>Optional<Reader></c>
</ul>
</td>
<td style='background-color:lightgreen;text-align:center'><b>yes</b></td>
@@ -9810,6 +9811,10 @@
</tr>
</table>
<p>
+ Additionally, any of the type above can also be wrapped as {@link java.util.Optional Optionals}.
+</p>
+
+<p>
For arrays, an example of "Any POJO transformable from arrays of the default types" is:
</p>
<p class='bpcode w800'>
@@ -11188,7 +11193,7 @@
<!-- ==================================================================================================== -->
-<h3 class='topic updated' onclick='toggle(this)'><a href='#juneau-svl.SvlVariables' id='juneau-svl.SvlVariables'>5.2 - SVL Variables</a></h3>
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-svl.SvlVariables' id='juneau-svl.SvlVariables'>5.2 - SVL Variables</a></h3>
<div class='topic'><!-- START: 5.2 - juneau-svl.SvlVariables -->
<p>
Variables are defined through the {@link org.apache.juneau.svl.Var} API.
@@ -11445,7 +11450,7 @@
<!-- ==================================================================================================== -->
-<h3 class='topic new' onclick='toggle(this)'><a href='#juneau-svl.DefaultVarResolver' id='juneau-svl.DefaultVarResolver'>5.4 - VarResolver.DEFAULT</a></h3>
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-svl.DefaultVarResolver' id='juneau-svl.DefaultVarResolver'>5.4 - VarResolver.DEFAULT</a></h3>
<div class='topic'><!-- START: 5.4 - juneau-svl.DefaultVarResolver -->
<p>
{@link org.apache.juneau.svl.VarResolver#DEFAULT} is a reusable variable resolver with default support for the following variables:
@@ -12635,7 +12640,7 @@
<!-- ==================================================================================================== -->
-<h3 class='topic new' onclick='toggle(this)'><a href='#juneau-config.Imports' id='juneau-config.Imports'>6.11 - Imports</a></h3>
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-config.Imports' id='juneau-config.Imports'>6.11 - Imports</a></h3>
<div class='topic'><!-- START: 6.11 - juneau-config.Imports -->
<p>
Configurations can import values from other configurations using the following syntax:
@@ -13150,7 +13155,7 @@
<!-- ==================================================================================================== -->
-<h3 class='topic updated' onclick='toggle(this)'><a href='#juneau-config.SystemDefaultConfig' id='juneau-config.SystemDefaultConfig'>6.15 - System Default Config</a></h3>
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-config.SystemDefaultConfig' id='juneau-config.SystemDefaultConfig'>6.15 - System Default Config</a></h3>
<div class='topic'><!-- START: 6.15 - juneau-config.SystemDefaultConfig -->
<p>
Each JVM has a system default config. This is a configuration file that serves as the default
@@ -13406,7 +13411,7 @@
<!-- ==================================================================================================== -->
-<h3 class='topic updated' onclick='toggle(this)'><a href='#juneau-rest-server.ClassHierarchy' id='juneau-rest-server.ClassHierarchy'>7.2 - Class Hierarchy</a></h3>
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.ClassHierarchy' id='juneau-rest-server.ClassHierarchy'>7.2 - Class Hierarchy</a></h3>
<div class='topic'><!-- START: 7.2 - juneau-rest-server.ClassHierarchy -->
<p>
The class hierarchy for the REST servlet class is shown below:
@@ -13562,7 +13567,7 @@
<!-- ==================================================================================================== -->
-<h4 class='topic updated' onclick='toggle(this)'><a href='#juneau-rest-server.Instantiation.BasicRestServlet' id='juneau-rest-server.Instantiation.BasicRestServlet'>7.3.2 - BasicRestServlet</a></h4>
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.Instantiation.BasicRestServlet' id='juneau-rest-server.Instantiation.BasicRestServlet'>7.3.2 - BasicRestServlet</a></h4>
<div class='topic'><!-- START: 7.3.2 - juneau-rest-server.Instantiation.BasicRestServlet -->
<p>
The {@link org.apache.juneau.rest.BasicRestServlet} class is a subclass of {@link org.apache.juneau.rest.RestServlet}
@@ -13751,7 +13756,7 @@
<!-- ==================================================================================================== -->
-<h4 class='topic new' onclick='toggle(this)'><a href='#juneau-rest-server.Instantiation.BasicRest' id='juneau-rest-server.Instantiation.BasicRest'>7.3.3 - BasicRest</a></h4>
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.Instantiation.BasicRest' id='juneau-rest-server.Instantiation.BasicRest'>7.3.3 - BasicRest</a></h4>
<div class='topic'><!-- START: 7.3.3 - juneau-rest-server.Instantiation.BasicRest -->
<p>
The {@link org.apache.juneau.rest.BasicRest} class is identical to the {@link org.apache.juneau.rest.BasicRestServlet} class except that
@@ -13870,7 +13875,7 @@
<!-- ==================================================================================================== -->
-<h4 class='topic updated' onclick='toggle(this)'><a href='#juneau-rest-server.Instantiation.BasicRestServletGroup' id='juneau-rest-server.Instantiation.BasicRestServletGroup'>7.3.5 - BasicRestServletGroup</a></h4>
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.Instantiation.BasicRestServletGroup' id='juneau-rest-server.Instantiation.BasicRestServletGroup'>7.3.5 - BasicRestServletGroup</a></h4>
<div class='topic'><!-- START: 7.3.5 - juneau-rest-server.Instantiation.BasicRestServletGroup -->
<p>
The {@link org.apache.juneau.rest.BasicRestServletGroup} class provides a default "router" page for
@@ -13929,7 +13934,7 @@
<!-- ==================================================================================================== -->
-<h4 class='topic new' onclick='toggle(this)'><a href='#juneau-rest-server.Instantiation.BasicRestGroup' id='juneau-rest-server.Instantiation.BasicRestGroup'>7.3.6 - BasicRestGroup</a></h4>
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.Instantiation.BasicRestGroup' id='juneau-rest-server.Instantiation.BasicRestGroup'>7.3.6 - BasicRestGroup</a></h4>
<div class='topic'><!-- START: 7.3.6 - juneau-rest-server.Instantiation.BasicRestGroup -->
<p>
The {@link org.apache.juneau.rest.BasicRestGroup} class is identical to the {@link org.apache.juneau.rest.BasicRestServletGroup} class except that
@@ -14205,7 +14210,7 @@
<!-- ==================================================================================================== -->
-<h4 class='topic new' onclick='toggle(this)'><a href='#juneau-rest-server.RestResource.RestResourcePath' id='juneau-rest-server.RestResource.RestResourcePath'>7.4.2 - @RestResource(path)</a></h4>
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.RestResource.RestResourcePath' id='juneau-rest-server.RestResource.RestResourcePath'>7.4.2 - @RestResource(path)</a></h4>
<div class='topic'><!-- START: 7.4.2 - juneau-rest-server.RestResource.RestResourcePath -->
<p>
The {@link org.apache.juneau.rest.annotation.RestResource#path() @RestResource(path)} annotation is used in the following situations:
@@ -14747,7 +14752,7 @@
<!-- ==================================================================================================== -->
-<h4 class='topic new' onclick='toggle(this)'><a href='#juneau-rest-server.RestMethod.RequestAttributes' id='juneau-rest-server.RestMethod.RequestAttributes'>7.6.6 - RequestAttributes</a></h4>
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.RestMethod.RequestAttributes' id='juneau-rest-server.RestMethod.RequestAttributes'>7.6.6 - RequestAttributes</a></h4>
<div class='topic'><!-- START: 7.6.6 - juneau-rest-server.RestMethod.RequestAttributes -->
<p>
The {@link org.apache.juneau.rest.RequestAttributes} object is the API for accessing the standard servlet attributes on an HTTP request
@@ -15271,36 +15276,36 @@
}
</p>
<ul class='javatree'>
- <li class='jp'>{@link org.apache.juneau.rest.response}
+ <li class='jp'>{@link org.apache.juneau.http.response}
<ul>
- <li class='jc'>{@link org.apache.juneau.rest.response.Accepted}
- <li class='jc'>{@link org.apache.juneau.rest.response.AlreadyReported}
- <li class='jc'>{@link org.apache.juneau.rest.response.Continue}
- <li class='jc'>{@link org.apache.juneau.rest.response.Created}
- <li class='jc'>{@link org.apache.juneau.rest.response.EarlyHints}
- <li class='jc'>{@link org.apache.juneau.rest.response.Found}
- <li class='jc'>{@link org.apache.juneau.rest.response.IMUsed}
- <li class='jc'>{@link org.apache.juneau.rest.response.MovedPermanently}
- <li class='jc'>{@link org.apache.juneau.rest.response.MultipleChoices}
- <li class='jc'>{@link org.apache.juneau.rest.response.MultiStatus}
- <li class='jc'>{@link org.apache.juneau.rest.response.NoContent}
- <li class='jc'>{@link org.apache.juneau.rest.response.NonAuthoritiveInformation}
- <li class='jc'>{@link org.apache.juneau.rest.response.NotModified}
- <li class='jc'>{@link org.apache.juneau.rest.response.Ok}
- <li class='jc'>{@link org.apache.juneau.rest.response.PartialContent}
- <li class='jc'>{@link org.apache.juneau.rest.response.PermanentRedirect}
- <li class='jc'>{@link org.apache.juneau.rest.response.Processing}
- <li class='jc'>{@link org.apache.juneau.rest.response.ResetContent}
- <li class='jc'>{@link org.apache.juneau.rest.response.SeeOther}
- <li class='jc'>{@link org.apache.juneau.rest.response.SwitchingProtocols}
- <li class='jc'>{@link org.apache.juneau.rest.response.TemporaryRedirect}
- <li class='jc'>{@link org.apache.juneau.rest.response.UseProxy}
+ <li class='jc'>{@link org.apache.juneau.http.response.Accepted}
+ <li class='jc'>{@link org.apache.juneau.http.response.AlreadyReported}
+ <li class='jc'>{@link org.apache.juneau.http.response.Continue}
+ <li class='jc'>{@link org.apache.juneau.http.response.Created}
+ <li class='jc'>{@link org.apache.juneau.http.response.EarlyHints}
+ <li class='jc'>{@link org.apache.juneau.http.response.Found}
+ <li class='jc'>{@link org.apache.juneau.http.response.IMUsed}
+ <li class='jc'>{@link org.apache.juneau.http.response.MovedPermanently}
+ <li class='jc'>{@link org.apache.juneau.http.response.MultipleChoices}
+ <li class='jc'>{@link org.apache.juneau.http.response.MultiStatus}
+ <li class='jc'>{@link org.apache.juneau.http.response.NoContent}
+ <li class='jc'>{@link org.apache.juneau.http.response.NonAuthoritiveInformation}
+ <li class='jc'>{@link org.apache.juneau.http.response.NotModified}
+ <li class='jc'>{@link org.apache.juneau.http.response.Ok}
+ <li class='jc'>{@link org.apache.juneau.http.response.PartialContent}
+ <li class='jc'>{@link org.apache.juneau.http.response.PermanentRedirect}
+ <li class='jc'>{@link org.apache.juneau.http.response.Processing}
+ <li class='jc'>{@link org.apache.juneau.http.response.ResetContent}
+ <li class='jc'>{@link org.apache.juneau.http.response.SeeOther}
+ <li class='jc'>{@link org.apache.juneau.http.response.SwitchingProtocols}
+ <li class='jc'>{@link org.apache.juneau.http.response.TemporaryRedirect}
+ <li class='jc'>{@link org.apache.juneau.http.response.UseProxy}
</ul>
</ul>
<p>
These predefined response beans are an example of {@link org.apache.juneau.http.annotation.Response @Response}-annotated
objects that are describe in detail later.
- Without going into details, this is how the {@link org.apache.juneau.rest.response.SeeOther} is defined:
+ Without going into details, this is how the {@link org.apache.juneau.http.response.SeeOther} is defined:
</p>
<p class='bpcode w800'>
<ja>@Response</ja>(
@@ -15385,41 +15390,41 @@
}
</p>
<ul class='javatree'>
- <li class='jp'>{@link org.apache.juneau.rest.exception}
+ <li class='jp'>{@link org.apache.juneau.http.exception}
<ul>
- <li class='jc'>{@link org.apache.juneau.rest.exception.BadRequest}
- <li class='jc'>{@link org.apache.juneau.rest.exception.Conflict}
- <li class='jc'>{@link org.apache.juneau.rest.exception.ExpectationFailed}
- <li class='jc'>{@link org.apache.juneau.rest.exception.FailedDependency}
- <li class='jc'>{@link org.apache.juneau.rest.exception.Forbidden}
- <li class='jc'>{@link org.apache.juneau.rest.exception.Gone}
- <li class='jc'>{@link org.apache.juneau.rest.exception.HttpVersionNotSupported}
- <li class='jc'>{@link org.apache.juneau.rest.exception.InsufficientStorage}
- <li class='jc'>{@link org.apache.juneau.rest.exception.InternalServerError}
- <li class='jc'>{@link org.apache.juneau.rest.exception.LengthRequired}
- <li class='jc'>{@link org.apache.juneau.rest.exception.Locked}
- <li class='jc'>{@link org.apache.juneau.rest.exception.LoopDetected}
- <li class='jc'>{@link org.apache.juneau.rest.exception.MethodNotAllowed}
- <li class='jc'>{@link org.apache.juneau.rest.exception.MisdirectedRequest}
- <li class='jc'>{@link org.apache.juneau.rest.exception.NetworkAuthenticationRequired}
- <li class='jc'>{@link org.apache.juneau.rest.exception.NotAcceptable}
- <li class='jc'>{@link org.apache.juneau.rest.exception.NotExtended}
- <li class='jc'>{@link org.apache.juneau.rest.exception.NotFound}
- <li class='jc'>{@link org.apache.juneau.rest.exception.NotImplemented}
- <li class='jc'>{@link org.apache.juneau.rest.exception.PayloadTooLarge}
- <li class='jc'>{@link org.apache.juneau.rest.exception.PreconditionFailed}
- <li class='jc'>{@link org.apache.juneau.rest.exception.PreconditionRequired}
- <li class='jc'>{@link org.apache.juneau.rest.exception.RangeNotSatisfiable}
- <li class='jc'>{@link org.apache.juneau.rest.exception.RequestHeaderFieldsTooLarge}
- <li class='jc'>{@link org.apache.juneau.rest.exception.ServiceUnavailable}
- <li class='jc'>{@link org.apache.juneau.rest.exception.TooManyRequests}
- <li class='jc'>{@link org.apache.juneau.rest.exception.Unauthorized}
- <li class='jc'>{@link org.apache.juneau.rest.exception.UnavailableForLegalReasons}
- <li class='jc'>{@link org.apache.juneau.rest.exception.UnprocessableEntity}
- <li class='jc'>{@link org.apache.juneau.rest.exception.UnsupportedMediaType}
- <li class='jc'>{@link org.apache.juneau.rest.exception.UpgradeRequired}
- <li class='jc'>{@link org.apache.juneau.rest.exception.UriTooLong}
- <li class='jc'>{@link org.apache.juneau.rest.exception.VariantAlsoNegotiates}
+ <li class='jc'>{@link org.apache.juneau.http.exception.BadRequest}
+ <li class='jc'>{@link org.apache.juneau.http.exception.Conflict}
+ <li class='jc'>{@link org.apache.juneau.http.exception.ExpectationFailed}
+ <li class='jc'>{@link org.apache.juneau.http.exception.FailedDependency}
+ <li class='jc'>{@link org.apache.juneau.http.exception.Forbidden}
+ <li class='jc'>{@link org.apache.juneau.http.exception.Gone}
+ <li class='jc'>{@link org.apache.juneau.http.exception.HttpVersionNotSupported}
+ <li class='jc'>{@link org.apache.juneau.http.exception.InsufficientStorage}
+ <li class='jc'>{@link org.apache.juneau.http.exception.InternalServerError}
+ <li class='jc'>{@link org.apache.juneau.http.exception.LengthRequired}
+ <li class='jc'>{@link org.apache.juneau.http.exception.Locked}
+ <li class='jc'>{@link org.apache.juneau.http.exception.LoopDetected}
+ <li class='jc'>{@link org.apache.juneau.http.exception.MethodNotAllowed}
+ <li class='jc'>{@link org.apache.juneau.http.exception.MisdirectedRequest}
+ <li class='jc'>{@link org.apache.juneau.http.exception.NetworkAuthenticationRequired}
+ <li class='jc'>{@link org.apache.juneau.http.exception.NotAcceptable}
+ <li class='jc'>{@link org.apache.juneau.http.exception.NotExtended}
+ <li class='jc'>{@link org.apache.juneau.http.exception.NotFound}
+ <li class='jc'>{@link org.apache.juneau.http.exception.NotImplemented}
+ <li class='jc'>{@link org.apache.juneau.http.exception.PayloadTooLarge}
+ <li class='jc'>{@link org.apache.juneau.http.exception.PreconditionFailed}
+ <li class='jc'>{@link org.apache.juneau.http.exception.PreconditionRequired}
+ <li class='jc'>{@link org.apache.juneau.http.exception.RangeNotSatisfiable}
+ <li class='jc'>{@link org.apache.juneau.http.exception.RequestHeaderFieldsTooLarge}
+ <li class='jc'>{@link org.apache.juneau.http.exception.ServiceUnavailable}
+ <li class='jc'>{@link org.apache.juneau.http.exception.TooManyRequests}
+ <li class='jc'>{@link org.apache.juneau.http.exception.Unauthorized}
+ <li class='jc'>{@link org.apache.juneau.http.exception.UnavailableForLegalReasons}
+ <li class='jc'>{@link org.apache.juneau.http.exception.UnprocessableEntity}
+ <li class='jc'>{@link org.apache.juneau.http.exception.UnsupportedMediaType}
+ <li class='jc'>{@link org.apache.juneau.http.exception.UpgradeRequired}
+ <li class='jc'>{@link org.apache.juneau.http.exception.UriTooLong}
+ <li class='jc'>{@link org.apache.juneau.http.exception.VariantAlsoNegotiates}
</ul>
</ul>
<p>
@@ -16202,7 +16207,7 @@
<!-- ==================================================================================================== -->
-<h4 class='topic updated' onclick='toggle(this)'><a href='#juneau-rest-server.HttpPartAnnotations.Body' id='juneau-rest-server.HttpPartAnnotations.Body'>7.10.1 - @Body</a></h4>
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.HttpPartAnnotations.Body' id='juneau-rest-server.HttpPartAnnotations.Body'>7.10.1 - @Body</a></h4>
<div class='topic'><!-- START: 7.10.1 - juneau-rest-server.HttpPartAnnotations.Body -->
<p>
The {@link org.apache.juneau.http.annotation.Body @Body} annotation is used to identify POJOs to be used as the body of an HTTP request.
@@ -16287,6 +16292,8 @@
<li><c><jk>public static</jk> T <jsm>forString</jsm>(String in) {...}</c>
</ul>
Note that this also includes all enums.
+ <li>
+ Any {@link java.util.Optional} of anything on this list.
</ol>
<p>
The {@link org.apache.juneau.oapi.OpenApiSerializer} class can be used to serialize HTTP bodies to OpenAPI-based output.
@@ -16396,7 +16403,7 @@
<!-- ==================================================================================================== -->
-<h4 class='topic updated' onclick='toggle(this)'><a href='#juneau-rest-server.HttpPartAnnotations.FormData' id='juneau-rest-server.HttpPartAnnotations.FormData'>7.10.2 - @FormData</a></h4>
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.HttpPartAnnotations.FormData' id='juneau-rest-server.HttpPartAnnotations.FormData'>7.10.2 - @FormData</a></h4>
<div class='topic'><!-- START: 7.10.2 - juneau-rest-server.HttpPartAnnotations.FormData -->
<p>
The {@link org.apache.juneau.http.annotation.FormData @FormData} annotation is used to retrieve request form post entries.
@@ -17371,7 +17378,7 @@
}
</p>
<p>
- Custom exceptions can also extend from one of the predefined HTTP exceptions such as the {@link org.apache.juneau.rest.exception.Unauthorized} exception:
+ Custom exceptions can also extend from one of the predefined HTTP exceptions such as the {@link org.apache.juneau.http.exception.Unauthorized} exception:
</p>
<p class='bpcode w800'>
<jc>// Our annotated exception.</jc>
@@ -18106,7 +18113,7 @@
<!-- ==================================================================================================== -->
-<h3 class='topic updated' onclick='toggle(this)'><a href='#juneau-rest-server.ConfigurableProperties' id='juneau-rest-server.ConfigurableProperties'>7.15 - Configurable Properties</a></h3>
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.ConfigurableProperties' id='juneau-rest-server.ConfigurableProperties'>7.15 - Configurable Properties</a></h3>
<div class='topic'><!-- START: 7.15 - juneau-rest-server.ConfigurableProperties -->
<p>
As shown in previous sections, Juneau serializers and parsers are highly-configurable through properties.
@@ -18192,7 +18199,7 @@
<!-- ==================================================================================================== -->
-<h3 class='topic new' onclick='toggle(this)'><a href='#juneau-rest-server.ConfigurableAnnotations' id='juneau-rest-server.ConfigurableAnnotations'>7.16 - Configurable Annotations</a></h3>
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.ConfigurableAnnotations' id='juneau-rest-server.ConfigurableAnnotations'>7.16 - Configurable Annotations</a></h3>
<div class='topic'><!-- START: 7.16 - juneau-rest-server.ConfigurableAnnotations -->
<p>
Config annotations allow you to define serializer and parser properties using specialized annotations.
@@ -18255,7 +18262,7 @@
<!-- ==================================================================================================== -->
-<h3 class='topic updated' onclick='toggle(this)'><a href='#juneau-rest-server.Transforms' id='juneau-rest-server.Transforms'>7.17 - Transforms</a></h3>
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.Transforms' id='juneau-rest-server.Transforms'>7.17 - Transforms</a></h3>
<div class='topic'><!-- START: 7.17 - juneau-rest-server.Transforms -->
<p>
The Juneau serializers and parsers can be configured on how to handle POJOs through the use of Transforms.
@@ -18477,7 +18484,7 @@
<!-- ==================================================================================================== -->
-<h3 class='topic new' onclick='toggle(this)'><a href='#juneau-rest-server.RoleGuards' id='juneau-rest-server.RoleGuards'>7.20 - Role guards</a></h3>
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.RoleGuards' id='juneau-rest-server.RoleGuards'>7.20 - Role guards</a></h3>
<div class='topic'><!-- START: 7.20 - juneau-rest-server.RoleGuards -->
<p>
Specialized guards are provided for controlling access to servlet classes and methods based on user roles.
@@ -18505,7 +18512,7 @@
// can run any methods on this class.</jc>
<ja>@RestResource</ja>(
path=<js>"/foo"</js>,
- roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
+ roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
)
<jk>public class</jk> MyResource <jk>extends</jk> RestServlet {
...
@@ -18520,8 +18527,8 @@
<li><js>"foo | bar | baz"</js> - Multiple OR'ed arguments, pipe syntax.
<li><js>"foo || bar || baz"</js> - Multiple OR'ed arguments, Java-OR syntax.
<li><js>"fo*"</js> - Patterns including <js>'*'</js> and <js>'?'</js>.
- <li><js>"fo* & *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
- <li><js>"fo* && *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
+ <li><js>"fo* & *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
+ <li><js>"fo* && *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
<li><js>"fo* || (*oo || bar)"</js> - Parenthesis.
</ul>
@@ -18535,7 +18542,7 @@
<p class='bpcode w800'>
<ja>@RestResource</ja>(
rolesDeclared=<js>"ROLE_ADMIN,ROLE_READ_WRITE,ROLE_READ_ONLY,ROLE_SPECIAL"</js>,
- roleGuard=<js>"ROLE_ADMIN || (*WRITE* && *SPECIAL*)"</js>
+ roleGuard=<js>"ROLE_ADMIN || (*WRITE* && *SPECIAL*)"</js>
)
<jk>public class</jk> MyResource <jk>extends</jk> RestServlet {
...
@@ -19181,7 +19188,7 @@
<!-- ==================================================================================================== -->
-<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.StaticFiles' id='juneau-rest-server.StaticFiles'>7.26 - Static files</a></h3>
+<h3 class='topic todo' onclick='toggle(this)'><a href='#juneau-rest-server.StaticFiles' id='juneau-rest-server.StaticFiles'>7.26 - Static files</a></h3>
<div class='topic'><!-- START: 7.26 - juneau-rest-server.StaticFiles -->
<p>
The {@link org.apache.juneau.rest.annotation.RestResource#staticFiles @RestResource(staticFiles)}
@@ -19368,7 +19375,7 @@
<!-- ==================================================================================================== -->
-<h4 class='topic updated' onclick='toggle(this)'><a href='#juneau-rest-server.Swagger.BasicRestServlet' id='juneau-rest-server.Swagger.BasicRestServlet'>7.29.1 - BasicRestServlet</a></h4>
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.Swagger.BasicRestServlet' id='juneau-rest-server.Swagger.BasicRestServlet'>7.29.1 - BasicRestServlet</a></h4>
<div class='topic'><!-- START: 7.29.1 - juneau-rest-server.Swagger.BasicRestServlet -->
<p>
Any subclass of {@link org.apache.juneau.rest.BasicRestServlet} gets an auto-generated Swagger UI when performing an <c>OPTIONS</c>
@@ -19900,7 +19907,7 @@
<!-- ==================================================================================================== -->
-<h4 class='topic updated' onclick='toggle(this)'><a href='#juneau-rest-server.Swagger.ParameterExamples' id='juneau-rest-server.Swagger.ParameterExamples'>7.29.6 - Parameter Examples</a></h4>
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.Swagger.ParameterExamples' id='juneau-rest-server.Swagger.ParameterExamples'>7.29.6 - Parameter Examples</a></h4>
<div class='topic'><!-- START: 7.29.6 - juneau-rest-server.Swagger.ParameterExamples -->
<p>
The <c>model</c> select box in the parameters can be expanded to show examples:
@@ -20507,7 +20514,7 @@
<!-- ==================================================================================================== -->
-<h3 class='topic updated' onclick='toggle(this)'><a href='#juneau-rest-server.HtmlDocAnnotation' id='juneau-rest-server.HtmlDocAnnotation'>7.30 - @HtmlDocConfig</a></h3>
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.HtmlDocAnnotation' id='juneau-rest-server.HtmlDocAnnotation'>7.30 - @HtmlDocConfig</a></h3>
<div class='topic'><!-- START: 7.30 - juneau-rest-server.HtmlDocAnnotation -->
<p>
The {@link org.apache.juneau.html.annotation.HtmlDocConfig @HtmlDocConfig} annotation is used to customize the HTML
@@ -21181,7 +21188,7 @@
<!-- ==================================================================================================== -->
-<h4 class='topic updated' onclick='toggle(this)'><a href='#juneau-rest-server.HtmlDocAnnotation.Stylesheets' id='juneau-rest-server.HtmlDocAnnotation.Stylesheets'>7.30.5 - Stylesheets</a></h4>
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.HtmlDocAnnotation.Stylesheets' id='juneau-rest-server.HtmlDocAnnotation.Stylesheets'>7.30.5 - Stylesheets</a></h4>
<div class='topic'><!-- START: 7.30.5 - juneau-rest-server.HtmlDocAnnotation.Stylesheets -->
<p>
The sample root page renders in the default "devops" look-and-feel:
@@ -21344,7 +21351,7 @@
<!-- ==================================================================================================== -->
-<h3 class='topic new' onclick='toggle(this)'><a href='#juneau-rest-server.LoggingAndDebugging' id='juneau-rest-server.LoggingAndDebugging'>7.32 - Logging / Debugging</a></h3>
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.LoggingAndDebugging' id='juneau-rest-server.LoggingAndDebugging'>7.32 - Logging / Debugging</a></h3>
<div class='topic'><!-- START: 7.32 - juneau-rest-server.LoggingAndDebugging -->
<p>
The REST APIs provides support for fine-tuned control of logging for HTTP requests and responses.
@@ -22354,7 +22361,7 @@
<!-- ==================================================================================================== -->
-<h3 class='topic new' onclick='toggle(this)'><a href='#juneau-rest-server-springboot.ChildResources' id='juneau-rest-server-springboot.ChildResources'>9.2 - Child Resources</a></h3>
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server-springboot.ChildResources' id='juneau-rest-server-springboot.ChildResources'>9.2 - Child Resources</a></h3>
<div class='topic'><!-- START: 9.2 - juneau-rest-server-springboot.ChildResources -->
<p>
When using the <ja>@JuneauRestRoot</ja> annotation, servlet are given an instance of {@link org.apache.juneau.rest.springboot.SpringRestResourceResolver}.
@@ -22638,10 +22645,10 @@
post parameters, or request/response bodies.
</p>
<ul class='javatree'>
- <li class='jp'>{@link org.apache.juneau.rest.client.remote}
+ <li class='jp'>{@link org.apache.juneau.http.remote}
<ul>
- <li class='ja'>{@link org.apache.juneau.rest.client.remote.RemoteResource}
- <li class='ja'>{@link org.apache.juneau.rest.client.remote.RemoteMethod}
+ <li class='ja'>{@link org.apache.juneau.http.remote.RemoteResource}
+ <li class='ja'>{@link org.apache.juneau.http.remote.RemoteMethod}
</ul>
<li class='jp'>{@link org.apache.juneau.http.annotation}
<ul>
@@ -22696,13 +22703,13 @@
<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-client.RestProxies.RemoteResource' id='juneau-rest-client.RestProxies.RemoteResource'>10.1.1 - @RemoteResource</a></h4>
<div class='topic'><!-- START: 10.1.1 - juneau-rest-client.RestProxies.RemoteResource -->
<p>
- The {@link org.apache.juneau.rest.client.remote.RemoteResource @RemoteResource} annotation is used on your interface class
+ The {@link org.apache.juneau.http.remote.RemoteResource @RemoteResource} annotation is used on your interface class
to identify it as a REST proxy interface.
</p>
<ul class='javatree'>
- <li class='ja'>{@link org.apache.juneau.rest.client.remote.RemoteResource}
+ <li class='ja'>{@link org.apache.juneau.http.remote.RemoteResource}
<ul>
- <li class='jf'>{@link org.apache.juneau.rest.client.remote.RemoteResource#path path}
+ <li class='jf'>{@link org.apache.juneau.http.remote.RemoteResource#path path}
</ul>
</ul>
<p>
@@ -22711,7 +22718,7 @@
<h5 class='topic'>@RemoteResource(path)</h5>
<p>
- The {@link org.apache.juneau.rest.client.remote.RemoteResource#path @RemoteResource(path)} annotation is used to define the
+ The {@link org.apache.juneau.http.remote.RemoteResource#path @RemoteResource(path)} annotation is used to define the
HTTP path of the REST service.
</p>
<p>
@@ -22756,15 +22763,15 @@
<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-client.RestProxies.RemoteMethod' id='juneau-rest-client.RestProxies.RemoteMethod'>10.1.2 - @RemoteMethod</a></h4>
<div class='topic'><!-- START: 10.1.2 - juneau-rest-client.RestProxies.RemoteMethod -->
<p>
- The {@link org.apache.juneau.rest.client.remote.RemoteMethod @RemoteMethod} annotation is applied to methods
+ The {@link org.apache.juneau.http.remote.RemoteMethod @RemoteMethod} annotation is applied to methods
of <ja>@RemoteResource</ja>-annotated interfaces to identify REST endpoints.
</p>
<ul class='javatree'>
- <li class='ja'>{@link org.apache.juneau.rest.client.remote.RemoteMethod}
+ <li class='ja'>{@link org.apache.juneau.http.remote.RemoteMethod}
<ul>
- <li class='jf'>{@link org.apache.juneau.rest.client.remote.RemoteMethod#method method}
- <li class='jf'>{@link org.apache.juneau.rest.client.remote.RemoteMethod#path path}
- <li class='jf'>{@link org.apache.juneau.rest.client.remote.RemoteMethod#returns returns}
+ <li class='jf'>{@link org.apache.juneau.http.remote.RemoteMethod#method method}
+ <li class='jf'>{@link org.apache.juneau.http.remote.RemoteMethod#path path}
+ <li class='jf'>{@link org.apache.juneau.http.remote.RemoteMethod#returns returns}
</ul>
</ul>
<h5 class='topic'>@RemoteMethod(method/path)</h5>
@@ -22886,8 +22893,8 @@
</ul>
<p>
- If you're only interested in the HTTP status code of the response, you can use the {@link org.apache.juneau.rest.client.remote.RemoteMethod#returns() returns}
- annotation with a value of {@link org.apache.juneau.rest.client.remote.RemoteReturn#STATUS STATUS}:
+ If you're only interested in the HTTP status code of the response, you can use the {@link org.apache.juneau.http.remote.RemoteMethod#returns() returns}
+ annotation with a value of {@link org.apache.juneau.http.remote.RemoteReturn#STATUS STATUS}:
</p>
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
@@ -24338,7 +24345,7 @@
<!-- ==================================================================================================== -->
-<h2 class='topic new' onclick='toggle(this)'><a href='#juneau-rest-mock' id='juneau-rest-mock'>11 - juneau-rest-mock</a></h2>
+<h2 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-mock' id='juneau-rest-mock'>11 - juneau-rest-mock</a></h2>
<div class='topic'><!-- START: 11 - juneau-rest-mock -->
<h5 class='figure'>Maven Dependency</h5>
<p class='bpcode w500'>
@@ -24373,13 +24380,13 @@
<li class='jp'>{@link org.apache.juneau.rest.mock2}
<ul>
<li class='jc'>{@link org.apache.juneau.rest.mock2.MockRest} - API for unit testing {@link org.apache.juneau.rest.annotation.RestResource @RestResource}-annotated classes.
- <li class='jc'>{@link org.apache.juneau.rest.mock2.MockRemoteResource} - API for unit testing {@link org.apache.juneau.rest.client.remote.RemoteResource @RemoteResource}-annotated classes.
+ <li class='jc'>{@link org.apache.juneau.rest.mock2.MockRemoteResource} - API for unit testing {@link org.apache.juneau.http.remote.RemoteResource @RemoteResource}-annotated classes.
</ul>
</ul>
<!-- ==================================================================================================== -->
-<h3 class='topic new' onclick='toggle(this)'><a href='#juneau-rest-mock.MockRest' id='juneau-rest-mock.MockRest'>11.1 - MockRest</a></h3>
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-mock.MockRest' id='juneau-rest-mock.MockRest'>11.1 - MockRest</a></h3>
<div class='topic'><!-- START: 11.1 - juneau-rest-mock.MockRest -->
<p>
The {@link org.apache.juneau.rest.mock2.MockRest} class is used for performing serverless unit testing of {@link org.apache.juneau.rest.annotation.RestResource @RestResource}-annotated
@@ -24641,10 +24648,10 @@
<!-- ==================================================================================================== -->
-<h3 class='topic new' onclick='toggle(this)'><a href='#juneau-rest-mock.MockRemoteResource' id='juneau-rest-mock.MockRemoteResource'>11.2 - MockRemoteResource</a></h3>
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-mock.MockRemoteResource' id='juneau-rest-mock.MockRemoteResource'>11.2 - MockRemoteResource</a></h3>
<div class='topic'><!-- START: 11.2 - juneau-rest-mock.MockRemoteResource -->
<p>
- The {@link org.apache.juneau.rest.mock2.MockRemoteResource} class is used for serverless unit testing of {@link org.apache.juneau.rest.client.remote.RemoteResource @RemoteResource}-annotated
+ The {@link org.apache.juneau.rest.mock2.MockRemoteResource} class is used for serverless unit testing of {@link org.apache.juneau.http.remote.RemoteResource @RemoteResource}-annotated
classes.
</p>
<p>
@@ -27087,7 +27094,7 @@
<!-- ==================================================================================================== -->
-<h3 class='topic updated' onclick='toggle(this)'><a href='#juneau-examples-rest.RootResources' id='juneau-examples-rest.RootResources'>17.1 - RootResources</a></h3>
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-examples-rest.RootResources' id='juneau-examples-rest.RootResources'>17.1 - RootResources</a></h3>
<div class='topic'><!-- START: 17.1 - juneau-examples-rest.RootResources -->
<p>
The <l>RootResources</l> class is the main page for the REST microservice.
@@ -27300,1376 +27307,8 @@
<!-- ==================================================================================================== -->
-<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-examples-rest.PetStoreResource' id='juneau-examples-rest.PetStoreResource'>17.3 - PetStore</a></h3>
-<div class='topic'><!-- START: 17.3 - juneau-examples-rest.PetStoreResource -->
-<p>
- The <c>PetStore</c> application is an functional application meant to demonstrate the following:
-</p>
-<ul class='spaced-list'>
- <li>
- Creating a Juneau-based REST interface on top of JPA beans.
- <li>
- Creating sophisticated Swagger UI using only annotations.
-</ul>
-<p>
- When you click the <l>petstore</l> link on the home page of the examples app, you should see this page:
-</p>
-<p class='bpcode w800'>
- http://localhost:10000/petstore
-</p>
-<img class='bordered w800' src='doc-files/juneau-examples-rest.PetStoreResource.1.png'>
-
-<p>
- The contents of this page is primarily defined via annotations defined on the <l>PetStoreResource</l> class:
-</p>
-
-<h5 class='figure'>PetStoreResource.java</h5>
-<p class='bpcode w800'>
- <ja>@RestResource</ja>(
- path=<js><js>"/petstore"</js></js>,
- title=<js><js>"Petstore application"</js></js>,
- description= {
- <js><js>"This is a sample server Petstore server based on the Petstore sample at Swagger.io."</js></js>,
- <js>"You can find out more about Swagger at <a class='link' href='http://swagger.io'>http://swagger.io</a>."</js>,
- },
- htmldoc=<ja>@HtmlDoc</ja>(
- widgets={
- ContentTypeMenuItem.<jk>class</jk>,
- ThemeMenuItem.<jk>class</jk>,
- },
- navlinks={
- <js>"up: request:/.."</js>,
- <js>"options: servlet:/?method=OPTIONS"</js>,
- <js>"$W{ContentTypeMenuItem}"</js>,
- <js>"$W{ThemeMenuItem}"</js>,
- <js>"source: $C{Source/gitHub}/org/apache/juneau/examples/rest/petstore/$R{servletClassSimple}.java"</js>
- },
- head={
- <js>"<link rel='icon' href='$U{servlet:/htdocs/cat.png}'/>"</js> <jc>// Add a cat icon to the page.</jc>
- },
- header={
- <js>"<h1>$R{resourceTitle}</h1>"</js>,
- <js>"<h2>$R{methodSummary}</h2>"</js>,
- <js>"$C{PetStore/headerImage}"</js>
- },
- aside={
- <js>"<div style='max-width:400px' class='text'>"</js>,
- <js>" <p>This page shows a standard nested REST resource.</p>"</js>,
- <js>" <p>It shows how different properties can be rendered on the same bean in different views.</p>"</js>,
- <js>" <p>It also shows examples of HtmlRender classes and @BeanProperty(format) annotations.</p>"</js>,
- <js>" <p>It also shows how the Queryable converter and query widget can be used to create searchable interfaces.</p>"</js>,
- <js>"</div>"</js>
- },
- stylesheet=<js>"servlet:/htdocs/themes/dark.css"</js> <jc>// Use dark theme by default.</jc>
- ),
- ...
- staticFiles={<js>"htdocs:htdocs"</js>}, <jc>// Expose static files in htdocs subpackage.</jc>
- children={
- SqlQueryResource.<jk>class</jk>,
- PhotosResource.<jk>class</jk>
- }
- )
- <jk>public class</jk> PetStoreResource <jk>extends</jk> BasicRestJena {
-</p>
-<p>
- The inner contents of the page are generated from this method which is used to define a jumping-off
- page for the application:
-</p>
-<h5 class='figure'>PetStoreResource.java</h5>
-<p class='bpcode w800'>
- <ja>@RestMethod</ja>(
- name=<jsf>GET</jsf>,
- path=<js>"/"</js>,
- summary=<js>"Navigation page"</js>,
- htmldoc=<ja>@HtmlDoc</ja>(
- style={
- <js>"INHERIT"</js>, <jc>// Flag for inheriting resource-level CSS.</jc>
- <js>"body { "</js>,
- <js>"background-image: url('petstore/htdocs/background.jpg'); "</js>,
- <js>"background-color: black; "</js>,
- <js>"background-size: cover; "</js>,
- <js>"background-attachment: fixed; "</js>,
- <js>"}"</js>
- }
- )
- )
- <jk>public</jk> ResourceDescriptions getTopPage() {
- <jk>return new</jk> ResourceDescriptions()
- .append(<js>"pet"</js>, <js>"All pets in the store"</js>)
- .append(<js>"store"</js>, <js>"Orders and inventory"</js>)
- .append(<js>"user"</js>, <js>"Petstore users"</js>)
- .append(<js>"photos"</js>, <js>"Photos service"</js>)
- .append(<js>"sql"</js>, <js>"SQL query service"</js>)
- ;
- }
-</p>
-<p>
- Note how we used the <ja>@HtmlDoc</ja> annotation to add some CSS to our page
- that renders our background image.
-</p>
-<p>
- The {@link org.apache.juneau.rest.helper.ResourceDescriptions} class used above is a convenience class for creating
- hyperlinks to child resources.
-</p>
-<hr>
-<p>
- The application itself is defined in 3 packages:
-</p>
-<ul class='javatree'>
- <li class='jp'><c>org.apache.juneau.rest.examples.rest.petstore</c>
- <br>Defines the service for storing and retrieving Petstore data.
- <br><img class='bordered' style='width:250px' src='doc-files/juneau-examples-rest.PetStoreResource.2a.png'>
- <li class='jp'><c>org.apache.juneau.rest.examples.rest.petstore.dto</c>
- <br>Data transfer objects.
- <br>These are JPA beans that are used both to store data in our database and are serialized
- directly by our REST interface.
- <br><img class='bordered' style='width:250px' src='doc-files/juneau-examples-rest.PetStoreResource.2b.png'>
- <li class='jp'><c>org.apache.juneau.rest.examples.rest.petstore.rest</c>
- <br>The classes used for our REST interface.
- <br><img class='bordered' style='width:250px' src='doc-files/juneau-examples-rest.PetStoreResource.2c.png'>
-</ul>
-<p>
- We also define some static files in the <c>org.apache.juneau.rest.examples.rest.petstore</c> package:
-</p>
-<img class='bordered' style='width:250px' src='doc-files/juneau-examples-rest.PetStoreResource.2d.png'>
-<hr>
-<p>
- The <l>PetStoreService</l> class is a pretty-straightforward service for storing and retrieving JPA beans:
-</p>
-<h5 class='figure'>PetStoreService.java</h5>
-<p class='bpcode w800'>
- <jk>public class</jk> PetStoreService <jk>extends</jk> AbstractPersistenceService {
-
- <jk>public</jk> Pet getPet(<jk>long</jk> id) <jk>throws</jk> IdNotFound {
- <jk>return</jk> find(Pet.<jk>class</jk>, id);
- }
-
- <jk>public</jk> List<Pet> getPets() {
- <jk>return</jk> query(<js>"select X from PetstorePet X"</js>, Pet.<jk>class</jk>, (SearchArgs)<jk>null</jk>);
- }
-
- <jk>public</jk> Pet create(CreatePet c) {
- <jk>return</jk> merge(new Pet().status(PetStatus.<jsf>AVAILABLE</jsf>).apply(c));
- }
-
- <jk>public</jk> Pet update(UpdatePet u) <jk>throws</jk> IdNotFound {
- EntityManager em = getEntityManager();
- <jk>return</jk> merge(em, find(em, Pet.<jk>class</jk>, u.getId()).apply(u));
- }
-
- <jk>public void</jk> removePet(<jk>long</jk> id) <jk>throws</jk> IdNotFound {
- EntityManager em = getEntityManager();
- remove(em, find(em, Pet.<jk>class</jk>, id));
- }
-
- ...
- }
-</p>
-<p>
- The DTOs are simply beans that combine both JPA and Juneau bean annotations:
-</p>
-<h5 class='figure'>Pet.java</h5>
-<p class='bpcode w800'>
- <ja>@Bean</ja>(typeName=<js>"Pet"</js>, fluentSetters=<jk>true</jk>, properties=<js>"id,species,name,tags,price,status,photo"</js>)
- <ja>@Entity</ja>(name=<js>"PetstorePet"</js>)
- <jk>public class</jk> Pet {
-
- <ja>@Column @Id @GeneratedValue</ja>
- <ja>@Schema</ja>(description=<js>"Unique identifier for this pet."</js>)
- <ja>@Html</ja>(link=<js>"servlet:/pet/{id}"</js>)
- <jk>private long</jk> <jf>id</jf>;
-
- <ja>@Column</ja>(length=50)
- <ja>@Schema</ja>(description=<js>"Pet name."</js>, minLength=3, maxLength=50)
- <jk>private</jk> String <jf>name</jf>;
-
- ...
-
- <jk>public long</jk> getId() {
- <jk>return</jk> <jf>id</jf>;
- }
-
- <jk>public</jk> Pet id(<jk>long</jk> id) {
- <jk>this</jk>.<jf>id</jf> = id;
- <jk>return this</jk>;
- }
-
- <jk>public</jk> String getName() {
- <jk>return</jk> <jf>name</jf>;
- }
-
- <jk>public</jk> Pet name(String name) {
- <jk>this</jk>.<jf>name</jf> = name;
- <jk>return this</jk>;
- }
-
- ...
- }
-</p>
-<p>
- The beans are found by JPA by adding them to the JPA persistence file.
-</p>
-<h5 class='figure'>META-INF/persistence.xml</h5>
-<p class='bpcode w800'>
- <xt><persistence></xt>
- <xt><persistence-unit</xt> <xa>name</xa>=<xs>"test"</xs> <xa>transaction-type</xa>=<xs>"RESOURCE_LOCAL"</xs>></xt>
- <xt><class></xt>org.apache.juneau.examples.rest.petstore.dto.Pet<xt></class></xt>
- <xt><class></xt>org.apache.juneau.examples.rest.petstore.dto.Order<xt></class></xt>
- <xt><class></xt>org.apache.juneau.examples.rest.petstore.dto.User<xt></class></xt>
- <xt><properties></xt>
- <xt><property</xt> <xa>name</xa>=<xs>"javax.persistence.jdbc.driver"</xs> <xa>value</xa>=<xs>"org.apache.derby.jdbc.EmbeddedDriver"</xs> <xt>/></xt>
- <xt><property</xt> <xa>name</xa>=<xs>"javax.persistence.jdbc.url"</xs> <xa>value</xa>=<xs>"jdbc:derby:target/derby/testDB;create=true"</xs> <xt>/></xt>
- <xt><property</xt> <xa>name</xa>=<xs>"javax.persistence.jdbc.user"</xs> <xa>value</xa>=<xs>""</xs> <xt>/></xt>
- <xt><property</xt> <xa>name</xa>=<xs>"javax.persistence.jdbc.password"</xs> <xa>value</xa>=<xs>""</xs> <xt>/></xt>
- <xt><property</xt> <xa>name</xa>=<xs>"hibernate.dialect"</xs> <xa>value</xa>=<xs>"org.hibernate.dialect.DerbyDialect"</xs> <xt>/></xt>
- <xt><property</xt> <xa>name</xa>=<xs>"hibernate.hbm2ddl.auto"</xs> <xa>value</xa>=<xs>"create-drop"</xs> <xt>/></xt>
- <xt><property</xt> <xa>name</xa>=<xs>"show_sql"</xs> <xa>value</xa>=<xs>"true"</xs> <xt>/></xt>
- <xt><property</xt> <xa>name</xa>=<xs>"hibernate.temp.use_jdbc_metadata_defaults"</xs> <xa>value</xa>=<xs>"false"</xs> <xt>/></xt>
- <xt></properties></xt>
- <xt></persistence-unit></xt>
- <xt></persistence></xt>
-</p>
-<p>
- The Petstore service is instantiated in our REST interface using a hook.
- Note that a real-world scenario would likely use some other means such as injection.
-</p>
-<h5 class='figure'>PetStoreResource.java</h5>
-<p class='bpcode w800'>
- <jk>public class</jk> PetStoreResource <jk>extends</jk> BasicRestJena <jk>implements</jk> PetStore {
-
- <jk>private</jk> PetStoreService <jf>store</jf>;
-
- <ja>@RestHook</ja>(<jsf>INIT</jsf>)
- <jk>public void</jk> startup(RestContextBuilder builder) <jk>throws</jk> Exception {
- <jf>store</jf> = <jk>new</jk> PetStoreService();
- }
-
- ...
-</p>
-<hr>
-<p>
- The Petstore database is empty by default.
- The <l>INIT</l> link brings you to a page to initialize the contents of the database
- from sample data:
-</p>
-<p class='bpcode w800'>
- http://localhost:10000/petstore/init
-</p>
-<img class='bordered w800' src='doc-files/juneau-examples-rest.PetStoreResource.3a.png'>
-<p>
- You can try loading the Petstore database using direct JPA or via REST calls through a client-side proxy.
-</p>
-<img class='bordered w800' src='doc-files/juneau-examples-rest.PetStoreResource.3b.png'>
-<p>
- The initialize page is rendered using the following methods in our <l>PetStoreResource</l> class.
- Note that we're using HTML5 beans to render the contents of the page, and
- the use of a direct unbuffered writer allowing for the creation
- of a console-like window in an iframe.
-</p>
-<h5 class='figure'>PetStoreResource.java</h5>
-<p class='bpcode w800'>
- <ja>@RestMethod</ja>(
- summary=<js>"Initialize database form entry page"</js>
- )
- <jk>public</jk> Div getInit() {
- <jk>return</jk> <jsm>div</jsm>(
- <jsm>form</jsm>(<js>"servlet:/init"</js>).method(<jsf>POST</jsf>).target(<js>"buf"</js>).children(
- <jsm>table</jsm>(
- <jsm>tr</jsm>(
- <jsm>th</jsm>(<js>"Initialize petstore database:"</js>),
- <jsm>td</jsm>(<jsm>input</jsm>(<js>"radio"</js>).name(<js>"init-method"</js>).value(<js>"direct"</js>).checked(<jk>true</jk>), <js>"direct"</js>, <jsm>input</jsm>(<js>"radio"</js>).name(<js>"init-method"</js>).value(<js>"rest"</js>), <js>"rest"</js>),
- <jsm>td</jsm>(<jsm>button</jsm>(<js>"submit"</js>, <js>"Submit"</js>).style(<js>"float:right"</js>).onclick(<js>"scrolling=true"</js>))
- )
- )
- ),
- <jsm>br</jsm>(),
- <jsm>iframe</jsm>().id(<js>"buf"</js>).name(<js>"buf"</js>).style(<js>"width:800px;height:600px;"</js>).onload(<js>"window.parent.scrolling=false;"</js>),
- <jsm>script</jsm>(<js>"text/javascript"</js>,
- <js>"var scrolling = false;"</js>,
- <js>"function scroll() { if (scrolling) { document.getElementById('buf').contentWindow.scrollBy(0,50); } setTimeout('scroll()',200); } "</js>,
- <js>"scroll();"</js>
- )
- );
- }
-
- <ja>@RestMethod</ja>(
- summary=<js>"Initialize database"</js>
- )
- <jk>public void</jk> postInit(
- <ja>@FormData</ja>(<js>"init-method"</js>) String initMethod,
- RestResponse res
- ) <jk>throws</jk> Exception {
- res.setHeader(<js>"Content-Encoding"</js>, <js>"identity"</js>);
- <jk>if</jk> (<js>"direct"</js>.equals(initMethod))
- <jf>store</jf>.initDirect(res.getDirectWriter(<js>"text/plain"</js>));
- <jk>else</jk>
- <jf>store</jf>.initViaRest(res.getDirectWriter(<js>"text/plain"</js>));
- }
-</p>
-<p>
- The direct initialization uses direct JPA to store beans in the database.
- The following code in <l>PetStoreService</l> reads and parses DTOs from our init JSON files (e.g. <js>"init/Pets.json"</js>)
- and stores them using the JPA <l>EntityManager</l> class.
-</p>
-<h5 class='figure'>PetStoreService.java</h5>
-<p class='bpcode w800'>
- <jk>public</jk> PetStoreService initDirect(PrintWriter w) <jk>throws</jk> Exception {
-
- EntityManager em = getEntityManager();
- EntityTransaction et = em.getTransaction();
- JsonParser parser = JsonParser.<jsm>create</jsm>().build();
-
- et.begin();
-
- <jk>for</jk> (Pet x : em.createQuery(<js>"select X from PetstorePet X"</js>, Pet.<jk>class</jk>).getResultList()) {
- em.remove(x);
- w.println(<jsm>format</jsm>(<js>"Deleted pet: id={0}"</js>, x.getId()));
- }
- ...
-
- et.commit();
- et.begin();
-
- <jk>for</jk> (Pet x : parser.parse(getStream(<js>"init/Pets.json"</js>), Pet[].<jk>class</jk>)) {
- x = em.merge(x);
- w.println(<jsm>format</jsm>(<js>"Created pet: id={0}, name={1}"</js>, x.getId(), x.getName()));
- }
- ...
-
- et.commit();
-
- <jk>return this</jk>;
- }
-
- <jk>private</jk> InputStream getStream(String fileName) {
- <jk>return</jk> getClass().getResourceAsStream(fileName);
- }
-</p>
-<p>
- The REST initialization uses a REST proxy interface to delete and store values in the database:
-
-</p>
-<h5 class='figure'>PetStoreService.java</h5>
-<p class='bpcode w800'>
- <jk>public</jk> PetStoreService initViaRest(PrintWriter w) <jk>throws</jk> Exception {
- JsonParser parser = JsonParser.<jsm>create</jsm>().ignoreUnknownBeanProperties().build();
-
- <jk>try</jk> (RestClient rc = RestClient.<jsm>create</jsm>().json().rootUrl(<js>"http://localhost:10000"</js>).build()) {
- PetStore ps = rc.getRemoteResource(PetStore.<jk>class</jk>);
-
- <jk>for</jk> (Pet x : ps.getPets()) {
- ps.deletePet(<js>"apiKey"</js>, x.getId());
- w.println(<jsm>format</jsm>(<js>"Deleted pet: id={0}"</js>, x.getId()));
- }
- ...
- <jk>for</jk> (CreatePet x : parser.parse(getStream(<js>"init/Pets.json"</js>), CreatePet[].<jk>class</jk>)) {
- <jk>long</jk> id = ps.postPet(x);
- w.println(<jsm>format</jsm>(<js>"Created pet: id={0}, name={1}"</js>, id, x.getName()));
- }
- ...
- }
-
- <jk>return this</jk>;
- }
-</p>
-<p>
- The <l>PetStore</l> class is an interface annotated with <ja>@RemoteResource</ja> and <ja>@RemoteMethod</ja>
- annotations defining how to communicate with our REST interface:
-</p>
-<h5 class='figure'>PetStore.java</h5>
-<p class='bpcode w800'>
- <ja>@RemoteResource</ja>(path=<js>"/petstore"</js>)
- <jk>public interface</jk> PetStore {
-
- <ja>@RemoteMethod</ja>(method=<jsf>GET</jsf>, path=<js>"/pet"</js>)
- <jk>public</jk> Collection<Pet> getPets() <jk>throws</jk> NotAcceptable;
-
- <ja>@RemoteMethod</ja>(path=<js>"/pet/{petId}"</js>) <jc>/* method inferred from method name */</jc>
- <jk>public</jk> Pet getPet(
- <ja>@Path</ja>(
- name=<js>"petId"</js>,
- description=<js>"ID of pet to return"</js>,
- example=<js>"123"</js>
- )
- <jk>long</jk> petId
- ) <jk>throws</jk> IdNotFound, NotAcceptable;
-
- <ja>@RemoteMethod</ja> <jc>/* method and path inferred from method name */</jc>
- <jk>public long</jk> postPet(
- <ja>@Body</ja>(
- description=<js>"Pet object to add to the store"</js>
- ) CreatePet pet
- ) <jk>throws</jk> IdConflict, NotAcceptable, UnsupportedMediaType;
-
- <ja>@RemoteMethod</ja>(method=<jsf>PUT</jsf>, path=<js>"/pet/{petId}"</js>)
- <jk>public</jk> Ok updatePet(
- <ja>@Body</ja>(
- description=<js>"Pet object that needs to be added to the store"</js>
- ) UpdatePet pet
- ) <jk>throws</jk> IdNotFound, NotAcceptable, UnsupportedMediaType;
-
- <ja>@RemoteMethod</ja>(method=<jsf>DELETE</jsf>, path=<js>"/pet/{petId}"</js>)
- <jk>public</jk> Ok deletePet(
- <ja>@Header</ja>(
- name=<js>"api_key"</js>,
- description=<js>"Security API key"</js>,
- required=<jk>true</jk>,
- example=<js>"foobar"</js>
- )
- String apiKey,
- <ja>@Path</ja>(
- name=<js>"petId"</js>,
- description=<js>"Pet id to delete"</js>,
- example=<js>"123"</js>
- )
- <jk>long</jk> petId
- ) <jk>throws</jk> IdNotFound, NotAcceptable;
-
- ...
- }
-</p>
-<p>
- Note that this is the same interface used to define our server-side REST implementation!
- The annotations defined on the method parameters used for client-side proxies are also
- inherited by and used for our server-side implementation class.
-</p>
-<h5 class='figure'>PetStoreResource.java</h5>
-<p class='bpcode w800'>
- <jk>public class</jk> PetStoreResource <jk>extends</jk> BasicRestJena <jk>implements</jk> PetStore {
-
- <ja>@Override</ja> <jc>/* PetStore */</jc>
- <ja>@RestMethod</ja>(
- name=<jsf>GET</jsf>,
- path=<js>"/pet"</js>,
- summary=<js>"All pets in the store"</js>,
- swagger=<ja>@MethodSwagger</ja>(
- tags=<js>"pet"</js>,
- parameters={
- Queryable.<jsf>SWAGGER_PARAMS</jsf>
- }
- ),
- bpx=<js>"Pet: tags,photo"</js>,
- htmldoc=<ja>@HtmlDoc</ja>(
- widgets={
- QueryMenuItem.<jk>class</jk>,
- AddPetMenuItem.<jk>class</jk>
- },
- navlinks={
- <js>"INHERIT"</js>, <jc>// Inherit links from class.</jc>
- <js>"[2]:$W{QueryMenuItem}"</js>, <jc>// Insert QUERY link in position 2.</jc>
- <js>"[3]:$W{AddPetMenuItem}"</js> <jc>// Insert ADD link in position 3.</jc>
- }
- ),
- converters={Queryable.<jk>class</jk>}
- )
- <jk>public</jk> Collection<Pet> getPets() <jk>throws</jk> NotAcceptable {
- <jk>return</jk> <jf>store</jf>.getPets();
- }
-
- <ja>@Override</ja> <jc>/* PetStore */</jc>
- <ja>@RestMethod</ja>(
- name=<jsf>GET</jsf>,
- path=<js>"/pet/{petId}"</js>,
- summary=<js>"Find pet by ID"</js>,
- description=<js>"Returns a single pet"</js>,
- swagger=<ja>@MethodSwagger</ja>(
- tags=<js>"pet"</js>,
- value={
- <js>"security:[ { api_key:[] } ]"</js>
- }
- )
- )
- <jk>public</jk> Pet getPet(<jk>long</jk> petId) <jk>throws</jk> IdNotFound, NotAcceptable {
- <jk>return</jk> <jf>store</jf>.getPet(petId);
- }
-
- <ja>@Override</ja> <jc>/* PetStore */</jc>
- <ja>@RestMethod</ja>(
- summary=<js>"Add a new pet to the store"</js>,
- swagger=<ja>@MethodSwagger</ja>(
- tags=<js>"pet"</js>,
- value={
- <js>"security:[ { petstore_auth:['write:pets','read:pets'] } ]"</js>
- }
- )
- )
- <jk>public long</jk> postPet(CreatePet pet) <jk>throws</jk> IdConflict, NotAcceptable, UnsupportedMediaType {
- <jk>return</jk> <jf>store</jf>.create(pet).getId();
- }
-
- <ja>@Override</ja> <jc>/* PetStore */</jc>
- <ja>@RestMethod</ja>(
- name=<jsf>PUT</jsf>,
- path=<js>"/pet/{petId}"</js>,
- summary=<js>"Update an existing pet"</js>,
- swagger=<ja>@MethodSwagger</ja>(
- tags=<js>"pet"</js>,
- value={
- <js>"security:[ { petstore_auth: ['write:pets','read:pets'] } ]"</js>
- }
- )
- )
- <jk>public</jk> Ok updatePet(UpdatePet pet) <jk>throws</jk> IdNotFound, NotAcceptable, UnsupportedMediaType {
- <jf>store</jf>.update(pet);
- <jk>return</jk> <jsf>OK</jsf>;
- }
-
- <ja>@Override</ja> <jc>/* PetStore */</jc>
- <ja>@RestMethod</ja>(
- name=<jsf>DELETE</jsf>,
- path=<js>"/pet/{petId}"</js>,
- summary=<js>"Deletes a pet"</js>,
- swagger=<ja>@MethodSwagger</ja>(
- tags=<js>"pet"</js>,
- value={
- <js>"security:[ { petstore_auth:[ 'write:pets','read:pets' ] } ]"</js>
- }
- )
- )
- <jk>public</jk> Ok deletePet(String apiKey, <jk>long</jk> petId) <jk>throws</jk> IdNotFound, NotAcceptable {
- <jf>store</jf>.removePet(petId);
- <jk>return</jk> <jsf>OK</jsf>;
- }
- ...
- }
-</p>
-<p>
- The advantage to using a common interface for both your server-side and client-side APIs is that you
- have less of a chance of a mismatch between the server and client side definitions.
-</p>
-<hr>
-<p>
- Now that we've initialized the contents of our database, we can start exploring the REST interface.
- We can start by click the <l>pet</l> link on the home page which takes you to a summary page of <l>Pet</l>
- objects:
-</p>
-<p class='bpcode w800'>
- http://localhost:10000/petstore/pet
-</p>
-<img class='bordered w800' src='doc-files/juneau-examples-rest.PetStoreResource.4a.png'>
-
-<p>
- Clicking on one of the ID links takes you to a details page:
-</p>
-<p class='bpcode w800'>
- http://localhost:10000/petstore/pet/1
-</p>
-<img class='bordered w800' src='doc-files/juneau-examples-rest.PetStoreResource.4b.png'>
-<p>
- You'll notice the details page shows <l>tags</l> and <l>photo</l> fields not shown on the summary page.
- This was accomplished with the <c>bpx=<js>"Pet: tags,photo"</js></c> annotation on the <l>getPets()</l>
- method which excludes those two properties from the view.
- This is a common way of defining summary and details views for POJOs.
-</p>
-<p>
- The hyperlinks and special rendering for <l>Pet</l> objects is done through <ja>@Html</ja> annotations
- and {@link org.apache.juneau.html.HtmlRender} objects.
-</p>
-<h5 class='figure'>Pet.java</h5>
-<p class='bpcode w800'>
- <jk>public class</jk> Pet {
-
- <ja>@Html</ja>(link=<js>"servlet:/pet/{id}"</js>)
- <jk>private long</jk> <jf>id</jf>;
-
- <ja>@Html</ja>(render=PriceRender.<jk>class</jk>)
- <jk>private float</jk> <jf>price</jf>;
-
- <jk>private</jk> Species <jf>species</jf>;
-
- <jk>private</jk> PetStatus <jf>status</jf>;
-
- ...
-
- <jk>public static final class</jk> PriceRender <jk>extends</jk> HtmlRender<Float> {
- <ja>@Override</ja> <jc>/* HtmlRender */</jc>
- <jk>public</jk> Object getContent(SerializerSession session, Float value) {
- <jk>return</jk> value == <jk>null</jk> ? <jk>null</jk> : String.<jsm>format</jsm>(<js>"$%.2f"</js>, value);
- }
- }
-
- ...
-</p>
-
-<h5 class='figure'>Species.java</h5>
-<p class='bpcode w800'>
- <ja>@Html</ja>(render=Species.SpeciesRender.<jk>class</jk>)
- <jk>public enum</jk> Species {
-
- <jsf>BIRD</jsf>, <jsf>CAT</jsf>, <jsf>DOG</jsf>, <jsf>FISH</jsf>, <jsf>MOUSE</jsf>, <jsf>RABBIT</jsf>, <jsf>SNAKE</jsf>;
-
- <jk>public static class</jk> SpeciesRender <jk>extends</jk> HtmlRender<Species> {
- <ja>@Override</ja> <jc>/* HtmlRender */</jc>
- <jk>public</jk> Object getContent(SerializerSession session, Species value) {
- <jk>return new</jk> Img().src(<js>"servlet:/htdocs/"</js>+value.name().toLowerCase()+<js>".png"</js>);
- }
- <ja>@Override</ja> <jc>/* HtmlRender */</jc>
- <jk>public</jk> String getStyle(SerializerSession session, Species value) {
- <jk>return</jk> <js>"background-color:#FDF2E9"</js>;
- }
- }
- }
-</p>
-
-<h5 class='figure'>PetStatus.java</h5>
-<p class='bpcode w800'>
- <ja>@Html</ja>(render=PetStatus.PetStatusRender.<jk>class</jk>)
- <jk>public enum</jk> PetStatus {
-
- <jsf>AVAILABLE</jsf>, <jsf>PENDING</jsf>, <jsf>SOLD</jsf>, <jsf>UNKNOWN</jsf>;
-
- <jk>public static class</jk> PetStatusRender <jk>extends</jk> HtmlRender<PetStatus> {
- <ja>@Override</ja> <jc>/* HtmlRender */</jc>
- <jk>public</jk> String getStyle(SerializerSession session, PetStatus value) {
- <jk>switch</jk>(value) {
- <jk>case</jk> <jsf>AVAILABLE</jsf>: <jk>return</jk> <js>"background-color:#5cb85c;text-align:center;vertical-align:middle;"</js>;
- <jk>case</jk> <jsf>PENDING</jsf>: <jk>return</jk> <js>"background-color:#f0ad4e;text-align:center;vertical-align:middle;"</js>;
- <jk>case</jk> <jsf>SOLD</jsf>: <jk>return</jk> <js>"background-color:#888;text-align:center;vertical-align:middle;"</js>;
- <jk>default</jk>: <jk>return</jk> <js>"background-color:#777;text-align:center;vertical-align:middle;"</js>;
- }
- }
- }
- }
-</p>
-<p>
- The <l>CONTENT-TYPE</l> menu items gives a shorthand way of showing our POJOs in any of the supported
- serialization languages:
-</p>
-<p class='bpcode w800'>
- http://localhost:10000/petstore/pet/1
-</p>
-<img class='bordered w800' src='doc-files/juneau-examples-rest.PetStoreResource.5a.png'>
-<p>
- For example, selecting <l>APPLICATION/JSON+SIMPLE</l> shows us simplified JSON:
-</p>
-<p class='bpcode w800'>
- http://localhost:10000/petstore/pet?plainText=true&Accept=application%2Fjson%2Bsimple
-</p>
-<img class='bordered w800' src='doc-files/juneau-examples-rest.PetStoreResource.5b.png'>
-<p>
- Note that we're using the convenience feature for specifying an <c>Accept</c> header via a query parameter.
-</p>
-<p>
- The <l>THEME</l> menu items allows you to quickly change the stylesheet used on the page:
-</p>
-<p class='bpcode w800'>
- http://localhost:10000/petstore/pet/1
-</p>
-<img class='bordered w800' src='doc-files/juneau-examples-rest.PetStoreResource.6a.png'>
-<p>
- For example, selecting <l>LIGHT</l> shows us the page rendered using the light look-and-feel:
-</p>
-<p class='bpcode w800'>
- http://localhost:10000/petstore/pet?stylesheet=htdocs%2Fthemes%2Flight.css
-</p>
-<img class='bordered w800' src='doc-files/juneau-examples-rest.PetStoreResource.6b.png'>
-<p>
- Both the <l>CONTENT-TYPE</l> and <l>THEMES</l> menu items are implemented as widgets and
- associated with the page contents through the use of <l>$W</l> variables in the navigation links:
-</p>
-<h5 class='figure'>PetStoreResource.java</h5>
-<p class='bpcode w800'>
- <ja>@RestResource</ja>(
- htmldoc=<ja>@HtmlDoc</ja>(
- widgets={
- ContentTypeMenuItem.<jk>class</jk>,
- ThemeMenuItem.<jk>class</jk>,
- },
- navlinks={
- <js>"up: request:/.."</js>,
- <js>"options: servlet:/?method=OPTIONS"</js>,
- <js>"init: servlet:/init"</js>,
- <js>"$W{ContentTypeMenuItem}"</js>,
- <js>"$W{ThemeMenuItem}"</js>,
- <js>"source: $C{Source/gitHub}/org/apache/juneau/examples/rest/petstore/$R{servletClassSimple}.java"</js>
- },
- ...
- ),
- ...
-</p>
-<p>
- The implementation of a menu item contains methods for retrieving the label and HTML5 content of the menu item.
-</p>
-<h5 class='figure'>ContentTypeMenuItem.java</h5>
-<p class='bpcode w800'>
- <jk>public class</jk> ContentTypeMenuItem <jk>extends</jk> MenuItemWidget {
-
- <ja>@Override</ja> <jc>/* MenuItemWidget */</jc>
- <jk>public</jk> String getLabel(RestRequest req) {
- <jk>return</jk> <js>"content-type"</js>;
- }
-
- <ja>@Override</ja> <jc>/* MenuItemWidget */</jc>
- <jk>public</jk> Div getContent(RestRequest req) {
- Div div = <jsm>div</jsm>();
- Set<MediaType> l = <jk>new</jk> TreeSet<>();
- <jk>for</jk> (Serializer s : req.getSerializers().getSerializers())
- l.add(s.getPrimaryMediaType());
- <jk>for</jk> (MediaType mt : l) {
- URI uri = req.getUri(<jk>true</jk>, <jk>new</jk> AMap<String,String>().append(<js>"plainText"</js>,<js>"true"</js>).append(<js>"Accept"</js>,mt.toString()));
- div.children(<jsm>a</jsm>(uri, mt), <jsm>br</jsm>());
- }
- <jk>return</jk> div;
- }
- }
-</p>
-
-<h5 class='figure'>ThemeMenuItem.java</h5>
-<p class='bpcode w800'>
- <jk>public class</jk> ThemeMenuItem <jk>extends</jk> MenuItemWidget {
-
- <jk>private static final</jk> String[] <jsf>BUILT_IN_STYLES</jsf> = {<js>"devops"</js>, <js>"light"</js>, <js>"original"</js>, <js>"dark"</js>};
-
- <ja>@Override</ja> <jc>/* Widget */</jc>
- <jk>public</jk> String getLabel(RestRequest req) {
- <jk>return</jk> "themes";
- }
-
- <ja>@Override</ja> <jc>/* MenuItemWidget */</jc>
- <jk>public</jk> Div getContent(RestRequest req) <jk>throws</jk> Exception {
- Div div = <jsm>div</jsm>();
- <jk>for</jk> (String s : <jsf>BUILT_IN_STYLES</jsf>) {
- java.net.URI uri = req.getUri(<jk>true</jk>, <jk>new</jk> AMap<String,String>().append(<js>"stylesheet"</js>, <js>"htdocs/themes/"</js>+s+<js>".css"</js>));
- div.children(<jsm>a</jsm>(uri, s), <jsm>br</jsm>());
- }
- <jk>return</jk> div;
- }
- }
-</p>
-<p>
- The <l>QUERY</l> menu item shows off the capabilities of the {@link org.apache.juneau.rest.converters.Queryable} converter.
-</p>
-
-<p class='bpcode w800'>
- http://localhost:10000/petstore/pet
-</p>
-<img class='bordered w800' src='doc-files/juneau-examples-rest.PetStoreResource.7a.png'>
-<p>
- The converter will take the POJOs to be serialized and filter them based on the provided query/view/sort/paging attributes:
-</p>
-<p class='bpcode w800'>
- http://localhost:10000/petstore/pet?s=name%3DHoppy*&v=species%2Cname&o=name&p=0&l=20
-</p>
-<img class='bordered w800' src='doc-files/juneau-examples-rest.PetStoreResource.7b.png'>
-<p>
- The <l>ADD</l> menu item is a custom menu item created for the petstore app for adding pets through the
- web interface.
-</p>
-
-<p class='bpcode w800'>
- http://localhost:10000/petstore/pet
-</p>
-<img class='bordered w800' src='doc-files/juneau-examples-rest.PetStoreResource.8a.png'>
-
-<p>
- Both the <l>QUERY</l> and <l>ADD</l> menu items are only applicable for this page, and so are defined
- on the <l>getPets()</l> method:
-</p>
-
-<h5 class='figure'>PetStoreResource.java</h5>
-<p class='bpcode w800'>
- <ja>@Override</ja> <jc>/* PetStore */</jc>
- <ja>@RestMethod</ja>(
- name=<jsf>GET</jsf>,
- path=<js>"/pet"</js>,
- summary=<js>"All pets in the store"</js>,
- swagger=<ja>@MethodSwagger</ja>(
- tags=<js>"pet"</js>,
- parameters={
- Queryable.<jsf>SWAGGER_PARAMS</jsf>
- }
- ),
- bpx=<js>"Pet: tags,photo"</js>,
- htmldoc=<ja>@HtmlDoc</ja>(
- widgets={
- QueryMenuItem.<jk>class</jk>,
- AddPetMenuItem.<jk>class</jk>
- },
- navlinks={
- <js>"INHERIT"</js>, <jc>// Inherit links from class.</jc>
- <js>"[2]:$W{QueryMenuItem}"</js>, <jc>// Insert QUERY link in position 2.</jc>
- <js>"[3]:$W{AddPetMenuItem}"</js> <jc>// Insert ADD link in position 3.</jc>
- }
- ),
- converters={Queryable.<jk>class</jk>}
- )
- <jk>public</jk> Collection<Pet> getPets() <jk>throws</jk> NotAcceptable {
- <jk>return</jk> <jf>store</jf>.getPets();
- }
-</p>
-
-<h5 class='figure'>QueryMenuItem.java</h5>
-<p class='bpcode w800'>
- <jk>public class</jk> QueryMenuItem <jk>extends</jk> MenuItemWidget {
-
- <ja>@Override</ja> <jc>/* Widget */</jc>
- <jk>public</jk> String getStyle(RestRequest req) <jk>throws</jk> Exception {
- <jk>return super</jk>.getStyle(req)
- + <js>"\n"</js>
- + <jsm>loadStyle</jsm>(<js>"QueryMenuItem.css"</js>);
- }
-
- <ja>@Override</ja> <jc>/* MenuItemWidget */</jc>
- <jk>public</jk> String getLabel(RestRequest req) <jk>throws</jk> Exception {
- <jk>return</jk> <js>"query"</js>;
- }
-
- <ja>@Override</ja> <jc>/* MenuItemWidget */</jc>
- <jk>public</jk> String getContent(RestRequest req) <jk>throws</jk> Exception {
- <jk>return</jk> <jsm>loadHtml</jsm>(<js>"QueryMenuItem.html"</js>);
- }
- }
-</p>
-
-<h5 class='figure'>AddPetMenuItem.java</h5>
-<p class='bpcode w800'>
- <jk>public class</jk> AddPetMenuItem <jk>extends</jk> MenuItemWidget {
-
- <ja>@Override</ja> <jc>/* MenuItemWidget */</jc>
- <jk>public</jk> String getLabel(RestRequest req) <jk>throws</jk> Exception {
- <jk>return</jk> <js>"add"</js>;
- }
-
- <ja>@Override</ja> <jc>/* Widget */</jc>
- <jk>public</jk> Object getContent(RestRequest req) <jk>throws</jk> Exception {
- <jk>return</jk> <jsm>div</jsm>(
- <jsm>form</jsm>().id(<js>"form"</js>).action(<js>"servlet:/pet"</js>).method(<jsf>POST</jsf>).children(
- <jsm>table</jsm>(
- <jsm>tr</jsm>(
- <jsm>th</jsm>(<js>"Name:"</js>),
- <jsm>td</jsm>(<jsm>input</jsm>().name(<js>"name"</js>).type(<js>"text"</js>)),
- <jsm>td</jsm>(<jk>new</jk> Tooltip(<js>"&#x2753;"</js>, <js>"The name of the pet."</js>, <jsm>br</jsm>(), <js>"e.g. 'Fluffy'"</js>))
- ),
- <jsm>tr</jsm>(
- <jsm>th</jsm>(<js>"Species:"</js>),
- <jsm>td</jsm>(
- <jsm>select</jsm>().name(<js>"species"</js>).children(
- <jsm>option</jsm>(<js>"CAT"</js>), <jsm>option</jsm>(<js>"DOG"</js>), <jsm>option</jsm>(<js>"BIRD"</js>), <jsm>option</jsm>(<js>"FISH"</js>), <jsm>option</jsm>(<js>"MOUSE"</js>), <jsm>option</jsm>(<js>"RABBIT"</js>), <jsm>option</jsm>(<js>"SNAKE"</js>)
- )
- ),
- <jsm>td</jsm>(<jk>new</jk> Tooltip(<js>"&#x2753;"</js>, <js>"The kind of animal."</js>))
- ),
- <jsm>tr</jsm>(
- <jsm>th</jsm>(<js>"Price:"</js>),
- <jsm>td</jsm>(<jsm>input</jsm>().name(<js>"price"</js>).type(<js>"number"</js>).placeholder(<js>"1.0"</js>).step(<js>"0.01"</js>).min(1).max(100).value(9.99)),
- <jsm>td</jsm>(<jk>new</jk> Tooltip(<js>"&#x2753;"</js>, <js>"The price to charge for this pet."</js>))
- ),
- <jsm>tr</jsm>(
- <jsm>th</jsm>(<js>"Tags:"</js>),
- <jsm>td</jsm>(<jsm>input</jsm>().name(<js>"tags"</js>).type(<js>"text"</js>)),
- <jsm>td</jsm>(<jk>new</jk> Tooltip(<js>"&#x2753;"</js>, <js>"Arbitrary textual tags (comma-delimited)."</js>, <jsm>br</jsm>(), <js>"e.g. 'fluffy,friendly'"</js>))
- ),
- <jsm>tr</jsm>(
- <jsm>td</jsm>().colspan(2).style(<js>"text-align:right"</js>).children(
- <jsm>button</jsm>(<js>"reset"</js>, <js>"Reset"</js>),
- <jsm>button</jsm>(<js>"button"</js>,<js>"Cancel"</js>).onclick(<js>"window.location.href='/'"</js>),
- <jsm>button</jsm>(<js>"submit"</js>, <js>"Submit"</js>)
- )
- )
- ).style(<js>"white-space:nowrap"</js>)
- )
- );
- }
- }
-</p>
-<hr>
-<p>
- The <l>OPTIONS</l> menu items takes you to the auto-generated Swagger UI for the application:
-</p>
-<p class='bpcode w900'>
- http://localhost:10000/petstore/pet?method=OPTIONS
-</p>
-<img class='bordered w900' src='doc-files/juneau-examples-rest.PetStoreResource.9a.png'>
-<p>
- Since we've defined tags on our annotations, the pet-related operations are all grouped under the <l>pet</l> tag:
-</p>
-<img class='bordered w900' src='doc-files/juneau-examples-rest.PetStoreResource.9b.png'>
-<p>
- Information for all HTTP parts is automatically generated:
-</p>
-<img class='bordered w900' src='doc-files/juneau-examples-rest.PetStoreResource.9h.png'>
-<p>
- The schema models for POJO models is available in the <l>Responses</l> section of an operation:
-</p>
-<img class='bordered w900' src='doc-files/juneau-examples-rest.PetStoreResource.9c.png'>
-<p>
- Auto-generated examples are available for all supported languages:
-</p>
-<img class='bordered w900' src='doc-files/juneau-examples-rest.PetStoreResource.9d.png'>
-<p>
- For example, <l>application/json+simple</l>:
-</p>
-<img class='bordered w900' src='doc-files/juneau-examples-rest.PetStoreResource.9e.png'>
-<p>
- Examples can be derived in a number of ways. In our case, we've defined a static method on our <l>Pet</l>
- class annotated with <ja>@Example</ja>:
-</p>
-<h5 class='figure'>Pet.java</h5>
-<p class='bpcode w800'>
- <ja>@Example</ja>
- <jk>public static</jk> Pet example() {
- <jk>return new</jk> Pet()
- .id(123)
- .species(Species.<jsf>DOG</jsf>)
- .name(<js>"Doggie"</js>)
- .tags(<js>"friendly"</js>,<js>"smart"</js>)
- .status(PetStatus.<jsf>AVAILABLE</jsf>);
- }
-</p>
-<p>
- Similar functionality exists for request bodies as well:
-</p>
-<img class='bordered w900' src='doc-files/juneau-examples-rest.PetStoreResource.9f.png'>
-<p>
- At the bottom of the page is a listing of the POJO models in the app:
-</p>
-<img class='bordered w900' src='doc-files/juneau-examples-rest.PetStoreResource.9g.png'>
-<hr>
-<p>
- The <l>PhotosResource</l> class provides capabilities for uploading and viewing image files.
- It demonstrates the capabilities of defining your own custom serializers and parsers and using
- multi-part form posts to upload binary data.
-</p>
-
-<p class='bpcode w800'>
- http://localhost:10000/petstore/photos
-</p>
-<img class='bordered w800' src='doc-files/juneau-examples-rest.PetStoreResource.10a.png'>
-
-<p>
- The <l>PhotoResource</l> 'database' is simply a map of keys to <l>Photo</l> beans and uses the Java-provided
- <l>BufferedImage</l> class for representing images.
-</p>
-
-<h5 class='figure'>PhotosResource.java</h5>
-<p class='bpcode w800'>
- <ja>@RestResource</ja>(
- path=<js>"/photos"</js>,
- ...
- )
- <jk>public class</jk> PhotosResource <jk>extends</jk> BasicRestServlet {
-
- <jd>/** Our cache of photos */</jd>
- <jk>private</jk> Map<String,Photo> <jf>photos</jf> = <jk>new</jk> TreeMap<>();
-
- <jd>/** Our bean class for storing photos */</jd>
- <jk>public static class</jk> Photo {
- String <jf>id</jf>;
- BufferedImage <jf>image</jf>;
-
- Photo(String id, BufferedImage image) {
- <jk>this</jk>.<jf>id</jf> = id;
- <jk>this</jk>.<jf>image</jf> = image;
- }
-
- <jk>public</jk> URI getURI() <jk>throws</jk> URISyntaxException {
- <jk>return new</jk> URI(<js>"servlet:/"</js> + id);
- }
- }
-</p>
-
-<p>
- The contents of the home page simply renders our collection of photo beans:
-</p>
-<h5 class='figure'>PhotosResource.java</h5>
-<p class='bpcode w800'>
- <ja>@RestMethod</ja>(
- name=<jsf>GET</jsf>,
- path=<js>"/"</js>,
- summary=<js>"Show the list of all currently loaded photos"</js>
- )
- <jk>public</jk> Collection<Photo> getAllPhotos() <jk>throws</jk> Exception {
- <jk>return</jk> <jf>photos</jf>.values();
- }
-</p>
-
-<p>
- Clicking on one of the hyperlinks renders the stored image for us:
-</p>
-<p class='bpcode w800'>
- http://localhost:10000/petstore/photos/cat
-</p>
-<img class='bordered w800' src='doc-files/juneau-examples-rest.PetStoreResource.10b.png'>
-
-<p>
- The method for retrieving images simply returns a <l>BufferedImage</l> file:
-</p>
-<h5 class='figure'>PhotosResource.java</h5>
-<p class='bpcode w800'>
- <ja>@RestMethod</ja>(
- name=<jsf>GET</jsf>,
- path=<js>"/{id}"</js>,
- serializers=ImageSerializer.<jk>class</jk>,
- summary=<js>"Get a photo by ID"</js>,
- description=<js>"Shows how to use a custom serializer to serialize a BufferedImage object to a stream."</js>
- )
- <ja>@Response</ja>(
- schema=<ja>@Schema</ja>(type=<js>"file"</js>)
- )
- <jk>public</jk> BufferedImage getPhoto(<ja>@Path</ja>(<js>"id"</js>) String id) <jk>throws</jk> NotFound {
- Photo p = <jf>photos</jf>.get(id);
- <jk>if</jk> (p == <jk>null</jk>)
- <jk>throw new</jk> NotFound(<js>"Photo not found"</js>);
- <jk>return</jk> p.<jf>image</jf>;
- }
-</p>
-
-<p>
- The <l>BufferedImage</l> object is converted to a stream using a custom {@link org.apache.juneau.serializer.OutputStreamSerializer}:
-</p>
-<h5 class='figure'>PhotosResource.java</h5>
-<p class='bpcode w800'>
- <jd>/** Serializer for converting images to byte streams */</jd>
- <jk>public static class</jk> ImageSerializer <jk>extends</jk> OutputStreamSerializer {
-
- <jk>public</jk> ImageSerializer(PropertyStore ps) {
- <jk>super</jk>(ps, <jk>null</jk>, <js>"image/png,image/jpeg"</js>);
- }
-
- <ja>@Override</ja> <jc>/* Serializer */</jc>
- <jk>public</jk> OutputStreamSerializerSession createSession(SerializerSessionArgs args) {
- <jk>return new</jk> OutputStreamSerializerSession(args) {
-
- <ja>@Override</ja> <jc>/* SerializerSession */</jc>
- <jk>protected void</jk> doSerialize(SerializerPipe out, Object o) <jk>throws</jk> Exception {
- RenderedImage image = (RenderedImage)o;
- String mediaType = getProperty(<js>"mediaType"</js>, String.<jk>class</jk>, (String)<jk>null</jk>);
- ImageIO.<jsm>write</jsm>(image, mediaType.substring(mediaType.indexOf(<js>'/'</js>)+1), out.getOutputStream());
- }
- };
- }
- }
-</p>
-<p>
- Likewise, the body of requests can also be instances of <l>BufferedImage</l>:
-</p>
-<h5 class='figure'>PhotosResource.java</h5>
-<p class='bpcode w800'>
- <ja>@RestMethod</ja>(
- name=<jsf>PUT</jsf>,
- path=<js>"/{id}"</js>,
- parsers=ImageParser.<jf>class</jf>,
- summary=<js>"Add or overwrite a photo"</js>,
- description=<js>"Shows how to use a custom parser to parse a stream into a BufferedImage object."</js>
- )
- <jk>public</jk> String addPhoto(
- <ja>@Path</ja>(<js>"id"</js>) String id,
- <ja>@Body</ja>(
- description=<js>"Binary contents of image."</js>,
- schema=<ja>@Schema</ja>(type=<js>"file"</js>)
- )
- BufferedImage image
- ) <jk>throws</jk> Exception {
- <jf>photos</jf>.put(id, <jk>new</jk> Photo(id, image));
- <jk>return</jk> <js>"OK"</js>;
- }
-</p>
-<p>
- The <l>BufferedImage</l> object is created from a stream using a custom {@link org.apache.juneau.parser.InputStreamParser}:
-</p>
-
-<h5 class='figure'>PhotosResource.java</h5>
-<p class='bpcode w800'>
- <jd>/** Parser for converting byte streams to images */</jd>
- <jk>public static class</jk> ImageParser <jk>extends</jk> InputStreamParser {
-
- <jk>public</jk> ImageParser(PropertyStore ps) {
- <jk>super</jk>(ps, <js>"image/png"</js>, <js>"image/jpeg"</js>);
- }
-
- <ja>@Override</ja> <jc>/* Parser */</jc>
- <jk>public</jk> InputStreamParserSession createSession(<jk>final</jk> ParserSessionArgs args) {
- <jk>return new</jk> InputStreamParserSession(args) {
-
- <ja>@Override</ja> <jc>/* ParserSession */</jc>
- <jk>protected</jk> <T> T doParse(ParserPipe pipe, ClassMeta<T> type) <jk>throws</jk> Exception {
- <jk>return</jk> (T)ImageIO.read(pipe.getInputStream());
- }
- };
- }
- }
-</p>
-<p>
- A custom menu item is provided for uploading new images:
-</p>
-<p class='bpcode w800'>
- http://localhost:10000/petstore/photos
-</p>
-<img class='bordered w800' src='doc-files/juneau-examples-rest.PetStoreResource.10c.png'>
-
-<p>
- The menu item is defined as a <l>MenuItemWidget</l>:
-</p>
-
-<h5 class='figure'>UploadPhotoMenuItem.java</h5>
-<p class='bpcode w800'>
- <jk>public class</jk> UploadPhotoMenuItem <jk>extends</jk> MenuItemWidget {
-
- <ja>@Override</ja> <jc>/* MenuItemWidget */</jc>
- <jk>public</jk> String getLabel(RestRequest req) <jk>throws</jk> Exception {
- <jk>return</jk> <js>"upload"</js>;
- }
-
- <ja>@Override</ja> <jc>/* Widget */</jc>
- <jk>public</jk> Object getContent(RestRequest req) <jk>throws</jk> Exception {
- <jk>return</jk> <jsm>div</jsm>(
- <jsm>form</jsm>().id(<js>"form"</js>).action(<js>"servlet:/upload"</js>).method(<jsf>POST</jsf>).enctype(<js>"multipart/form-data"</js>).children(
- <jsm>table</jsm>(
- <jsm>tr</jsm>(
- <jsm>th</jsm>(<js>"ID:"</js>),
- <jsm>td</jsm>(<jsm>input</jsm>().name(<js>"id"</js>).type(<js>"text"</js>)),
- <jsm>td</jsm>(<jk>new</jk> Tooltip(<js>"&#x2753;"</js>, <js>"The unique identifier of the photo."</js>, <jsm>br</jsm>(), <js>"e.g. 'Fluffy'"</js>))
- ),
- <jsm>tr</jsm>(
- <jsm>th</jsm>(<js>"File:"</js>),
- <jsm>td</jsm>(<jsm>input</jsm>().name(<js>"file"</js>).type(<js>"file"</js>).accept(<js>"image/*"</js>)),
- <jsm>td</jsm>(<jk>new</jk> Tooltip(<js>"&#x2753;"</js>, <js>"The image file."</js>))
- ),
- <jsm>tr</jsm>(
- <jsm>td</jsm>().colspan(2).style(<js>"text-align:right"</js>).children(
- <jsm>button</jsm>(<js>"reset"</js>, <js>"Reset"</js>),
- <jsm>button</jsm>(<js>"button"</js>,<js>"Cancel"</js>).onclick(<js>"window.location.href='/'"</js>),
- <jsm>button</jsm>(<js>"submit"</js>, <js>"Submit"</js>)
- )
- )
- ).style(<js>"white-space:nowrap"</js>)
- )
- );
- }
- }
-</p>
-<p>
- The menu item then submits multi-part form posts to the following method:
-</p>
-<h5 class='figure'>PhotosResource.java</h5>
-<hr>
-<p>
- The <l>SqlQueryResource</l> class is a simple utility for performing raw SQL queries against our Derby database:
-</p>
-<p class='bpcode w900'>
- http://localhost:10000/petstore/sql
-</p>
-<img class='bordered w900' src='doc-files/juneau-examples-rest.PetStoreResource.11a.png'>
-<p>
- For example, viewing all of the <l>Pet</l> objects in the database:
-</p>
-<p class='bpcode w900'>
- http://localhost:10000/petstore/sql?sql=select+*+from+PetstorePet
-</p>
-<img class='bordered w900' src='doc-files/juneau-examples-rest.PetStoreResource.11b.png'>
-
-<p>
- The <l>SqlQueryResource</l> is implemented as a single class with database connection information:
-</p>
-
-<h5 class='figure'>SqlQueryResource.java</h5>
-<p class='bpcode w800'>
- <ja>@RestResource</ja>(
- path=<js>"/sql"</js>,
- title=<js>"SQL query service"</js>,
- description=<js>"Executes queries against the local derby '$C{SqlQueryResource/connectionUrl}' database"</js>,
- htmldoc=<ja>@HtmlDoc</ja>(
- widgets={
- ThemeMenuItem.<jk>class</jk>
- },
- navlinks={
- <js>"up: request:/.."</js>,
- <js>"options: servlet:/?method=OPTIONS"</js>,
- <js>"$W{ThemeMenuItem}"</js>,
- <js>"source: $C{Source/gitHub}/org/apache/juneau/examples/rest/$R{servletClassSimple}.java"</js>
- },
- aside={
- <js>"<div style='min-width:200px' class='text'>"</js>,
- <js>" <p>An example of a REST interface over a relational database that serializes ResultSet objects.</p>"</js>,
- <js>" <p>Specify one or more queries delimited by semicolons.</p>"</js>,
- <js>" <h5>Examples:</h5>"</js>,
- <js>" <ul>"</js>,
- <js>" <li><a class='link' href='?sql=select+*+from+sys.systables'>Tables</a>"</js>,
- <js>" <li><a class='link' href='?sql=select+*+from+PetstorePet'>Pets</a>"</js>,
- <js>" <li><a class='link' href='?sql=select+*+from+PetstoreOrder'>Orders</a>"</js>,
- <js>" <li><a class='link' href='?sql=select+*+from+PetstoreUser'>Users</a>"</js>,
- <js>" </ul>"</js>,
- <js>"</div>"</js>
- },
- stylesheet=<js>"servlet:/htdocs/themes/dark.css"</js>
- ),
- swagger=<ja>@ResourceSwagger</ja>(
- contact=<ja>@Contact</ja>(name=<js>"Juneau Developer"</js>,email=<js>"dev@juneau.apache.org"</js>),
- license=<ja>@License</ja>(name=<js>"Apache 2.0"</js>,url=<js>"http://www.apache.org/licenses/LICENSE-2.0.html"</js>),
- version=<js>"2.0"</js>,
- termsOfService=<js>"You are on your own."</js>,
- externalDocs=<ja>@ExternalDocs</ja>(description=<js>"Apache Juneau"</js>,url=<js>"http://juneau.apache.org"</js>)
- )
- )
- <jk>public class</jk> SqlQueryResource <jk>extends</jk> BasicRestServlet {
-
- <jk>private</jk> String <jf>driver</jf>, <jf>connectionUrl</jf>;
- <jk>private boolean</jk> <jf>allowUpdates</jf>, <jf>allowTempUpdates</jf>, <jf>includeRowNums</jf>;
-
- ...
-</p>
-<p>
- The connection information is pulled from the <l>examples.cfg</l> file using an init hook:
-</p>
-<h5 class='figure'>SqlQueryResource.java</h5>
-<p class='bpcode w800'>
- <ja>@RestHook</ja>(<jsf>INIT</jsf>)
- <jk>public void</jk> initConnection(RestContextBuilder builder) <jk>throws</jk> Exception {
- Config cf = builder.getConfig();
-
- <jf>driver</jf> = cf.getString(<js>"SqlQueryResource/driver"</js>);
- <jf>connectionUrl</jf> = cf.getString(<js>"SqlQueryResource/connectionUrl"</js>);
- <jf>allowUpdates</jf> = cf.getBoolean(<js>"SqlQueryResource/allowUpdates"</js>, <jk>false</jk>);
- <jf>allowTempUpdates</jf> = cf.getBoolean(<js>"SqlQueryResource/allowTempUpdates"</js>, <jk>false</jk>);
- <jf>includeRowNums</jf> = cf.getBoolean(<js>"SqlQueryResource/includeRowNums"</js>, <jk>false</jk>);
-
- <jk>try</jk> {
- Class.<jsm>forName</jsm>(<jf>driver</jf>).newInstance();
- } <jk>catch</jk> (Exception e) {
- <jk>throw new</jk> RuntimeException(e);
- }
- }
-</p>
-<p>
- The query entry page is rendered using HTML5 beans:
-</p>
-<h5 class='figure'>SqlQueryResource.java</h5>
-<p class='bpcode w800'>
- <ja>@RestMethod</ja>(
- summary=<js>"Display the query entry page"</js>
- )
- <jk>public</jk> Div get(
- <ja>@Query</ja>(
- name=<js>"sql"</js>,
- description=<js>"Text to prepopulate the SQL query field with."</js>,
- example=<js>"select * from sys.systables"</js>
- )
- String sql
- ) {
-
- <jk>return</jk> <jsm>div</jsm>(
- <jsm>script</jsm>(<js>"text/javascript"</js>,
- <js>"// Quick and dirty function to allow tabs in textarea."</js>,
- <js>"function checkTab(e) {"</js>,
- <js>" if (e.keyCode == 9) {"</js>,
- <js>" var t = e.target;"</js>,
- <js>" var ss = t.selectionStart, se = t.selectionEnd;"</js>,
- <js>" t.value = t.value.slice(0,ss).concat('\\t').concat(t.value.slice(ss,t.value.length));"</js>,
- <js>" e.preventDefault();"</js>,
- <js>" }"</js>,
- <js>"}"</js>,
- <js>"// Load results from IFrame into this document."</js>,
- <js>"function loadResults(b) {"</js>,
- <js>" var doc = b.contentDocument || b.contentWindow.document;"</js>,
- <js>" var data = doc.getElementById('data') || doc.getElementsByTagName('body')[0];"</js>,
- <js>" document.getElementById('results').innerHTML = data.innerHTML;"</js>,
- <js>"}"</js>
- ),
- <jsm>form</jsm>(<js>"servlet:/"</js>).method(<jsf>POST</jsf>).target(<js>"buf"</js>).children(
- <jsm>table</jsm>(
- <jsm>tr</jsm>(
- <jsm>th</jsm>(<js>"Position (1-10000):"</js>).style(<js>"white-space:nowrap"</js>),
- <jsm>td</jsm>(<jsm>input</jsm>().name(<js>"pos"</js>).type(<js>"number"</js>).value(1)),
- <jsm>th</jsm>(<js>"Limit (1-10000):"</js>).style(<js>"white-space:nowrap"</js>),
- <jsm>td</jsm>(<jsm>input</jsm>().name(<js>"limit"</js>).type(<js>"number"</js>).value(100)),
- <jsm>td</jsm>(button(<js>"submit"</js>, <js>"Submit"</js>), <jsm>button</jsm>(<js>"reset"</js>, <js>"Reset"</js>))
- ),
- <jsm>tr</jsm>(
- <jsm>td</jsm>().colspan(5).children(
- <jsm>textarea</jsm>().name(<js>"sql"</js>).text(sql == <jk>null</jk> ? " " : sql).style(<js>"width:100%;height:200px;font-family:Courier;font-size:9pt;"</js>).onkeydown(<js>"checkTab(event)"</js>)
- )
- )
- )
- ),
- <jsm>br</jsm>(),
- <jsm>div</jsm>().id(<js>"results"</js>),
- <jsm>iframe</jsm>().name(<js>"buf"</js>).style(<js>"display:none"</js>).onload(<js>"parent.loadResults(this)"</js>)
- );
- }
-</p>
-<p>
- The form then submits its results to the following method using a form input bean:
-</p>
-<h5 class='figure'>SqlQueryResource.java</h5>
-<p class='bpcode w800'>
- <ja>@RestMethod</ja>(
- summary=<js>"Execute one or more queries"</js>
- )
- <ja>@Response</ja>(
- description=<js>"Query results.\nEach entry in the array is a result of one query.\nEach result can be a result set (for queries) or update count (for updates)."</js>
- )
- <jk>public</jk> List<Object> post(
- <ja>@Body</ja>(
- description=<js>"Query input"</js>,
- example=<js>"{sql:'select * from sys.systables',pos:1,limit:100}"</js>
- )
- PostInput in
- ) <jk>throws</jk> BadRequest {
-
- List<Object> results = <jk>new</jk> LinkedList<>();
-
- <jc>// Don't try to submit empty input.</jc>
- <jk>if</jk> (isEmpty(in.<jf>sql</jf>))
- <jk>return</jk> results;
-
- <jk>if</jk> (in.<jf>pos</jf> < 1 || in.<jf>pos</jf> > 10000)
- <jk>throw new</jk> BadRequest(<js>"Invalid value for position. Must be between 1-10000"</js>);
- <jk>if</jk> (in.<jf>limit</jf> < 1 || in.<jf>limit</jf> > 10000)
- <jk>throw new</jk> BadRequest(<js>"Invalid value for limit. Must be between 1-10000"</js>);
-
- String sql = <jk>null</jk>;
-
- <jc>// Create a connection and statement.
- // If these fails, let the exception filter up as a 500 error.</jc>
- <jk>try</jk> (Connection c = DriverManager.<jsm>getConnection</jsm>(connectionUrl)) {
- c.setAutoCommit(<jk>false</jk>);
- <jk>try</jk> (Statement st = c.createStatement()) {
- <jk>for</jk> (String s : in.<jf>sql</jf>.split(<js>";"</js>)) {
- sql = s.trim();
- <jk>if</jk> (! sql.isEmpty()) {
- Object o = <jk>null</jk>;
- <jk>if</jk> (<jf>allowUpdates</jf> || (<jf>allowTempUpdates</jf> && ! sql.matches(<js>"(?:i)commit.*"</js>))) {
- <jk>if</jk> (st.execute(sql)) {
- <jk>try</jk> (ResultSet rs = st.getResultSet()) {
- o = <jk>new</jk> ResultSetList(rs, in.<jf>pos</jf>, in.<jf>limit</jf>, <jf>includeRowNums</jf>);
- }
- } <jk>else</jk> {
- o = st.getUpdateCount();
- }
- } <jk>else</jk> {
- <jk>try</jk> (ResultSet rs = st.executeQuery(sql)) {
- o = <jk>new</jk> ResultSetList(rs, in.<jf>pos</jf>, in.<jf>limit</jf>, <jf>includeRowNums</jf>);
- }
- }
- results.add(o);
- }
- }
- }
- <jk>if</jk> (<jf>allowUpdates</jf>)
- c.commit();
- <jk>else if</jk> (<jf>allowTempUpdates</jf>)
- c.rollback();
- } <jk>catch</jk> (SQLException e) {
- <jk>throw new</jk> BadRequest(e, <js>"Invalid query: {0}"</js>, sql);
- }
-
- <jk>return</jk> results;
- }
-
- <jk>public static class</jk> PostInput {
- <jk>public</jk> String <jf>sql</jf> = <js>""</js>;
- <jk>public int</jk> <jf>pos</jf> = 1, <jf>limit</jf> = 100;
- }
-</p>
-<p>
- Note that we could have also used <ja>@FormData</ja> parameters as well.
-</p>
-</div><!-- END: 17.3 - juneau-examples-rest.PetStoreResource -->
-
-<!-- ==================================================================================================== -->
-
-<h3 class='topic updated' onclick='toggle(this)'><a href='#juneau-examples-rest.DtoExamples' id='juneau-examples-rest.DtoExamples'>17.4 - DtoExamples</a></h3>
-<div class='topic'><!-- START: 17.4 - juneau-examples-rest.DtoExamples -->
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-examples-rest.DtoExamples' id='juneau-examples-rest.DtoExamples'>17.3 - DtoExamples</a></h3>
+<div class='topic'><!-- START: 17.3 - juneau-examples-rest.DtoExamples -->
<p>
The <l>DtoExamples</l> resource is a resource group for demonstrating various DTO examples.
</p>
@@ -28885,12 +27524,12 @@
}
}
</p>
-</div><!-- END: 17.4 - juneau-examples-rest.DtoExamples -->
+</div><!-- END: 17.3 - juneau-examples-rest.DtoExamples -->
<!-- ==================================================================================================== -->
-<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-examples-rest.ConfigResource' id='juneau-examples-rest.ConfigResource'>17.5 - ConfigResource</a></h3>
-<div class='topic'><!-- START: 17.5 - juneau-examples-rest.ConfigResource -->
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-examples-rest.ConfigResource' id='juneau-examples-rest.ConfigResource'>17.4 - ConfigResource</a></h3>
+<div class='topic'><!-- START: 17.4 - juneau-examples-rest.ConfigResource -->
<p>
The {@link org.apache.juneau.microservice.resources.ConfigResource} class is a predefined reusable resource.
It provides a REST interface for reading and altering the microservice config file.
@@ -29040,12 +27679,12 @@
}
}
</p>
-</div><!-- END: 17.5 - juneau-examples-rest.ConfigResource -->
+</div><!-- END: 17.4 - juneau-examples-rest.ConfigResource -->
<!-- ==================================================================================================== -->
-<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-examples-rest.LogsResource' id='juneau-examples-rest.LogsResource'>17.6 - LogsResource</a></h3>
-<div class='topic'><!-- START: 17.6 - juneau-examples-rest.LogsResource -->
+<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-examples-rest.LogsResource' id='juneau-examples-rest.LogsResource'>17.5 - LogsResource</a></h3>
+<div class='topic'><!-- START: 17.5 - juneau-examples-rest.LogsResource -->
<p>
The {@link org.apache.juneau.microservice.resources.LogsResource} class is a reusable predefined resource.
It provides a REST interface for the log files generated by the microservice.
@@ -29057,7 +27696,7 @@
http://localhost:10000/logs
</p>
<img class='bordered w800' src='doc-files/juneau-examples-rest.LogsResource.1.png'>
-</div><!-- END: 17.6 - juneau-examples-rest.LogsResource -->
+</div><!-- END: 17.5 - juneau-examples-rest.LogsResource -->
</div><!-- END: 17 - juneau-examples-rest -->
<!-- ==================================================================================================== -->
@@ -30062,7 +28701,8 @@
<li><p><a class='doclink' href='#7.2.1'>7.2.1 (Oct 23, 2018)</a></p>
<li><p><a class='doclink' href='#7.2.2'>7.2.2 (Nov 7, 2018)</a></p>
<li><p><a class='doclink' href='#8.0.0'>8.0.0 (Jan 01, 2019)</a></p>
-<li><p><a class='doclink' href='#8.1.0'>8.1.0 (TBD)</a></p>
+<li><p><a class='doclink' href='#8.1.0'>8.1.0 (Aug 21, 2019)</a></p>
+<li><p><a class='doclink' href='#8.1.1'>8.1.1 (TBD)</a></p>
</ul>
@@ -36200,7 +34840,7 @@
<!-- ==================================================================================================== -->
-<h3 class='topic' onclick='toggle(this)'><a href='#8.1.0' id='8.1.0'>8.1.0 (TBD)</a></h3>
+<h3 class='topic' onclick='toggle(this)'><a href='#8.1.0' id='8.1.0'>8.1.0 (Aug 21, 2019)</a></h3>
<div class='topic'><!-- START: 8.1.0 -->
<p>
8.1.0 introduces some significant new features including:
@@ -36541,5 +35181,93 @@
</ul>
</div><!-- END: 8.1.0 -->
+<!-- ==================================================================================================== -->
+
+<h3 class='topic' onclick='toggle(this)'><a href='#8.1.1' id='8.1.1'>8.1.1 (TBD)</a></h3>
+<div class='topic'><!-- START: 8.1.1 -->
+<p>
+ TODO
+</p>
+
+<h5 class='topic w800'>juneau-marshall</h5>
+<ul class='spaced-list'>
+ <li>
+ Support for serializing/parsing {@link java.util.Optional} objects and bean properties.
+ <li>
+ Fixed a bug in the parsers where the generic subtype of a complex bean property type involving both collections and arrays
+ was not being found. (e.g. <c>List<Long>[]</c>)
+ <li>
+ New packages of HTTP response/exceptions beans from <c>juneau-rest-server</c> bundle and REST proxy annotations from <c>juneau-rest-client</c>
+ so that they can be used when building REST proxy interfaces while only pulling in the marshall bundle.
+ <ul>
+ <li class='jp'>{@link org.apache.juneau.http.response}
+ <li class='jp'>{@link org.apache.juneau.http.exception}
+ <li class='jp'>{@link org.apache.juneau.http.remote}
+ </ul>
+ These replace the <c>org.apache.juneau.rest.response</c>, <c>org.apache.juneau.rest.exception</c>, and <c>org.apache.juneau.rest.client.remote</c> packages.
+ <li>
+ Defaulting SVL variables now won't ignore additional parameters.
+ <br><js>"$S{Foo,bar,baz}"</js> used to default to <js>"bar"</js> but now will default to <js>"bar,baz"</js>.
+ <li>
+ Ranking support has been added to all <ja>@XConfig</ja> annotations.
+ This allows you to override the normal precedence of application of config annotations on class and method hierarchies.
+</ul>
+
+<h5 class='topic w800'>juneau-rest-server</h5>
+<ul class='spaced-list'>
+ <li>
+ Support for {@link java.util.Optional} on method parameters annotated with {@link org.apache.juneau.http.annotation.Header}, {@link org.apache.juneau.http.annotation.FormData},
+ {@link org.apache.juneau.http.annotation.Query}, {@link org.apache.juneau.http.annotation.Path}.
+ <li>
+ Fixed issue where {@link org.apache.juneau.rest.annotation.RestMethod#debug() RestMethod.debug()} annotation wasn't resulting
+ in the HTTP request being logged.
+ <li>
+ {@link org.apache.juneau.rest.RestException} has been deprecated and replaced by {@link org.apache.juneau.http.exception.HttpException}.
+ <li>
+ Resolved issue where parameterized types on <ja>@RestMethod</ja>-annotated method parameters of Spring beans.
+ This is due to Spring relying on CGLIB for runtime-recompilation of beans that results in loss of parameterized-type
+ information.
+ <br>In the following example, the <c>beans</c> parameter would resolve as an unparameterized <c>List</c>
+ which would typically result in getting a <c>List<ObjectMap><c> and subsequent <c>ClassCastExceptions</c>.
+ <p class='bpcode w800'>
+ <ja>@RestMethod</ja>
+ <jk>public void</jk> doFoo(<ja>@Body</ja> List<MyBean> beans) {...}
+ </p>
+ The fix involves resolving the original bean class for resolving parameterized type while leaving
+ method invocation on the proxy method so as not to bypass Spring features.
+ <li>
+ New methods on {@link org.apache.juneau.rest.BasicRest} to provide feature-parity with {@link org.apache.juneau.rest.RestServlet}:
+ <ul class='javatree'>
+ <li class='jc'>{@link org.apache.juneau.rest.BasicRest}
+ <ul>
+ <li class='jm'>{@link org.apache.juneau.rest.BasicRest#getContext() getContext()}
+ <li class='jm'>{@link org.apache.juneau.rest.BasicRest#getRequest() getRequest()}
+ <li class='jm'>{@link org.apache.juneau.rest.BasicRest#getResponse() getResponse()}
+ <li class='jm'>{@link org.apache.juneau.rest.BasicRest#log(String) log(String)}
+ <li class='jm'>{@link org.apache.juneau.rest.BasicRest#log(String,Throwable) log(String,Throwable)}
+ <li class='jm'>{@link org.apache.juneau.rest.BasicRest#log(Level,String,Object[]) log(Level,String,Object[])}
+ <li class='jm'>{@link org.apache.juneau.rest.BasicRest#logObjects(Level,String,Object[]) logObjects(Level,String,Object[])}
+ <li class='jm'>{@link org.apache.juneau.rest.BasicRest#log(Level,Throwable,String,Object[]) log(Level,Throwable,String,Object[])}
+ </ul>
+ </ul>
+ <li>
+ The <c>@RestResource(staticFiles)</c> annotation now supports absolute path locations and multiple mappings:
+ <p class='bpcode w800'>
+ <jc>// Resolves static files in root package "htdocs" or working directory "htdocs", and then relative package "htdocs".</jc>
+ <ja>@RestResource</ja>(staticFiles=<js>"htdocs:/htdocsfolder,htdocs:htdocs.package"</js>)
+ </p>
+ <li>
+ Fixed a bug in <c>@RestResource(staticFiles)</c> where the order of lookup between parent and child resources
+ was wrong.
+</ul>
+
+<h5 class='topic w800'>juneau-rest-client</h5>
+<ul class='spaced-list'>
+ <li>
+ Removed the dependency on the <c>juneau-rest-server</c> module.
+ Allows the client API to be used without pulling in all the javax.servlet and server dependencies.
+</ul>
+</div><!-- END: 8.1.1 -->
+
</div>
</body>
diff --git a/juneau-doc/src/main/javadoc/resources/docs.txt b/juneau-doc/src/main/javadoc/resources/docs.txt
index 06c0958..1ab4526 100644
--- a/juneau-doc/src/main/javadoc/resources/docs.txt
+++ b/juneau-doc/src/main/javadoc/resources/docs.txt
@@ -32,6 +32,7 @@
Security.juneau-marshall = #Security.juneau-marshall, Overview > Security Best-Practices > juneau-marshall
Security.juneau-rest-server = #Security.juneau-rest-server, Overview > Security Best-Practices > juneau-rest-server
Security.juneau-svl = #Security.juneau-svl, Overview > Security Best-Practices > juneau-svl
+SimpleJson = #juneau-marshall.JsonDetails.SimplifiedJson, Simple JSON
Source.juneau- = https://github.com/apache/juneau/blob/master/juneau-core/juneau-dto, Source
Source.juneau-config = https://github.com/apache/juneau/blob/master/juneau-core/juneau-config, Source
Source.juneau-dto = https://github.com/apache/juneau/blob/master/juneau-core/juneau-dto, Source
@@ -114,7 +115,6 @@
juneau-examples-rest.DtoExamples = #juneau-examples-rest.DtoExamples, Overview > juneau-examples-rest > DtoExamples
juneau-examples-rest.HelloWorldResource = #juneau-examples-rest.HelloWorldResource, Overview > juneau-examples-rest > HelloWorldResource
juneau-examples-rest.LogsResource = #juneau-examples-rest.LogsResource, Overview > juneau-examples-rest > LogsResource
-juneau-examples-rest.PetStoreResource = #juneau-examples-rest.PetStoreResource, Overview > juneau-examples-rest > PetStore
juneau-examples-rest.RootResources = #juneau-examples-rest.RootResources, Overview > juneau-examples-rest > RootResources
juneau-marshall = #juneau-marshall, Overview > juneau-marshall
juneau-marshall-rdf = #juneau-marshall-rdf, Overview > juneau-marshall-rdf
diff --git a/juneau-doc/src/main/javadoc/resources/fragments/toc.html b/juneau-doc/src/main/javadoc/resources/fragments/toc.html
index baee82d..24eb6d2 100644
--- a/juneau-doc/src/main/javadoc/resources/fragments/toc.html
+++ b/juneau-doc/src/main/javadoc/resources/fragments/toc.html
@@ -15,7 +15,7 @@
<ol class='toc'>
<li><p class='toc2'><a class='doclink' href='{OVERVIEW_URL}#Introduction'>Introduction</a></p>
<ol>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#Introduction.Features'>Features</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#Introduction.Features'>Features</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#Introduction.Components'>Components</a></p>
</ol>
<li><p class='toc2'><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall'>juneau-marshall</a></p>
@@ -28,26 +28,26 @@
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.ConfigurableProperties'>Configurable Properties</a></p>
<ol>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.ConfigurableProperties.Common'>Common Serializer Properties</a></p>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.ConfigurableProperties.CommonSerializer'>Common Serializer Properties</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.ConfigurableProperties.CommonSerializer'>Common Serializer Properties</a></p>
<li><p class='update'><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.ConfigurableProperties.CommonParser'>Common Parser Properties</a></p>
</ol>
- <li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.ConfigurableAnnotations'>Configurable Annotations</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.ConfigurableAnnotations'>Configurable Annotations</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.ObjectMap'>ObjectMap and ObjectList</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Groups'>SerializerGroups and ParserGroups</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.ContextsBuildersSessionsPropertyStores'>Contexts, Builders, Sessions, and PropertyStores</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms'>Transforms</a></p>
<ol>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.PojoSwaps'>PojoSwaps</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.PojoSwaps'>PojoSwaps</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.DefaultPojoSwaps'>Default PojoSwaps</a></p>
- <li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.AutoPojoSwaps'>Auto-detected POJO swaps</a></p>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.PerMediaTypePojoSwaps'>Per-media-type PojoSwaps</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.AutoPojoSwaps'>Auto-detected POJO swaps</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.PerMediaTypePojoSwaps'>Per-media-type PojoSwaps</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.OneWayPojoSwaps'>One-way PojoSwaps</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.SwapAnnotation'>@Swap Annotation</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.TemplatedSwaps'>Templated Swaps</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.SurrogateClasses'>Surrogate Classes</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.BeanAnnotation'>@Bean Annotation</a></p>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.BeanPropertyAnnotation'>@BeanProperty Annotation</a></p>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.BeanConstructorAnnotation'>@BeanConstructor Annotation</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.BeanPropertyAnnotation'>@BeanProperty Annotation</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.BeanConstructorAnnotation'>@BeanConstructor Annotation</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.BeanIgnoreAnnotation'>@BeanIgnore Annotation</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.NamePropertyAnnotation'>@NameProperty Annotation</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-marshall.Transforms.ParentPropertyAnnotation'>@ParentProperty Annotation</a></p>
@@ -149,9 +149,9 @@
<li><p class='toc2'><a class='doclink' href='{OVERVIEW_URL}#juneau-svl'>juneau-svl</a></p>
<ol>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-svl.SimpleVarLanguage'>Simple Variable Language</a></p>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-svl.SvlVariables'>SVL Variables</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-svl.SvlVariables'>SVL Variables</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-svl.VarResolvers'>VarResolvers and VarResolverSessions</a></p>
- <li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-svl.DefaultVarResolver'>VarResolver.DEFAULT</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-svl.DefaultVarResolver'>VarResolver.DEFAULT</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-svl.OtherNotes'>Other Notes</a></p>
</ol>
<li><p class='toc2'><a class='doclink' href='{OVERVIEW_URL}#juneau-config'>juneau-config</a></p>
@@ -184,7 +184,7 @@
</ol>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-config.Listeners'>Listeners</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-config.Serializing'>Serializing</a></p>
- <li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-config.Imports'>Imports</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-config.Imports'>Imports</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-config.ConfigStores'>Config Stores</a></p>
<ol>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-config.ConfigStores.ConfigMemoryStore'>ConfigMemoryStore</a></p>
@@ -194,27 +194,27 @@
</ol>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-config.ReadOnlyConfigs'>Read-only Configs</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-config.ClosingConfigs'>Closing Configs</a></p>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-config.SystemDefaultConfig'>System Default Config</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-config.SystemDefaultConfig'>System Default Config</a></p>
</ol>
<li><p class='toc2'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server'>juneau-rest-server</a></p>
<ol>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HelloWorldExample'>Hello World Example</a></p>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.ClassHierarchy'>Class Hierarchy</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.ClassHierarchy'>Class Hierarchy</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation'>Instantiation</a></p>
<ol>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.RestServlet'>RestServlet</a></p>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.BasicRestServlet'>BasicRestServlet</a></p>
- <li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.BasicRest'>BasicRest</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.BasicRestServlet'>BasicRestServlet</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.BasicRest'>BasicRest</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.Children'>Children</a></p>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.BasicRestServletGroup'>BasicRestServletGroup</a></p>
- <li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.BasicRestGroup'>BasicRestGroup</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.BasicRestServletGroup'>BasicRestServletGroup</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.BasicRestGroup'>BasicRestGroup</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.ResourceResolvers'>Resource Resolvers</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.LifecycleHooks'>Lifecycle Hooks</a></p>
</ol>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.RestResource'>@RestResource</a></p>
<ol>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.RestResource.AnnotationInheritance'>Annotation Inheritance</a></p>
- <li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.RestResource.RestResourcePath'>@RestResource(path)</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.RestResource.RestResourcePath'>@RestResource(path)</a></p>
</ol>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.RestContext'>RestContext</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.RestMethod'>@RestMethod</a></p>
@@ -224,7 +224,7 @@
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.RestMethod.RestResponse'>RestResponse</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.RestMethod.RequestBody'>RequestBody</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.RestMethod.RequestHeaders'>RequestHeaders</a></p>
- <li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.RestMethod.RequestAttributes'>RequestAttributes</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.RestMethod.RequestAttributes'>RequestAttributes</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.RestMethod.RequestQuery'>RequestQuery</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.RestMethod.RequestFormData'>RequestFormData</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.RestMethod.RestMethodPath'>@RestMethod(path)</a></p>
@@ -242,8 +242,8 @@
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.OpenApiSchemaPartSerializing'>OpenAPI Schema Part Serializing</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HttpPartAnnotations'>HTTP-Part Annotations</a></p>
<ol>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HttpPartAnnotations.Body'>@Body</a></p>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HttpPartAnnotations.FormData'>@FormData</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HttpPartAnnotations.Body'>@Body</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HttpPartAnnotations.FormData'>@FormData</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HttpPartAnnotations.HasFormData'>@HasFormData</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HttpPartAnnotations.Query'>@Query</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HttpPartAnnotations.HasQuery'>@HasQuery</a></p>
@@ -258,18 +258,18 @@
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HandlingMultiPartFormPosts'>Handling Multi-Part Form Posts</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Serializers'>Serializers</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Parsers'>Parsers</a></p>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.ConfigurableProperties'>Configurable Properties</a></p>
- <li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.ConfigurableAnnotations'>Configurable Annotations</a></p>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Transforms'>Transforms</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.ConfigurableProperties'>Configurable Properties</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.ConfigurableAnnotations'>Configurable Annotations</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Transforms'>Transforms</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.URIs'>URIs</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Guards'>Guards</a></p>
- <li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.RoleGuards'>Role guards</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.RoleGuards'>Role guards</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Converters'>Converters</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Messages'>Messages</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Encoders'>Encoders</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.SvlVariables'>SVL Variables</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.ConfigurationFiles'>Configuration Files</a></p>
- <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.StaticFiles'>Static files</a></p>
+ <li><p class='todo'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.StaticFiles'>Static files</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.ClientVersioning'>Client Versioning</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.RestInfoProvider'>RestInfoProvider</a></p>
<ol>
@@ -277,27 +277,27 @@
</ol>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Swagger'>Swagger</a></p>
<ol>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Swagger.BasicRestServlet'>BasicRestServlet</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Swagger.BasicRestServlet'>BasicRestServlet</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Swagger.BasicSwaggerInfo'>Basic Swagger Info</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Swagger.Tags'>Tags</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Swagger.Operations'>Operations</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Swagger.Parameters'>Parameters</a></p>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Swagger.ParameterExamples'>Parameter Examples</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Swagger.ParameterExamples'>Parameter Examples</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Swagger.Responses'>Responses</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Swagger.ResponseExamples'>Response Examples</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Swagger.Models'>Models</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Swagger.Stylesheet'>SwaggerUI.css</a></p>
</ol>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HtmlDocAnnotation'>@HtmlDocConfig</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HtmlDocAnnotation'>@HtmlDocConfig</a></p>
<ol>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HtmlDocAnnotation.UIvsDI'>User Interfaces (UI) vs. Developer Interfaces (DI)</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HtmlDocAnnotation.Widgets'>Widgets</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HtmlDocAnnotation.PredefinedWidgets'>Predefined Widgets</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HtmlDocAnnotation.UiCustomization'>UI Customization</a></p>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HtmlDocAnnotation.Stylesheets'>Stylesheets</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HtmlDocAnnotation.Stylesheets'>Stylesheets</a></p>
</ol>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.DefaultHeaders'>Default Headers</a></p>
- <li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.LoggingAndDebugging'>Logging / Debugging</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.LoggingAndDebugging'>Logging / Debugging</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HttpStatusCodes'>HTTP Status Codes</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.OverloadingHttpMethods'>Overloading HTTP Methods</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.BuiltInParameters'>Built-in Parameters</a></p>
@@ -314,7 +314,7 @@
<li><p class='toc2'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server-springboot'>juneau-rest-server-springboot</a></p>
<ol>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server-springboot.Overview'>Overview</a></p>
- <li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server-springboot.ChildResources'>Child Resources</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server-springboot.ChildResources'>Child Resources</a></p>
</ol>
<li><p class='toc2'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-client'>juneau-rest-client</a></p>
<ol>
@@ -345,10 +345,10 @@
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-client.Interceptors'>Interceptors</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-client.Other'>Other Useful Methods</a></p>
</ol>
- <li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-mock'>juneau-rest-mock</a></p>
+ <li><p class='toc2'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-mock'>juneau-rest-mock</a></p>
<ol>
- <li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-mock.MockRest'>MockRest</a></p>
- <li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-mock.MockRemoteResource'>MockRemoteResource</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-mock.MockRest'>MockRest</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-mock.MockRemoteResource'>MockRemoteResource</a></p>
</ol>
<li><p class='toc2'><a class='doclink' href='{OVERVIEW_URL}#juneau-microservice-core'>juneau-microservice-core</a></p>
<ol>
@@ -393,10 +393,9 @@
</ol>
<li><p class='toc2'><a class='doclink' href='{OVERVIEW_URL}#juneau-examples-rest'>juneau-examples-rest</a></p>
<ol>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-examples-rest.RootResources'>RootResources</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-examples-rest.RootResources'>RootResources</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-examples-rest.HelloWorldResource'>HelloWorldResource</a></p>
- <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-examples-rest.PetStoreResource'>PetStore</a></p>
- <li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-examples-rest.DtoExamples'>DtoExamples</a></p>
+ <li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-examples-rest.DtoExamples'>DtoExamples</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-examples-rest.ConfigResource'>ConfigResource</a></p>
<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-examples-rest.LogsResource'>LogsResource</a></p>
</ol>
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/oapi/OapiExample.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/oapi/OapiExample.java
index e8be9bd..c540715 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/oapi/OapiExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/oapi/OapiExample.java
@@ -21,7 +21,7 @@
import org.apache.juneau.oapi.OpenApiSerializer;
/**
- * Sample class which shows the simple usage of OpenApiSerializer
+ * Sample class which shows the simple usage of OpenApiSerializer.
*
* <ul class='seealso'>
* <li class='extlink'>{@source}
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/svl/SvlExample.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/svl/SvlExample.java
index 2ea51d4..5c6c989 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/svl/SvlExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/svl/SvlExample.java
@@ -15,7 +15,7 @@
import org.apache.juneau.svl.*;
/**
- * TODO
+ * TODO.
*
* <ul class='seealso'>
* <li class='extlink'>{@source}
diff --git a/juneau-examples/pom.xml b/juneau-examples/pom.xml
index 93a7d69..cf817f0 100644
--- a/juneau-examples/pom.xml
+++ b/juneau-examples/pom.xml
@@ -34,7 +34,6 @@
<module>juneau-examples-rest-jetty</module>
<module>juneau-examples-rest-springboot</module>
<module>juneau-examples-rest-jetty-ftest</module>
- <module>juneau-examples-petstore</module>
</modules>
</project>
diff --git a/juneau-rest/juneau-rest-mock/src/main/java/org/apache/juneau/rest/mock2/MockRemoteResource.java b/juneau-rest/juneau-rest-mock/src/main/java/org/apache/juneau/rest/mock2/MockRemoteResource.java
index 164e9cf..18b27eb 100644
--- a/juneau-rest/juneau-rest-mock/src/main/java/org/apache/juneau/rest/mock2/MockRemoteResource.java
+++ b/juneau-rest/juneau-rest-mock/src/main/java/org/apache/juneau/rest/mock2/MockRemoteResource.java
@@ -243,7 +243,7 @@
/**
* Adds an <c>Accept</c> header to every request.
*
- * @param value The <code>Accept/code> header value.
+ * @param value The <c>Accept</c> header value.
* @return This object (for method chaining).
*/
public MockRemoteResource<T> accept(String value) {
diff --git a/juneau-rest/juneau-rest-mock/src/main/java/org/apache/juneau/rest/mock2/MockRest.java b/juneau-rest/juneau-rest-mock/src/main/java/org/apache/juneau/rest/mock2/MockRest.java
index 276c1ea..ac6a309 100644
--- a/juneau-rest/juneau-rest-mock/src/main/java/org/apache/juneau/rest/mock2/MockRest.java
+++ b/juneau-rest/juneau-rest-mock/src/main/java/org/apache/juneau/rest/mock2/MockRest.java
@@ -271,7 +271,7 @@
/**
* Specifies the <c>Accept</c> header to every request.
*
- * @param value The <code>Accept/code> header value.
+ * @param value The <c>Accept</c> header value.
* @return This object (for method chaining).
*/
public Builder accept(String value) {
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRest.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRest.java
index 056a806..3e1f98a 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRest.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRest.java
@@ -24,7 +24,7 @@
import org.apache.juneau.http.exception.*;
/**
- * Identical to {@link BasicRestServlet} but doesn't extend from {@link HttpServlet}
+ * Identical to {@link BasicRestServlet} but doesn't extend from {@link HttpServlet}.
*
* <ul class='seealso'>
* <li class='link'>{@doc juneau-rest-server.Instantiation.BasicRest}
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestGroup.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestGroup.java
index f2c64e6..d8ac5b2 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestGroup.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestGroup.java
@@ -20,7 +20,7 @@
import org.apache.juneau.rest.helper.*;
/**
- * Identical to {@link BasicRestServletGroup} but doesn't extend from {@link HttpServlet}
+ * Identical to {@link BasicRestServletGroup} but doesn't extend from {@link HttpServlet}.
*
* <ul class='seealso'>
* <li class='link'>{@doc juneau-rest-server.Instantiation.BasicRestGroup}
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestCallLoggerConfig.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestCallLoggerConfig.java
index e695412..cdb9184 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestCallLoggerConfig.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestCallLoggerConfig.java
@@ -143,9 +143,9 @@
* <p>
* Possible values (case-insensitive):
* <ul>
- * <li><{@link Enablement#TRUE TRUE} - No-trace mode enabled for all requests.
- * <li><{@link Enablement#FALSE FALSE} - No-trace mode disabled for all requests.
- * <li><{@link Enablement#PER_REQUEST PER_REQUEST} - No-trace mode enabled for requests that have a <js>"X-NoTrace: true"</js> header.
+ * <li>{@link Enablement#TRUE TRUE} - No-trace mode enabled for all requests.
+ * <li>{@link Enablement#FALSE FALSE} - No-trace mode disabled for all requests.
+ * <li>{@link Enablement#PER_REQUEST PER_REQUEST} - No-trace mode enabled for requests that have a <js>"X-NoTrace: true"</js> header.
* </ul>
*
* @param value
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
index 7956795..c44ab14 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
@@ -2511,7 +2511,7 @@
* <p class='bcode w800'>
* <ja>@RestResource</ja>(
* rolesDeclared=<js>"ROLE_ADMIN,ROLE_READ_WRITE,ROLE_READ_ONLY,ROLE_SPECIAL"</js>,
- * roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
+ * roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
* )
* <jk>public class</jk> MyResource <jk>extends</jk> RestServlet {
* ...
@@ -2552,7 +2552,7 @@
* <p class='bcode w800'>
* <ja>@RestResource</ja>(
* path=<js>"/foo"</js>,
- * roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
+ * roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
* )
* <jk>public class</jk> MyResource <jk>extends</jk> RestServlet {
* ...
@@ -2568,8 +2568,8 @@
* <li><js>"foo | bar | bqz"</js> - Multiple OR'ed arguments, pipe syntax.
* <li><js>"foo || bar || bqz"</js> - Multiple OR'ed arguments, Java-OR syntax.
* <li><js>"fo*"</js> - Patterns including <js>'*'</js> and <js>'?'</js>.
- * <li><js>"fo* & *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
- * <li><js>"fo* && *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
+ * <li><js>"fo* & *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
+ * <li><js>"fo* && *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
* <li><js>"fo* || (*oo || bar)"</js> - Parenthesis.
* </ul>
* <li>
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContextBuilder.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContextBuilder.java
index d10bd91..21751cf 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContextBuilder.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContextBuilder.java
@@ -1587,7 +1587,7 @@
* <p class='bcode w800'>
* <ja>@RestResource</ja>(
* rolesDeclared=<js>"ROLE_ADMIN,ROLE_READ_WRITE,ROLE_READ_ONLY,ROLE_SPECIAL"</js>,
- * roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
+ * roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
* )
* <jk>public class</jk> MyResource <jk>extends</jk> RestServlet {
* ...
@@ -1614,7 +1614,7 @@
* <p class='bcode w800'>
* <ja>@RestResource</ja>(
* path=<js>"/foo"</js>,
- * roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
+ * roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
* )
* <jk>public class</jk> MyResource <jk>extends</jk> RestServlet {
* ...
@@ -1630,8 +1630,8 @@
* <li><js>"foo | bar | bqz"</js> - Multiple OR'ed arguments, pipe syntax.
* <li><js>"foo || bar || bqz"</js> - Multiple OR'ed arguments, Java-OR syntax.
* <li><js>"fo*"</js> - Patterns including <js>'*'</js> and <js>'?'</js>.
- * <li><js>"fo* & *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
- * <li><js>"fo* && *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
+ * <li><js>"fo* & *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
+ * <li><js>"fo* && *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
* <li><js>"fo* || (*oo || bar)"</js> - Parenthesis.
* </ul>
* <li>
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestMethodContext.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestMethodContext.java
index 758cfa3..68fc806 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestMethodContext.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestMethodContext.java
@@ -466,7 +466,7 @@
public static final String RESTMETHOD_path = PREFIX + ".path.s";
/**
- * Configuration property: Priority
+ * Configuration property: Priority.
*
* <h5 class='section'>Property:</h5>
* <ul>
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java
index e77fb87..47f76d7 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java
@@ -759,7 +759,7 @@
* name=<jsf>GET</jsf>,
* path=<js>"/foo"</js>,
* rolesDeclared=<js>"ROLE_ADMIN,ROLE_READ_WRITE,ROLE_READ_ONLY,ROLE_SPECIAL"</js>,
- * roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
+ * roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
* )
* <jk>public</jk> Object doGet() {
* }
@@ -785,7 +785,7 @@
* <ja>@RestMethod</ja>(
* name=<jsf>GET</jsf>,
* path=<js>"/foo"</js>,
- * roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
+ * roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
* )
* <jk>public</jk> Object doGet() {
* }
@@ -801,8 +801,8 @@
* <li><js>"foo | bar | baz"</js> - Multiple OR'ed arguments, pipe syntax.
* <li><js>"foo || bar || baz"</js> - Multiple OR'ed arguments, Java-OR syntax.
* <li><js>"fo*"</js> - Patterns including <js>'*'</js> and <js>'?'</js>.
- * <li><js>"fo* & *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
- * <li><js>"fo* && *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
+ * <li><js>"fo* & *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
+ * <li><js>"fo* && *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
* <li><js>"fo* || (*oo || bar)"</js> - Parenthesis.
* </ul>
* <li>
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestResource.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
index ce9608c..09a896a 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
@@ -897,7 +897,7 @@
* <p class='bcode w800'>
* <ja>@RestResource</ja>(
* rolesDeclared=<js>"ROLE_ADMIN,ROLE_READ_WRITE,ROLE_READ_ONLY,ROLE_SPECIAL"</js>,
- * roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
+ * roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
* )
* <jk>public class</jk> MyResource <jk>extends</jk> RestServlet {
* ...
@@ -920,7 +920,7 @@
* <p class='bcode w800'>
* <ja>@RestResource</ja>(
* path=<js>"/foo"</js>,
- * roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
+ * roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE && ROLE_SPECIAL)"</js>
* )
* <jk>public class</jk> MyResource <jk>extends</jk> RestServlet {
* ...
@@ -936,8 +936,8 @@
* <li><js>"foo | bar | baz"</js> - Multiple OR'ed arguments, pipe syntax.
* <li><js>"foo || bar || baz"</js> - Multiple OR'ed arguments, Java-OR syntax.
* <li><js>"fo*"</js> - Patterns including <js>'*'</js> and <js>'?'</js>.
- * <li><js>"fo* & *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
- * <li><js>"fo* && *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
+ * <li><js>"fo* & *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
+ * <li><js>"fo* && *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
* <li><js>"fo* || (*oo || bar)"</js> - Parenthesis.
* </ul>
* <li>
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/guards/RoleBasedRestGuard.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/guards/RoleBasedRestGuard.java
index 683ddb4..1c22a80 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/guards/RoleBasedRestGuard.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/guards/RoleBasedRestGuard.java
@@ -29,8 +29,8 @@
* <li><js>"foo | bar | bqz"</js> - Multiple OR'ed arguments, pipe syntax.
* <li><js>"foo || bar || bqz"</js> - Multiple OR'ed arguments, Java-OR syntax.
* <li><js>"fo*"</js> - Patterns including <js>'*'</js> and <js>'?'</js>.
- * <li><js>"fo* & *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
- * <li><js>"fo* && *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
+ * <li><js>"fo* & *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
+ * <li><js>"fo* && *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
* <li><js>"fo* || (*oo || bar)"</js> - Parenthesis.
* </ul>
*
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/guards/RoleMatcher.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/guards/RoleMatcher.java
index 943d37a..0f0e704 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/guards/RoleMatcher.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/guards/RoleMatcher.java
@@ -31,8 +31,8 @@
* <li><js>"foo | bar | bqz"</js> - Multiple OR'ed arguments, pipe syntax.
* <li><js>"foo || bar || bqz"</js> - Multiple OR'ed arguments, Java-OR syntax.
* <li><js>"fo*"</js> - Patterns including <js>'*'</js> and <js>'?'</js>.
- * <li><js>"fo* & *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
- * <li><js>"fo* && *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
+ * <li><js>"fo* & *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
+ * <li><js>"fo* && *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
* <li><js>"fo* || (*oo || bar)"</js> - Parenthesis.
* </ul>
*
diff --git a/launches/juneau-env.sh b/launches/juneau-env.sh
index 3887af2..65e1dde 100755
--- a/launches/juneau-env.sh
+++ b/launches/juneau-env.sh
@@ -13,5 +13,5 @@
. ~/.profile
set -e
-export JUNEAU_VERSION=8.1.0
+export JUNEAU_VERSION=8.1.1
[ -z "$X_VERSION" ] && export X_VERSION="${JUNEAU_VERSION}-SNAPSHOT"