This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new f42810f Javadocs
f42810f is described below
commit f42810f10ec8b3e16c53f603809e2f4b674ac713
Author: JamesBognar <[email protected]>
AuthorDate: Sat Nov 23 20:26:53 2019 -0500
Javadocs
---
.../apache/juneau/annotation/BeanConstructor.java | 2 +-
juneau-doc/docs/ReleaseNotes/8.1.2.html | 2 +-
...ctorAnnotation.html => 11.BeancAnnotation.html} | 2 +-
.../04.Rest/01.AnnotationInheritance.html | 16 -
.../35.BuiltInParameters.html | 2 +-
.../01.RestProxies/10.DualPurposeInterfaces.html | 2 +-
....MockRemoteResource.html => 02.MockRemote.html} | 0
juneau-doc/src/main/javadoc/overview.html | 696 ++++++++++-----------
juneau-doc/src/main/javadoc/resources/docs.txt | 12 +-
.../src/main/javadoc/resources/fragments/toc.html | 12 +-
.../juneau/rest/annotation/RestResource.java | 2 +-
11 files changed, 360 insertions(+), 388 deletions(-)
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConstructor.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConstructor.java
index 7716c67..19c04fd 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConstructor.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConstructor.java
@@ -43,7 +43,7 @@ import org.apache.juneau.*;
* Multiple calls to {@link BeanMap#getBean()} will return the same bean
instance.
*
* <ul class='seealso'>
- * <li class='link'>{@doc
juneau-marshall.Transforms.BeanConstructorAnnotation}
+ * <li class='link'>{@doc juneau-marshall.Transforms.BeancAnnotation}
* </ul>
*
* @deprecated Use {@link Beanc}
diff --git a/juneau-doc/docs/ReleaseNotes/8.1.2.html
b/juneau-doc/docs/ReleaseNotes/8.1.2.html
index 8f5e235..cf3ec43 100644
--- a/juneau-doc/docs/ReleaseNotes/8.1.2.html
+++ b/juneau-doc/docs/ReleaseNotes/8.1.2.html
@@ -46,7 +46,7 @@
<li>
{@link oaj.annotation.Beanc @Beanc} replaces {@link
oaj.annotation.BeanConstructor @BeanConstructor}.
<li>
- {@link oaj.http.remote.@Remote @Remote} replaces {@link
oaj.http.remote.@RemoteResource}.
+ {@link oaj.http.remote.Remote @Remote} replaces {@link
oaj.http.remote.RemoteResource @RemoteResource}.
<li>
Shortened names for {@link oaj.annotation.Bean#dictionary
@Bean(dictionary)} and {@link oaj.BeanContextBuilder#dictionary(Class...)}.
</ul>
diff --git
a/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms/11.BeanConstructorAnnotation.html
b/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms/11.BeancAnnotation.html
similarity index 99%
rename from
juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms/11.BeanConstructorAnnotation.html
rename to
juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms/11.BeancAnnotation.html
index d3b1f14..a33d10d 100644
---
a/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms/11.BeanConstructorAnnotation.html
+++
b/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms/11.BeancAnnotation.html
@@ -13,7 +13,7 @@
***************************************************************************************************************************/
-->
-@BeancAnnotation
+{updated} @BeancAnnotation
<p>
The {@link oaj.annotation.Beanc @Beanc} annotation is used to
diff --git
a/juneau-doc/docs/Topics/06.juneau-rest-server/04.Rest/01.AnnotationInheritance.html
b/juneau-doc/docs/Topics/06.juneau-rest-server/04.Rest/01.AnnotationInheritance.html
index 422e3f9..3de6c54 100644
---
a/juneau-doc/docs/Topics/06.juneau-rest-server/04.Rest/01.AnnotationInheritance.html
+++
b/juneau-doc/docs/Topics/06.juneau-rest-server/04.Rest/01.AnnotationInheritance.html
@@ -47,22 +47,6 @@ Annotation Inheritance
</td>
</tr>
<tr>
- <td>{@link oajr.annotation.Rest#beanFilters()
beanFilters()}</td>
- <td>
- Bean filters on child override those on parent class.
- <br>{@link oajr.Inherit} class can be used to inherit
and augment values from parent.
- <br>{@link oajr.None} class can be used to suppress
inheriting from parent.
- </td>
- </tr>
- <tr>
- <td>{@link oajr.annotation.Rest#pojoSwaps() pojoSwaps()}</td>
- <td>
- POJO swaps on child override those on parent class.
- <br>{@link oajr.Inherit} class can be used to inherit
and augment values from parent.
- <br>{@link oajr.None} class can be used to suppress
inheriting from parent.
- </td>
- </tr>
- <tr>
<td>{@link oajr.annotation.Rest#properties() properties()}</td>
<td>
Properties on child are combined with those on parent
class.
diff --git
a/juneau-doc/docs/Topics/06.juneau-rest-server/35.BuiltInParameters.html
b/juneau-doc/docs/Topics/06.juneau-rest-server/35.BuiltInParameters.html
index be1c71c..7bdecf7 100644
--- a/juneau-doc/docs/Topics/06.juneau-rest-server/35.BuiltInParameters.html
+++ b/juneau-doc/docs/Topics/06.juneau-rest-server/35.BuiltInParameters.html
@@ -56,7 +56,7 @@ Built-in Parameters
<td class='code'>&Header-Name=headerValue</td>
<td>
Specify a header value as a GET parameter.
- <br>Must be enabled via {@link
oajr.annotation.Rest#allowHeaderParams() @Rest(allowHeaderParams)} setting.
+ <br>Must be enabled via {@link
oajr.annotation.Rest#allowedHeaderParams() @Rest(allowedHeaderParams)} setting.
</td>
</tr>
<tr>
diff --git
a/juneau-doc/docs/Topics/09.juneau-rest-client/01.RestProxies/10.DualPurposeInterfaces.html
b/juneau-doc/docs/Topics/09.juneau-rest-client/01.RestProxies/10.DualPurposeInterfaces.html
index 451153d..8fa048c 100644
---
a/juneau-doc/docs/Topics/09.juneau-rest-client/01.RestProxies/10.DualPurposeInterfaces.html
+++
b/juneau-doc/docs/Topics/09.juneau-rest-client/01.RestProxies/10.DualPurposeInterfaces.html
@@ -27,7 +27,7 @@ Dual-purpose (end-to-end) interfaces
annotations defined on overridden methods.
</p>
<p>
- The general approach is to define your {@link oajr.client.remote.Remote
@Remote}-annotated interface first.
+ The general approach is to define your {@link oaj.http.remote.Remote
@Remote}-annotated interface first.
The following example is pulled from the PetStore app:
</p>
<p class='bpcode w800'>
diff --git
a/juneau-doc/docs/Topics/10.juneau-rest-mock/02.MockRemoteResource.html
b/juneau-doc/docs/Topics/10.juneau-rest-mock/02.MockRemote.html
similarity index 100%
rename from
juneau-doc/docs/Topics/10.juneau-rest-mock/02.MockRemoteResource.html
rename to juneau-doc/docs/Topics/10.juneau-rest-mock/02.MockRemote.html
diff --git a/juneau-doc/src/main/javadoc/overview.html
b/juneau-doc/src/main/javadoc/overview.html
index c484bbd..a01e5d1 100644
--- a/juneau-doc/src/main/javadoc/overview.html
+++ b/juneau-doc/src/main/javadoc/overview.html
@@ -197,7 +197,7 @@
<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.BeanpAnnotation'>@Beanp Annotation</a></p>
- <li><p class=''><a class='doclink'
href='#juneau-marshall.Transforms.BeanConstructorAnnotation'>@BeancAnnotation</a></p>
+ <li><p class='updated'><a class='doclink'
href='#juneau-marshall.Transforms.BeancAnnotation'>@BeancAnnotation</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>
@@ -360,10 +360,10 @@
<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>
+ <li><p class='updated'><a class='doclink'
href='#juneau-rest-server.Rest'>@Rest</a></p>
<ol>
- <li><p class=''><a class='doclink'
href='#juneau-rest-server.RestResource.AnnotationInheritance'>Annotation
Inheritance</a></p>
- <li><p class=''><a class='doclink'
href='#juneau-rest-server.RestResource.RestResourcePath'>@RestResource(path)</a></p>
+ <li><p class=''><a class='doclink'
href='#juneau-rest-server.Rest.AnnotationInheritance'>Annotation
Inheritance</a></p>
+ <li><p class='updated'><a class='doclink'
href='#juneau-rest-server.Rest.RestPath'>@Rest(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>
@@ -469,7 +469,7 @@
<ol>
<li><p class=''><a class='doclink'
href='#juneau-rest-client.RestProxies'>REST Proxies</a></p>
<ol>
- <li><p class=''><a class='doclink'
href='#juneau-rest-client.RestProxies.RemoteResource'>@RemoteResource</a></p>
+ <li><p class='updated'><a class='doclink'
href='#juneau-rest-client.RestProxies.Remote'>@Remote</a></p>
<li><p class=''><a class='doclink'
href='#juneau-rest-client.RestProxies.RemoteMethod'>@RemoteMethod</a></p>
<li><p class=''><a class='doclink'
href='#juneau-rest-client.RestProxies.Body'>@Body</a></p>
<li><p class=''><a class='doclink'
href='#juneau-rest-client.RestProxies.FormData'>@FormData</a></p>
@@ -497,7 +497,7 @@
<li><p class='toc2'><a class='doclink'
href='#juneau-rest-mock'>juneau-rest-mock</a></p>
<ol>
<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>
+ <li><p class='updated'><a class='doclink'
href='#juneau-rest-mock.MockRemote'>MockRemote</a></p>
</ol>
<li><p class='updated'><a class='doclink'
href='#juneau-microservice-core'>juneau-microservice-core</a></p>
<ol>
@@ -1642,7 +1642,7 @@
</p>
<p class='bpcode w800'>
<jc>// Configuring serializers/parsers using @Property annotations.</jc>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/atom"</js>,
title=<js>"Sample ATOM feed resource"</js>,
properties={
@@ -1663,7 +1663,7 @@
</p>
<p class='bpcode w800'>
<jc>// Same as above but using specialized annotations.</jc>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/atom"</js>,
title=<js>"Sample ATOM feed resource"</js>
...
@@ -3115,8 +3115,8 @@
<!--
====================================================================================================
-->
-<h4 class='topic ' onclick='toggle(this)'><a
href='#juneau-marshall.Transforms.BeanConstructorAnnotation'
id='juneau-marshall.Transforms.BeanConstructorAnnotation'>2.11.11 -
@BeancAnnotation</a></h4>
-<div class='topic'><!-- START: 2.11.11 -
juneau-marshall.Transforms.BeanConstructorAnnotation -->
+<h4 class='topic updated' onclick='toggle(this)'><a
href='#juneau-marshall.Transforms.BeancAnnotation'
id='juneau-marshall.Transforms.BeancAnnotation'>2.11.11 -
@BeancAnnotation</a></h4>
+<div class='topic'><!-- START: 2.11.11 -
juneau-marshall.Transforms.BeancAnnotation -->
<p>
The {@link org.apache.juneau.annotation.Beanc @Beanc} annotation is
used to
map constructor arguments to property names on bean with read-only
properties.
@@ -3174,7 +3174,7 @@
If neither <c><ja>@Beanc</ja>(properties)</c> or <ja>@Name</ja> is used
to identify the bean property names,
we will try to use the parameter names if they are available in the
bytecode.
</p>
-</div><!-- END: 2.11.11 - juneau-marshall.Transforms.BeanConstructorAnnotation
-->
+</div><!-- END: 2.11.11 - juneau-marshall.Transforms.BeancAnnotation -->
<!--
====================================================================================================
-->
@@ -8317,7 +8317,7 @@
<jd>/**
* Sample REST resource that prints out a simple "Hello world!" message.
*/</jd>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/helloWorld"</js>,
htmldoc=<ja>@HtmlDoc</ja>(
navlinks={
@@ -11517,7 +11517,7 @@
generate the Swagger UI shown above:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
<jc>// Allow OPTIONS requests to be simulated using
?method=OPTIONS query parameter.</jc>
allowedMethodParams=<js>"OPTIONS"</js>,
@@ -13259,15 +13259,15 @@
</ol>
<p>
Later in the section on REST resources, we describe how to associate
configurations with REST resources
- using the {@link
org.apache.juneau.rest.annotation.RestResource#config() @RestResource(config)}
annotation.
+ using the {@link org.apache.juneau.rest.annotation.Rest#config()
@Rest(config)} annotation.
The system default configuration can be referenced with the keyword
<c>SYSTEM_DEFAULT</c> like so:
</p>
<p class='bpcode w800'>
<jc>// Always use system default.</jc>
- <ja>@RestResource</ja>(config=<js>"SYSTEM_DEFAULT"</js>)
+ <ja>@Rest</ja>(config=<js>"SYSTEM_DEFAULT"</js>)
<jc>// Use system property if set or the system default if not.</jc>
-
<ja>@RestResource</ja>(config=<js>"$S{juneau.configFile,SYSTEM_DEFAULT}"</js>)
+ <ja>@Rest</ja>(config=<js>"$S{juneau.configFile,SYSTEM_DEFAULT}"</js>)
</p>
<p>
By default, all properties in the system default configuration are
automatically set as system properties.
@@ -13396,7 +13396,7 @@
<h3 class='topic ' onclick='toggle(this)'><a
href='#juneau-rest-server.HelloWorldExample'
id='juneau-rest-server.HelloWorldExample'>6.1 - Hello World Example</a></h3>
<div class='topic'><!-- START: 6.1 - juneau-rest-server.HelloWorldExample -->
<p>
- A REST resource is simply a Java class annotated with {@link
org.apache.juneau.rest.annotation.RestResource}.
+ A REST resource is simply a Java class annotated with {@link
org.apache.juneau.rest.annotation.Rest}.
The most common case is a class that extends {@link
org.apache.juneau.rest.RestServlet}, which itself is simply an
extension of {@link javax.servlet.http.HttpServlet} which allows it to
be deployed as a servlet.
</p>
@@ -13426,7 +13426,7 @@
</p>
<p class='bpcode w800'>
<jc>// Sample REST resource that prints out a simple "Hello world!"
message.</jc>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/helloWorld"</js>,
title=<js>"Hello World"</js>,
description=<js>"An example of the simplest-possible
resource"</js>,
@@ -13559,7 +13559,7 @@
<p>
<b>When deployed as a child of another resource, you MAY extend from
one of the servlet classes but it's
not necessary.</b>
- The only requirement is that the class be annotated with
<ja>@RestResource</ja> and have one of the following constructors:
+ The only requirement is that the class be annotated with <ja>@Rest</ja>
and have one of the following constructors:
</p>
<ul class='javatree'>
<li class='jm'><c><jk>public</jk> T()</c>
@@ -13573,7 +13573,7 @@
</p>
<p class='bpcode w800'>
<jc>// Top level resource is deployed like any other servlet and must
subclass from RestServlet.</jc>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/top"</js>,
children={
ChildResource.<jk>class</jk> <jc>// Accessed via URI
"/top/child"</jc>
@@ -13583,7 +13583,7 @@
</p>
<p class='bpcode w800'>
<jc>// Child resources can inherit from RestServlet but it's not a
requirement.</jc>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/child"</js>
)
<jk>public class</jk> ChildResource <jk>extends</jk> WhateverYouWant
{...}
@@ -13603,7 +13603,7 @@
It extends directly from <l>HttpServlet</l> and is deployed like any
other servlet.
</p>
<p>
- When the servlet <l>init()</l> method is called, it triggers the code
to find and process the <l>@RestResource</l>
+ When the servlet <l>init()</l> method is called, it triggers the code
to find and process the <l>@Rest</l>
annotations on that class and all child classes.
These get constructed into a {@link org.apache.juneau.rest.RestContext}
object that holds all the configuration
information about your resource in a read-only object.
@@ -13649,7 +13649,7 @@
annotations:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
<jc>// Allow OPTIONS requests to be simulated using
?method=OPTIONS query parameter. </jc>
allowedMethodParams=<js>"OPTIONS"</js>,
@@ -13718,7 +13718,7 @@
Notice that it has no code at all.
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
<jc>// Default serializers for all Java methods in the
class.</jc>
serializers={
@@ -13754,8 +13754,8 @@
<jc>// Default page header contents.</jc>
header={
-
<js>"<h1>$R{resourceTitle}</h1>"</js>, <jc>// Use
@RestResource(title)</jc>
-
<js>"<h2>$R{methodSummary,resourceDescription}</h2>"</js>, <jc>//
Use either @RestMethod(summary) or @RestResource(description)</jc>
+
<js>"<h1>$R{resourceTitle}</h1>"</js>, <jc>// Use @Rest(title)</jc>
+
<js>"<h2>$R{methodSummary,resourceDescription}</h2>"</js>, <jc>//
Use either @RestMethod(summary) or @Rest(description)</jc>
<js>"$C{REST/header}"</js> <jc>// Extra header
HTML defined in external config file.</jc>
},
@@ -13802,7 +13802,7 @@
from a couple sections back.
</p>
<p>
- It's important to notice that the <ja>@RestResource</ja> annotation is
inheritable and overridable from parent
+ It's important to notice that the <ja>@Rest</ja> annotation is
inheritable and overridable from parent
class and interfaces.
They'll all get merged into a single set of annotation values for the
resource class.
</p>
@@ -13825,14 +13825,14 @@
The {@link org.apache.juneau.rest.BasicRest} class is identical to the
{@link org.apache.juneau.rest.BasicRestServlet} class except that
it does not extend from <c>HttpServlet</c>.
It defines the exact same set of serializers, parsers, etc., but it
cannot be deployed as a top-level
- servlet. It can however be used for child resources registered via the
{@link org.apache.juneau.rest.annotation.RestResource#children()
@RestResource(children)}
+ servlet. It can however be used for child resources registered via the
{@link org.apache.juneau.rest.annotation.Rest#children() @Rest(children)}
annotation.
</p>
<p>
The code for this class is virtually identical to {@link
org.apache.juneau.rest.BasicRestServlet} but lacks a parent class:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
<jc>// Allow OPTIONS requests to be simulated using
?method=OPTIONS query parameter. </jc>
allowedMethodParams=<js>"OPTIONS"</js>,
@@ -13903,12 +13903,12 @@
<div class='topic'><!-- START: 6.3.4 -
juneau-rest-server.Instantiation.Children -->
<p>
Child Resources are REST servlets or objects that are linked to parent
resources through the
- {@link org.apache.juneau.rest.annotation.RestResource#children()
@RestResource(children)} annotation.
+ {@link org.apache.juneau.rest.annotation.Rest#children()
@Rest(children)} annotation.
</p>
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
<jd>/** Parent Resource */</jd>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/parent"</js>,
children={FooResource.<jk>class</jk>}
)
@@ -13916,7 +13916,7 @@
</p>
<p class='bpcode w800'>
<jd>/** Child Resource */</jd>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/foo"</js> <jc>// Path relative to parent
resource.</jc>
)
<jk>public</jk> FooResource {...} <jc>// Note that we don't need to
extend from RestServlet.</jc>
@@ -13951,7 +13951,7 @@
<jd>/**
* Sample REST resource showing how to implement a "router" resource
page.
*/</jd>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/"</js>,
title=<js>"Root resources"</js>,
description=<js>"Example of a router resource page."</js>,
@@ -14003,7 +14003,7 @@
The {@link org.apache.juneau.rest.BasicRestGroup} class is identical to
the {@link org.apache.juneau.rest.BasicRestServletGroup} class except that
it does not extend from <c>HttpServlet</c>.
It defines the exact same set of serializers, parsers, etc., but it
cannot be deployed as a top-level
- servlet. It can however be used for child resources registered via the
{@link org.apache.juneau.rest.annotation.RestResource#children()
@RestResource(children)}
+ servlet. It can however be used for child resources registered via the
{@link org.apache.juneau.rest.annotation.Rest#children() @Rest(children)}
annotation.
</p>
<p class='bpcode w800'>
@@ -14024,7 +14024,7 @@
<h4 class='topic ' onclick='toggle(this)'><a
href='#juneau-rest-server.Instantiation.ResourceResolvers'
id='juneau-rest-server.Instantiation.ResourceResolvers'>6.3.7 - Resource
Resolvers</a></h4>
<div class='topic'><!-- START: 6.3.7 -
juneau-rest-server.Instantiation.ResourceResolvers -->
<p>
- By default, you can add the {@link
org.apache.juneau.rest.annotation.RestResource @RestResource}
+ By default, you can add the {@link
org.apache.juneau.rest.annotation.Rest @Rest}
to any class as long as it has one of the following constructors:
</p>
<ul class='javatree'>
@@ -14064,7 +14064,7 @@
For example, if you want to add an initialization method to your
resource:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(...)
+ <ja>@Rest</ja>(...)
<jk>public class</jk> MyResource {
<jc>// Our database.</jc>
@@ -14080,7 +14080,7 @@
Or if you want to intercept REST calls:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(...)
+ <ja>@Rest</ja>(...)
<jk>public class</jk> MyResource {
<jc>// Add a request attribute to all incoming requests.</jc>
@@ -14118,20 +14118,20 @@
<!--
====================================================================================================
-->
-<h3 class='topic ' onclick='toggle(this)'><a
href='#juneau-rest-server.RestResource'
id='juneau-rest-server.RestResource'>6.4 - @RestResource</a></h3>
-<div class='topic'><!-- START: 6.4 - juneau-rest-server.RestResource -->
+<h3 class='topic updated' onclick='toggle(this)'><a
href='#juneau-rest-server.Rest' id='juneau-rest-server.Rest'>6.4 -
@Rest</a></h3>
+<div class='topic'><!-- START: 6.4 - juneau-rest-server.Rest -->
<p>
- The {@link org.apache.juneau.rest.annotation.RestResource
@RestResource} annotation is the primary way of defining
+ The {@link org.apache.juneau.rest.annotation.Rest @Rest} annotation is
the primary way of defining
and configuring REST resource classes.
The functionality of the class itself is covered in detail in the
topics below.
</p>
<!--
====================================================================================================
-->
-<h4 class='topic ' onclick='toggle(this)'><a
href='#juneau-rest-server.RestResource.AnnotationInheritance'
id='juneau-rest-server.RestResource.AnnotationInheritance'>6.4.1 - Annotation
Inheritance</a></h4>
-<div class='topic'><!-- START: 6.4.1 -
juneau-rest-server.RestResource.AnnotationInheritance -->
+<h4 class='topic ' onclick='toggle(this)'><a
href='#juneau-rest-server.Rest.AnnotationInheritance'
id='juneau-rest-server.Rest.AnnotationInheritance'>6.4.1 - Annotation
Inheritance</a></h4>
+<div class='topic'><!-- START: 6.4.1 -
juneau-rest-server.Rest.AnnotationInheritance -->
<p>
- The {@link org.apache.juneau.rest.annotation.RestResource
@RestResource} annotation can also be used on parents and interfaces of
resource classes.
+ The {@link org.apache.juneau.rest.annotation.Rest @Rest} annotation can
also be used on parents and interfaces of resource classes.
When multiple annotations are defined at different levels, the
annotation values are combined.
</p>
<p>
@@ -14146,7 +14146,7 @@
<th><l>Inheritence Rules</l></th>
</tr>
<tr>
- <td>{@link
org.apache.juneau.rest.annotation.RestResource#guards() guards()}</td>
+ <td>{@link org.apache.juneau.rest.annotation.Rest#guards()
guards()}</td>
<td>
Guards on child are combined with those on parent class.
<br>Guards are executed child-to-parent in the order
they appear in the annotation.
@@ -14154,7 +14154,7 @@
</td>
</tr>
<tr>
- <td>{@link
org.apache.juneau.rest.annotation.RestResource#converters() converters()}</td>
+ <td>{@link org.apache.juneau.rest.annotation.Rest#converters()
converters()}</td>
<td>
Converters on child are combined with those on parent
class.
<br>Converters are executed child-to-parent in the
order they appear in the annotation.
@@ -14162,23 +14162,7 @@
</td>
</tr>
<tr>
- <td>{@link
org.apache.juneau.rest.annotation.RestResource#beanFilters() beanFilters()}</td>
- <td>
- Bean filters on child override those on parent class.
- <br>{@link org.apache.juneau.rest.Inherit} class can be
used to inherit and augment values from parent.
- <br>{@link org.apache.juneau.rest.None} class can be
used to suppress inheriting from parent.
- </td>
- </tr>
- <tr>
- <td>{@link
org.apache.juneau.rest.annotation.RestResource#pojoSwaps() pojoSwaps()}</td>
- <td>
- POJO swaps on child override those on parent class.
- <br>{@link org.apache.juneau.rest.Inherit} class can be
used to inherit and augment values from parent.
- <br>{@link org.apache.juneau.rest.None} class can be
used to suppress inheriting from parent.
- </td>
- </tr>
- <tr>
- <td>{@link
org.apache.juneau.rest.annotation.RestResource#properties() properties()}</td>
+ <td>{@link org.apache.juneau.rest.annotation.Rest#properties()
properties()}</td>
<td>
Properties on child are combined with those on parent
class.
<br>Properties are applied parent-to-child in the order
they appear in the annotation.
@@ -14186,7 +14170,7 @@
</td>
</tr>
<tr>
- <td>{@link
org.apache.juneau.rest.annotation.RestResource#serializers() serializers()}</td>
+ <td>{@link org.apache.juneau.rest.annotation.Rest#serializers()
serializers()}</td>
<td>
Serializers on child override those on parent class.
<br>{@link org.apache.juneau.rest.Inherit} class can be
used to inherit and augment values from parent.
@@ -14195,7 +14179,7 @@
</td>
</tr>
<tr>
- <td>{@link
org.apache.juneau.rest.annotation.RestResource#parsers() parsers()}</td>
+ <td>{@link org.apache.juneau.rest.annotation.Rest#parsers()
parsers()}</td>
<td>
Parsers on child override those on parent class.
<br>{@link org.apache.juneau.rest.Inherit} class can be
used to inherit and augment values from parent.
@@ -14204,19 +14188,19 @@
</td>
</tr>
<tr>
- <td>{@link
org.apache.juneau.rest.annotation.RestResource#responseHandlers()
responseHandlers()}</td>
+ <td>{@link
org.apache.juneau.rest.annotation.Rest#responseHandlers()
responseHandlers()}</td>
<td>
Response handlers on child are combined with those on
parent class.
</td>
</tr>
<tr>
- <td>{@link
org.apache.juneau.rest.annotation.RestResource#encoders() encoders()}</td>
+ <td>{@link org.apache.juneau.rest.annotation.Rest#encoders()
encoders()}</td>
<td>
Encoders on child are combined with those on parent
class.
</td>
</tr>
<tr>
- <td>{@link
org.apache.juneau.rest.annotation.RestResource#defaultRequestHeaders()
defaultRequestHeaders()}</td>
+ <td>{@link
org.apache.juneau.rest.annotation.Rest#defaultRequestHeaders()
defaultRequestHeaders()}</td>
<td>
Headers on child are combined with those on parent
class.
<br>Headers are applied parent-to-child in the order
they appear in the annotation.
@@ -14224,57 +14208,57 @@
</td>
</tr>
<tr>
- <td>{@link
org.apache.juneau.rest.annotation.RestResource#defaultResponseHeaders()
defaultResponseHeaders()}</td>
+ <td>{@link
org.apache.juneau.rest.annotation.Rest#defaultResponseHeaders()
defaultResponseHeaders()}</td>
<td>
Headers on child are combined with those on parent
class.
<br>Headers are applied parent-to-child in the order
they appear in the annotation.
</td>
</tr>
<tr>
- <td>{@link
org.apache.juneau.rest.annotation.RestResource#children() children()}</td>
+ <td>{@link org.apache.juneau.rest.annotation.Rest#children()
children()}</td>
<td>
Children on child are combined with those on parent
class.
<br>Children are list parent-to-child in the order they
appear in the annotation.
</td>
</tr>
<tr>
- <td>{@link
org.apache.juneau.rest.annotation.RestResource#path() path()}</td>
+ <td>{@link org.apache.juneau.rest.annotation.Rest#path()
path()}</td>
<td>
Path is searched for in child-to-parent order.
</td>
</tr>
<tr>
- <td>{@link
org.apache.juneau.rest.annotation.RestResource#title() title()}</td>
+ <td>{@link org.apache.juneau.rest.annotation.Rest#title()
title()}</td>
<td>
Label is searched for in child-to-parent order.
</td>
</tr>
<tr>
- <td>{@link
org.apache.juneau.rest.annotation.RestResource#description() description()}</td>
+ <td>{@link org.apache.juneau.rest.annotation.Rest#description()
description()}</td>
<td>
Description is searched for in child-to-parent order.
</td>
</tr>
<tr>
- <td>{@link
org.apache.juneau.rest.annotation.RestResource#config() config()}</td>
+ <td>{@link org.apache.juneau.rest.annotation.Rest#config()
config()}</td>
<td>
Config file is searched for in child-to-parent order.
</td>
</tr>
<tr>
- <td>{@link
org.apache.juneau.rest.annotation.RestResource#staticFiles() staticFiles()}</td>
+ <td>{@link org.apache.juneau.rest.annotation.Rest#staticFiles()
staticFiles()}</td>
<td>
Static files on child are combined with those on parent
class.
<br>Static files are are executed child-to-parent in
the order they appear in the annotation.
</td>
</tr>
</table>
-</div><!-- END: 6.4.1 - juneau-rest-server.RestResource.AnnotationInheritance
-->
+</div><!-- END: 6.4.1 - juneau-rest-server.Rest.AnnotationInheritance -->
<!--
====================================================================================================
-->
-<h4 class='topic ' onclick='toggle(this)'><a
href='#juneau-rest-server.RestResource.RestResourcePath'
id='juneau-rest-server.RestResource.RestResourcePath'>6.4.2 -
@RestResource(path)</a></h4>
-<div class='topic'><!-- START: 6.4.2 -
juneau-rest-server.RestResource.RestResourcePath -->
+<h4 class='topic updated' onclick='toggle(this)'><a
href='#juneau-rest-server.Rest.RestPath'
id='juneau-rest-server.Rest.RestPath'>6.4.2 - @Rest(path)</a></h4>
+<div class='topic'><!-- START: 6.4.2 - juneau-rest-server.Rest.RestPath -->
<p>
The {@link org.apache.juneau.rest.annotation.RestResource#path()
@RestResource(path)} annotation is used in the following situations:
<p>
@@ -14397,8 +14381,8 @@
When variables are used on a path of a top-level resource deployed as a
Spring bean in a Spring Boot application,
the first part of the URL must be a literal which will be used as the
servlet path of the registered servlet.
</p>
-</div><!-- END: 6.4.2 - juneau-rest-server.RestResource.RestResourcePath -->
-</div><!-- END: 6.4 - juneau-rest-server.RestResource -->
+</div><!-- END: 6.4.2 - juneau-rest-server.Rest.RestPath -->
+</div><!-- END: 6.4 - juneau-rest-server.Rest -->
<!--
====================================================================================================
-->
@@ -14410,12 +14394,12 @@
It's by-far the most important class in the REST API.
</p>
<p>
- Every class annotated with <l>@RestResource</l> ends up with an
instance of this object.
+ Every class annotated with <l>@Rest</l> ends up with an instance of
this object.
The object itself is read-only and unchangeable.
It is populated through the following:
</p>
<ul class='javatree'>
- <li class='ja'>{@link org.apache.juneau.rest.annotation.RestResource} -
Settings copied from the annotation during servlet initialization.
+ <li class='ja'>{@link org.apache.juneau.rest.annotation.Rest} -
Settings copied from the annotation during servlet initialization.
<li class='jm'>{@link org.apache.juneau.rest.RestContextBuilder} -
Builder used during servlet initialization.
</ul>
<p>
@@ -15644,7 +15628,7 @@
The {@link org.apache.juneau.rest.BasicRestServletGroup} class uses
this to generate router pages:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>
+ <ja>@Rest</ja>
<jk>public abstract class</jk> BasicRestServletGroup <jk>extends</jk>
BasicRestServlet {
<ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/"</js>,
summary=<js>"Navigation page"</js>)
@@ -15665,7 +15649,7 @@
The <c>RootResources</c> page consists of the following and extends
from the {@link org.apache.juneau.rest.BasicRestServletGroup} class:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
...
children={
HelloWorldResource.<jk>class</jk>,
@@ -15861,7 +15845,7 @@
<c>getServiceMap()</c> method to define the server-side POJOs:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/remote"</js>
)
<jk>public class</jk> SampleRrpcServlet <jk>extends</jk> RrpcServlet {
@@ -15996,7 +15980,7 @@
browser...
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/remote"</js>,
<jc>// Allow us to use method=POST from a browser.</jc>
@@ -17670,7 +17654,7 @@
The following examples show part-schema-based serialization of response
bodies:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>
+ <ja>@Rest</ja>
<jk>public class</jk> ExampleResource {
<jc>// Example 1 - String[] should be serialized using part
serializer.</jc>
@@ -17701,7 +17685,7 @@
The <c><ja>@Response</ja>(schema)</c> annotation can be used to define
the format of the output using OpenAPI-based rules.
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>
+ <ja>@Rest</ja>
<jk>public class</jk> ExampleResource {
<ja>@Response</ja>(
@@ -17920,7 +17904,7 @@
form
<l>"aString=foo&aNumber=123&aDate=2001-07-04T15:30:45Z"</l>.
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/urlEncodedForm"</js>
)
<jk>public class</jk> UrlEncodedFormResource <jk>extends</jk>
BasicRestServlet {
@@ -17978,7 +17962,7 @@
</p>
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/tempDir"</js>
)
<jk>public class</jk> TempDirResource <jk>extends</jk>
DirectoryResource {
@@ -18059,7 +18043,7 @@
</p>
<ul class='javatree'>
<li class='ja'>
- {@link
org.apache.juneau.rest.annotation.RestResource#serializers()
RestResource(serializers)}
+ {@link org.apache.juneau.rest.annotation.Rest#serializers()
Rest(serializers)}
- Annotation on resource Java class.
<li class='ja'>
{@link
org.apache.juneau.rest.annotation.RestMethod#serializers()
RestMethod(serializers)}
@@ -18073,7 +18057,7 @@
</p>
<p class='bpcode w800'>
<jc>// Option #1 - Defined via annotation.</jc>
- <ja>@RestResource</ja>(serializers={JsonSerializer.<jk>class</jk>,
XmlSerializer.<jk>class</jk>})
+ <ja>@Rest</ja>(serializers={JsonSerializer.<jk>class</jk>,
XmlSerializer.<jk>class</jk>})
<jk>public class</jk> MyResource {
<jc>// Option #2 - Defined via builder passed in through
resource constructor.</jc>
@@ -18126,7 +18110,7 @@
</p>
<ul class='javatree'>
<li class='ja'>
- {@link org.apache.juneau.rest.annotation.RestResource#parsers()
RestResource(parsers)}
+ {@link org.apache.juneau.rest.annotation.Rest#parsers()
Rest(parsers)}
- Annotation on resource Java class.
<li class='ja'>
{@link org.apache.juneau.rest.annotation.RestMethod#parsers()
RestMethod(parsers)}
@@ -18140,7 +18124,7 @@
</p>
<p class='bpcode w800'>
<jc>// Option #1 - Defined via annotation.</jc>
- <ja>@RestResource</ja>(parsers={JsonParser.<jk>class</jk>,
XmlParser.<jk>class</jk>})
+ <ja>@Rest</ja>(parsers={JsonParser.<jk>class</jk>,
XmlParser.<jk>class</jk>})
<jk>public class</jk> MyResource {
<jc>// Option #2 - Defined via builder passed in through
resource constructor.</jc>
@@ -18186,7 +18170,7 @@
These properties can be defined for serializers and parsers registered
on a REST resource via the following:
</p>
<ul class='javatree'>
- <li class='ja'>{@link
org.apache.juneau.rest.annotation.RestResource#properties()
RestResource(properties)}
+ <li class='ja'>{@link
org.apache.juneau.rest.annotation.Rest#properties() Rest(properties)}
<li class='jc'>{@link org.apache.juneau.rest.RestContextBuilder} -
Various methods on the context builder.
</ul>
<h5 class='figure'>Example:</h5>
@@ -18196,7 +18180,7 @@
<jk>import static</jk> org.apache.juneau.json.JsonSerializer.*;
<jc>// Servlet with properties applied</jc>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
properties={
<jc>// Bean properties should be sorted
alphabetically.</jc>
<ja>@Property</ja>(name=<jsf>BEAN_sortProperties</jsf>,
value=<js>"true"</js>),
@@ -18215,7 +18199,7 @@
</p>
<p class='bpcode w800'>
<jc>// Servlet with properties applied</jc>
- <ja>@RestResource</ja>(...)
+ <ja>@Rest</ja>(...)
<jk>public</jk> MyRestServlet <jk>extends</jk> BasicRestServlet {
<jk>public</jk> MyRestServlet(RestContextBuilder builder) {
@@ -18253,7 +18237,7 @@
}
</p>
<ul class='seealso'>
- <li class='ja'>{@link
org.apache.juneau.rest.annotation.RestResource#flags() RestResource(flags)} -
Shorthand for boolean properties.
+ <li class='ja'>{@link org.apache.juneau.rest.annotation.Rest#flags()
Rest(flags)} - Shorthand for boolean properties.
<li class='ja'>{@link
org.apache.juneau.rest.annotation.RestMethod#flags() RestMethod(flags)} -
Shorthand for boolean properties.
<li class='jc'>{@link org.apache.juneau.rest.RestContextProperties}
<li class='jc'>{@link org.apache.juneau.rest.RestMethodProperties}
@@ -18274,7 +18258,7 @@
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
<jc>// Servlet with properties applied</jc>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
properties={
<ja>@Property</ja>(name=<jsf>BEAN_sortProperties</jsf>,
value=<js>"true"</js>),
<ja>@Property</ja>(name=<jsf>SERIALIZER_trimNulls</jsf>, value=<js>"true"</js>),
@@ -18285,7 +18269,7 @@
</p>
<p class='bpcode w800'>
<jc>// Servlet with config annotations applied</jc>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
...
)
<ja>@BeanConfig</ja>(sortProperties=<js>"true"</js>)
@@ -18342,7 +18326,7 @@
</ul>
<p class='bpcode w800'>
<jc>// Servlet with transforms applied</jc>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
...
)
<ja>@BeanConfig</ja>(
@@ -18366,7 +18350,7 @@
</p>
<p class='bpcode w800'>
<jc>// Servlet with properties applied</jc>
- <ja>@RestResource</ja>(...)
+ <ja>@Rest</ja>(...)
<jk>public</jk> MyRestServlet <jk>extends</jk> BasicRestServlet {
<jk>public</jk> MyRestServlet(RestContextBuilder builder) {
@@ -18393,7 +18377,7 @@
The following example shows a REST method that returns a list of URIs
of various forms:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
uriAuthority=<js>"http://foo.com:123"</js>,
uriContext=<js>"/myContext"</js>
)
@@ -18478,7 +18462,7 @@
Guards are associated with resource classes and methods via the
following:
</p>
<ul class='javatree'>
- <li class='ja'>{@link
org.apache.juneau.rest.annotation.RestResource#guards() RestResource(guards)}
+ <li class='ja'>{@link org.apache.juneau.rest.annotation.Rest#guards()
Rest(guards)}
<li class='ja'>{@link
org.apache.juneau.rest.annotation.RestMethod#guards() RestMethod(guards)}
<li class='jm'>{@link
org.apache.juneau.rest.RestContextBuilder#guards(Class...)}
</ul>
@@ -18493,7 +18477,7 @@
}
<jc>// Servlet with class-level guard applied</jc>
- <ja>@RestResource</ja>(guards=BillyGuard.<jk>class</jk>)
+ <ja>@Rest</ja>(guards=BillyGuard.<jk>class</jk>)
<jk>public</jk> MyRestServlet <jk>extends</jk> BasicRestServlet {
<jc>// Delete method that only Billy is allowed to call.</jc>
@@ -18554,10 +18538,10 @@
These are controlled via annotations on the REST class and methods:
</p>
<ul class='javatree'>
- <li class='ja'>{@link org.apache.juneau.rest.annotation.RestResource}
+ <li class='ja'>{@link org.apache.juneau.rest.annotation.Rest}
<ul>
- <li class='jf'>{@link
org.apache.juneau.rest.annotation.RestResource#roleGuard() roleGuard()}
- <li class='jf'>{@link
org.apache.juneau.rest.annotation.RestResource#rolesDeclared() rolesDeclared()}
+ <li class='jf'>{@link
org.apache.juneau.rest.annotation.Rest#roleGuard() roleGuard()}
+ <li class='jf'>{@link
org.apache.juneau.rest.annotation.Rest#rolesDeclared() rolesDeclared()}
</ul>
<li class='ja'>{@link org.apache.juneau.rest.annotation.RestMethod}
<ul>
@@ -18573,7 +18557,7 @@
<p class='bpcode w800'>
<jc>// Only admin users or users with both read/write and special
access
// can run any methods on this class.</jc>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/foo"</js>,
roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE &&
ROLE_SPECIAL)"</js>
)
@@ -18603,7 +18587,7 @@
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
rolesDeclared=<js>"ROLE_ADMIN,ROLE_READ_WRITE,ROLE_READ_ONLY,ROLE_SPECIAL"</js>,
roleGuard=<js>"ROLE_ADMIN || (*WRITE* &&
*SPECIAL*)"</js>
)
@@ -18624,14 +18608,14 @@
Converters are associated with resource classes and methods via the
following:
</p>
<ul class='javatree'>
- <li class='ja'>{@link
org.apache.juneau.rest.annotation.RestResource#converters()
RestResource(converters)}
+ <li class='ja'>{@link
org.apache.juneau.rest.annotation.Rest#converters() Rest(converters)}
<li class='ja'>{@link
org.apache.juneau.rest.annotation.RestMethod#converters()
RestMethod(converters)}
<li class='jm'>{@link
org.apache.juneau.rest.RestContextBuilder#converters(Class...)}
</ul>
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
<jc>// Associate the Traversable converter to all Java REST methods in
this servlet</jc>
- <ja>@RestResource</ja>(converters=Traversable.<jk>class</jk>)
+ <ja>@Rest</ja>(converters=Traversable.<jk>class</jk>)
<jk>public</jk> MyRestServlet <jk>extends</jk> BasicRestServlet {
...
}
@@ -18722,11 +18706,11 @@
<h3 class='topic ' onclick='toggle(this)'><a
href='#juneau-rest-server.Messages' id='juneau-rest-server.Messages'>6.22 -
Messages</a></h3>
<div class='topic'><!-- START: 6.22 - juneau-rest-server.Messages -->
<p>
- The {@link org.apache.juneau.rest.annotation.RestResource#messages
@RestResource(messages)} annotation is used to associate a resource bundle with
a servlet class.
+ The {@link org.apache.juneau.rest.annotation.Rest#messages
@Rest(messages)} annotation is used to associate a resource bundle with a
servlet class.
</p>
<p class='bpcode w800'>
<jc>// Servlet with associated resource bundle</jc>
- <ja>@RestResource</ja>(messages=<js>"nls/MyMessages"</js>)
+ <ja>@Rest</ja>(messages=<js>"nls/MyMessages"</js>)
<jk>public</jk> MyRestServlet <jk>extends</jk> BasicRestServlet {
<jc>// Returns the localized greeting from the "greeting" key
in MyMessages.properties</jc>
@@ -18772,7 +18756,7 @@
<h3 class='topic ' onclick='toggle(this)'><a
href='#juneau-rest-server.Encoders' id='juneau-rest-server.Encoders'>6.23 -
Encoders</a></h3>
<div class='topic'><!-- START: 6.23 - juneau-rest-server.Encoders -->
<p>
- The {@link org.apache.juneau.rest.annotation.RestResource#encoders
@RestResource(encoders)} annotation can
+ The {@link org.apache.juneau.rest.annotation.Rest#encoders
@Rest(encoders)} annotation can
be used to associate character encoders with a servlet class.
Encoders can be used to enable various kinds of compression (e.g.
<l>"gzip"</l>) on requests and responses
based on the request <l>Accept-Encoding</l> and <l>Content-Encoding</l>
headers.
@@ -18781,7 +18765,7 @@
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
<jc>// Servlet with automated support for GZIP compression</jc>
- <ja>@RestResource</ja>(encoders={GzipEncoder.<jk>class</jk>})
+ <ja>@Rest</ja>(encoders={GzipEncoder.<jk>class</jk>})
<jk>public</jk> MyRestServlet <jk>extends</jk> BasicRestServlet {
...
}
@@ -18814,7 +18798,7 @@
annotation values:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
title=<js>"$L{my.label}"</js>
)
</p>
@@ -18856,7 +18840,7 @@
}
<jc>// Register it with our resource.</jc>
- <ja>@RestResource</ja>(...)
+ <ja>@Rest</ja>(...)
<jk>public class</jk> MyResource {
<jk>public</jk> MyResource(RestContextBuilder builder) {
@@ -18877,7 +18861,7 @@
</p>
<ul class='spaced-list'>
<li><l>Initialization-time variables</l>
- <br>These are variables that can be used in many of the
annotations in {@link org.apache.juneau.rest.annotation.RestResource
@RestResource}.
+ <br>These are variables that can be used in many of the
annotations in {@link org.apache.juneau.rest.annotation.Rest @Rest}.
<br>The {@link
org.apache.juneau.rest.RestContext#getVarResolver()} method returns
initialization-time variables only.
<li><l>Request-time variables</l>
<br>These are variables that are available during HTTP-requests
and can be used on annotation such as {@link
org.apache.juneau.rest.annotation.HtmlDoc @HtmlDoc}.
@@ -19114,12 +19098,12 @@
Configuration files are associated with REST resources through the
following:
</p>
<ul class='javatree'>
- <li class='ja'>{@link
org.apache.juneau.rest.annotation.RestResource#config() RestResource(config)}
+ <li class='ja'>{@link org.apache.juneau.rest.annotation.Rest#config()
Rest(config)}
</ul>
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
<jc>// Config file is located at ./config_dir/myconfig.cfg</jc>
config=<js>"config_dir/myconfig.cfg"</js>,
...
@@ -19132,7 +19116,7 @@
location of the config file as a system property
<l>"juneau.configFile"</l>:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
<jc>// Config file location is defined as a system property</jc>
config=<js>"$S{juneau.configFile}"</js>,
...
@@ -19147,7 +19131,7 @@
A common usage is to use this method to initialize fields in your
servlet.
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
<jc>// Config file is located at ./config_dir/myconfig.cfg</jc>
config=<js>"config_dir/myconfig.cfg"</js>,
...
@@ -19166,7 +19150,7 @@
Another common usage is to refer to config properties through
<ck>$C</ck> variables in your annotations:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
<jc>// Get stylesheet from myconfig.cfg, but default to
devops.css if it's not specified</jc>
htmldoc=<ja>@HtmlDoc</ja>(
stylesheet=<js>"$C{MyServlet/stylesheet,servlet:/styles/devops.css}"</js>,
@@ -19190,7 +19174,7 @@
<jd>/**
* Sample REST resource that prints out a simple "Hello world!" message.
*/</jd>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
config=<js>"config_dir/myconfig.cfg"</js>,
...
)
@@ -19226,7 +19210,7 @@
<jd>/**
* Sample REST resource that prints out a simple "Hello world!" message.
*/</jd>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
messages=<js>"HelloWorldResources"</js>,
config=<js>"config_dir/myconfig.cfg"</js>,
...
@@ -19254,7 +19238,7 @@
<h3 class='topic ' onclick='toggle(this)'><a
href='#juneau-rest-server.StaticFiles' id='juneau-rest-server.StaticFiles'>6.26
- Static files</a></h3>
<div class='topic'><!-- START: 6.26 - juneau-rest-server.StaticFiles -->
<p>
- The {@link org.apache.juneau.rest.annotation.RestResource#staticFiles
@RestResource(staticFiles)}
+ The {@link org.apache.juneau.rest.annotation.Rest#staticFiles
@Rest(staticFiles)}
annotation is used to define paths and locations of statically-served
files such as images or HTML
documents.
</p>
@@ -19267,7 +19251,7 @@
<p class='bpcode w800'>
<jk>package</jk> com.foo.mypackage;
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/myresource"</js>,
staticFiles={<js>"htdocs:docs"</js>}
)
@@ -19312,14 +19296,14 @@
The APIs involved with defining client version headers are:
</p>
<ul class='javatree'>
- <li class='ja'>{@link
org.apache.juneau.rest.annotation.RestResource#clientVersionHeader()
RestResource(clientVersionHeader)}
+ <li class='ja'>{@link
org.apache.juneau.rest.annotation.Rest#clientVersionHeader()
Rest(clientVersionHeader)}
<li class='jm'>{@link
org.apache.juneau.rest.RestContextBuilder#clientVersionHeader(String)}
<li class='ja'>{@link
org.apache.juneau.rest.annotation.RestMethod#clientVersion()
RestMethod(clientVersion)}
</ul>
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
<jc>// Option #1 - Defined via annotation resolving to a config file
setting with default value.</jc>
- <ja>@RestResource</ja>(clientVersionHeader=<js>"Client-Version"</js>)
+ <ja>@Rest</ja>(clientVersionHeader=<js>"Client-Version"</js>)
<jk>public class</jk> MyResource {
<jc>// Call this method if Client-Version is at least 2.0.
@@ -19454,7 +19438,7 @@
Here's the class that defines the behavior:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
<jc>// Allow OPTIONS requests to be simulated using
?method=OPTIONS query parameter.</jc>
allowedMethodParams=<js>"OPTIONS"</js>,
@@ -19528,11 +19512,11 @@
</p>
<img class='bordered w900' src='doc-files/juneau-rest-server.Swagger.3.png'>
<p>
- The information is pulled from the {@link
org.apache.juneau.rest.annotation.RestResource#swagger()
@RestResource(swagger)} annotation.
+ The information is pulled from the {@link
org.apache.juneau.rest.annotation.Rest#swagger() @Rest(swagger)} annotation.
</p>
<h5
class='figure'>org.apache.juneau.examples.rest.petstore.PetStoreResource</h5>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/petstore"</js>,
title=<js>"Petstore application"</js>,
...
@@ -19580,7 +19564,7 @@
You could equivalently embed JSON directly into your annotation like so:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/petstore"</js>,
title=<js>"Petstore application"</js>,
...
@@ -19601,7 +19585,7 @@
However, a more typical (and less error-prone) scenario is to define
all of your Swagger as annotations:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/petstore"</js>,
title=<js>"Petstore application"</js>,
...
@@ -19632,7 +19616,7 @@
pull localized strings from resource bundles using {@link
org.apache.juneau.rest.vars.LocalizationVar $L} variables.
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/petstore"</js>,
title=<js>"Petstore application"</js>,
messages=<js>"nls/MyMessages"</js>,
@@ -19660,7 +19644,7 @@
<jk>public class</jk> PetStoreResource <jk>extends</jk>
BasicRestServletJena {...}
</p>
<p>
- A third option is to define your Swagger information in your {@link
org.apache.juneau.rest.annotation.RestResource#messages
@RestResource(messages)} resource
+ A third option is to define your Swagger information in your {@link
org.apache.juneau.rest.annotation.Rest#messages @Rest(messages)} resource
bundle using predefined Swagger keywords:
</p>
<p class='bpcode w800'>
@@ -20114,7 +20098,7 @@
],
</p>
<p>
- Another option is to define these directly in your resource Swagger
JSON file, or via {@link
org.apache.juneau.rest.annotation.RestResource#swagger()
@RestResource(swagger)}/{@link
org.apache.juneau.rest.annotation.RestMethod#swagger() @RestMethod(swagger)}.
+ Another option is to define these directly in your resource Swagger
JSON file, or via {@link org.apache.juneau.rest.annotation.Rest#swagger()
@Rest(swagger)}/{@link org.apache.juneau.rest.annotation.RestMethod#swagger()
@RestMethod(swagger)}.
</p>
<p>
Juneau also supports auto-generation of JSON-Schema directly from POJO
classes.
@@ -20175,7 +20159,7 @@
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
<jc>// Examples defined at class level.</jc>
- <ja>@RestResource</ja>(...)
+ <ja>@Rest</ja>(...)
<ja>@BeanConfig</ja>(
examples=<js>"{PetCreate:
{name:'Doggie',price:9.99,species:'Dog',tags:['friendly','cute']}}"</js>
)
@@ -20229,7 +20213,7 @@
</p>
<ul>
<li>{@link org.apache.juneau.http.annotation.Response @Response}
annotated classes, methods, and parameters.
- <li>{@link org.apache.juneau.rest.annotation.RestResource#swagger()
@RestResource(swagger)} / {@link
org.apache.juneau.rest.annotation.RestMethod#swagger() @RestMethod(swagger)}
annotations.
+ <li>{@link org.apache.juneau.rest.annotation.Rest#swagger()
@Rest(swagger)} / {@link org.apache.juneau.rest.annotation.RestMethod#swagger()
@RestMethod(swagger)} annotations.
</ul>
<ul class='seealso'>
@@ -20380,7 +20364,7 @@
</p>
<p class='bpcode w800'>
<jc>// Examples defined at class level.</jc>
- <ja>@RestResource</ja>(...)
+ <ja>@Rest</ja>(...)
<ja>@BeanConfig</ja>(
examples=<js>"{PetCreate:
{name:'Doggie',price:9.99,species:'Dog',tags:['friendly','cute']}}"</js>
)
@@ -20585,7 +20569,7 @@
It's used in the following locations:
</p>
<ul>
- <li>{@link org.apache.juneau.rest.annotation.RestResource
@RestResource}-annotated classes.
+ <li>{@link org.apache.juneau.rest.annotation.Rest @Rest}-annotated
classes.
<li>{@link org.apache.juneau.rest.annotation.RestMethod
@RestMethod}-annotated methods.
</ul>
<p>
@@ -20595,14 +20579,14 @@
</p>
<p class='bpcode w800'>
<jc>// Title defined via property.</jc>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
properties={
<ja>@Property</ja>(name=<jsf>HTMLDOC_title</jsf>,
value=<js>"My Resource Page"</js>)
}
)
<jc>// Title defined via @HtmlDoc annotation.</jc>
- <ja>@RestResource</ja>()
+ <ja>@Rest</ja>()
<ja>@HtmlDocConfig</ja>(
title=<js>"My Resource Page"</js>
)
@@ -20648,7 +20632,7 @@
<jd>/**
* Sample REST resource that prints out a simple "Hello world!" message.
*/</jd>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/helloWorld"</js>
)
<ja>@HtmlDocConfig</ja>(
@@ -20669,7 +20653,7 @@
SVL variables can be used in any of these annotations:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/helloWorld"</js>,
<jc>// Register a config file.</jc>
config=<js>"MyConfig.cfg"</js>
@@ -20796,7 +20780,7 @@
The following examples shows how to associate a widget with a REST
method and then have it rendered in the links
and aside section of the page.
It shows an example of a widget that renders an image located in the
<c>htdocs</c> static files
- directory in your classpath (see {@link
org.apache.juneau.rest.annotation.RestResource#staticFiles()
@RestResource(staticFiles)}):
+ directory in your classpath (see {@link
org.apache.juneau.rest.annotation.Rest#staticFiles() @Rest(staticFiles)}):
</p>
<p class='bpcode w800'>
<jk>public class</jk> MyWidget <jk>extends</jk> Widget {
@@ -21048,7 +21032,7 @@
Typically it's used in the footer of the page, as shown below in the
<c>AddressBookResource</c> from the examples:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/addressBook"</js>,
widgets={
PoweredByJuneau.<jk>class</jk>
@@ -21122,15 +21106,15 @@
Instead, it just uses the existing open-ended API for defining branding
via annotations on your REST classes.
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
...
<jc>// HTML-page specific settings</jc>
htmldoc=<ja>@HtmlDoc</ja>(
<jc>// Default page header contents.</jc>
header={
-
<js>"<h1>$R{resourceTitle}</h1>"</js>, <jc>// Use
@RestResource(title)</jc>
-
<js>"<h2>$R{methodSummary,resourceDescription}</h2>"</js>, <jc>//
Use either @RestMethod(summary) or @RestResource(description)</jc>
+
<js>"<h1>$R{resourceTitle}</h1>"</js>, <jc>// Use @Rest(title)</jc>
+
<js>"<h2>$R{methodSummary,resourceDescription}</h2>"</js>, <jc>//
Use either @RestMethod(summary) or @Rest(description)</jc>
<js>"$C{REST/header}"</js> <jc>// Extra header
HTML defined in external config file.</jc>
},
@@ -21161,7 +21145,7 @@
<jk>public interface</jk> BasicRestConfig {}
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
...
htmldoc=<ja>@HtmlDoc</ja>(
htmldoc=<ja>@HtmlDoc</ja>(
@@ -21177,11 +21161,11 @@
<jk>public abstract class</jk> BasicRestServlet <jk>extends</jk>
RestServlet <jk>implements</jk> BasicRestConfig {...}
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>
+ <ja>@Rest</ja>
<jk>public abstract class</jk> BasicRestServletGroup <jk>extends</jk>
BasicRestServlet {...}
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
htmldoc=<ja>@HtmlDoc</ja>(
widgets={
ContentTypeMenuItem.<jk>class</jk>,
@@ -21282,7 +21266,7 @@
The stylesheet URL is controlled by the {@link
org.apache.juneau.html.annotation.HtmlDocConfig#stylesheet()
@HtmlDocConfig(stylesheet)} annotation.
The {@link org.apache.juneau.rest.BasicRestServlet} class defines the
stylesheet served up as a static file:
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
htmldoc=<ja>@HtmlDoc</ja>(
stylesheet=<js>"$C{REST/stylesheet,servlet:/styles/devops.css}"</js>,
),
@@ -21301,7 +21285,7 @@
file:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
htmldoc=<ja>@HtmlDoc</ja>(
stylesheet=<js>"servlet:/my-styles/my-style.css}"</js>,
),
@@ -21318,7 +21302,7 @@
In case you're curious about how the menu item works, it's defined via
a widget:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
htmldoc=<ja>@HtmlDoc</ja>(
widgets={
PoweredByApache.<jk>class</jk>,
@@ -21374,17 +21358,17 @@
</p>
<ul class='javatree'>
<li class='ja'>
- {@link
org.apache.juneau.rest.annotation.RestResource#defaultRequestHeaders()
RestResource(defaultRequestHeaders)}
+ {@link
org.apache.juneau.rest.annotation.Rest#defaultRequestHeaders()
Rest(defaultRequestHeaders)}
<br>Defines default headers on request when the client doesn't
specify them.
<li class='ja'>
- {@link
org.apache.juneau.rest.annotation.RestResource#defaultResponseHeaders()
RestResource(defaultResponseHeaders)}
+ {@link
org.apache.juneau.rest.annotation.Rest#defaultResponseHeaders()
Rest(defaultResponseHeaders)}
<br>Appends the specified headers if they weren't already set
programmatically.
</ul>
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
<jc>// Servlet with default headers</jc>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
<jc>// Assume "text/json" Accept value when Accept not
specified</jc>
defaultRequestHeaders={<js>"Accept: text/json"</js>},
@@ -21424,10 +21408,10 @@
</p>
<ul class='javatree'>
<li class='ja'>
- {@link org.apache.juneau.rest.annotation.RestResource}
+ {@link org.apache.juneau.rest.annotation.Rest}
<ul>
- <li class='jm'>{@link
org.apache.juneau.rest.annotation.RestResource#logging() logging()} -
Class-level logging configuration and rules.
- <li class='jm'>{@link
org.apache.juneau.rest.annotation.RestResource#debug() debug()} - Enable debug
mode.
+ <li class='jm'>{@link
org.apache.juneau.rest.annotation.Rest#logging() logging()} - Class-level
logging configuration and rules.
+ <li class='jm'>{@link
org.apache.juneau.rest.annotation.Rest#debug() debug()} - Enable debug mode.
</ul>
</li>
<li class='ja'>
@@ -21440,12 +21424,12 @@
<li class='jc'>
{@link org.apache.juneau.rest.RestContext}
<ul>
- <li class='jf'>{@link
org.apache.juneau.rest.RestContext#REST_callLoggerConfig REST_callLoggerConfig}
- Underlying configuration property for {@link
org.apache.juneau.rest.annotation.RestResource#logging()
@RestResource(logging)}.
- <li class='jf'>{@link
org.apache.juneau.rest.RestContext#REST_debug REST_debug} - Underlying
configuration property for {@link
org.apache.juneau.rest.annotation.RestResource#debug() @RestResource(debug)}.
+ <li class='jf'>{@link
org.apache.juneau.rest.RestContext#REST_callLoggerConfig REST_callLoggerConfig}
- Underlying configuration property for {@link
org.apache.juneau.rest.annotation.Rest#logging() @Rest(logging)}.
+ <li class='jf'>{@link
org.apache.juneau.rest.RestContext#REST_debug REST_debug} - Underlying
configuration property for {@link
org.apache.juneau.rest.annotation.Rest#debug() @Rest(debug)}.
</ul>
</li>
<li class='ja'>
- {@link org.apache.juneau.rest.annotation.Logging} - Annotation
for {@link org.apache.juneau.rest.annotation.RestResource#logging()
@RestResource(logging)} and {@link
org.apache.juneau.rest.annotation.RestMethod#logging() @RestMethod(logging)}
+ {@link org.apache.juneau.rest.annotation.Logging} - Annotation
for {@link org.apache.juneau.rest.annotation.Rest#logging() @Rest(logging)} and
{@link org.apache.juneau.rest.annotation.RestMethod#logging()
@RestMethod(logging)}
<ul>
<li class='jm'>{@link
org.apache.juneau.rest.annotation.Logging#level() level()} - The logging level.
<li class='jm'>{@link
org.apache.juneau.rest.annotation.Logging#rules() rules()} - The logging rules.
@@ -21483,7 +21467,7 @@
The following code shows the output produced using the <js>"short"</js>
setting:
</p>
<p class='bpcode'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
logging=<ja>@Logging</ja>(
level=<js>"info"</js>,
rules={
@@ -21526,7 +21510,7 @@
In comparison, using <js>"long"</js> formatting adds information about
headers and body.
</p>
<p class='bpcode'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
debug=<js>"true"</js>, <jc>// Needed to capture
request/response bodies for logging.</jc>
logging=<ja>@Logging</ja>(
level=<js>"info"</js>,
@@ -21581,7 +21565,7 @@
</p>
<p class='bpcode'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
logging=<ja>@Logging</ja>(
rules={
<jc>// Individual status codes.</jc>
@@ -21617,7 +21601,7 @@
The debug mode setting allows HTTP request/response bodies to be cached
in memory for logging purposes:
</p>
<p class='bpcode'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
debug=<js>"true"</js>
)
</p>
@@ -21651,7 +21635,7 @@
can be used to disable logging entirely or on a per-request basis:
</p>
<p class='bpcode'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
logging=<ja>@Logging</ja>(
disabled=<js>"true"</js>
rules={
@@ -21689,7 +21673,7 @@
In the example below, we're causing two exceptions but only logging the
first one:
</p>
<p class='bpcode'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
logging=<ja>@Logging</ja>(
useStackTraceHashing=<js>"true"</js>,
rules={
@@ -21827,11 +21811,11 @@
}
</p>
<p>
- To support overloaded methods, the {@link
org.apache.juneau.rest.annotation.RestResource#allowedMethodParams()
@RestResource(allowedMethodParams)}
+ To support overloaded methods, the {@link
org.apache.juneau.rest.annotation.Rest#allowedMethodParams()
@Rest(allowedMethodParams)}
setting must be enabled on your servlet.
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
<jc>// Allow &method parameter on BAR requests</jc>
allowedMethodParams=<js>"BAR"</js>
)
@@ -21876,21 +21860,21 @@
<td class='code'>&method=X</td>
<td>
Overload the HTTP method as a GET parameter (e.g
<l>"POST"</l>).
- <br>Must be enabled via {@link
org.apache.juneau.rest.annotation.RestResource#allowedMethodParams()
@RestResource(allowedMethodParams)} setting.
+ <br>Must be enabled via {@link
org.apache.juneau.rest.annotation.Rest#allowedMethodParams()
@Rest(allowedMethodParams)} setting.
</td>
</tr>
<tr>
<td class='code'>&Header-Name=headerValue</td>
<td>
Specify a header value as a GET parameter.
- <br>Must be enabled via {@link
org.apache.juneau.rest.annotation.RestResource#allowHeaderParams()
@RestResource(allowHeaderParams)} setting.
+ <br>Must be enabled via {@link
org.apache.juneau.rest.annotation.Rest#allowedHeaderParams()
@Rest(allowedHeaderParams)} setting.
</td>
</tr>
<tr>
<td class='code'>&body=X</td>
<td>
Pass in the HTTP body content on PUT and POST methods
as a UON-encoded GET parameter.
- <br>Must be enabled via {@link
org.apache.juneau.rest.annotation.RestResource#allowBodyParam()
@RestResource(allowBodyParam)} setting.
+ <br>Must be enabled via {@link
org.apache.juneau.rest.annotation.Rest#allowBodyParam() @Rest(allowBodyParam)}
setting.
</td>
</tr>
<tr>
@@ -21920,7 +21904,7 @@
<jd>/**
* Sample resource that allows images to be uploaded and retrieved.
*/</jd>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/photos"</js>,
messages=<js>"nls/PhotosResource"</js>,
title=<js>"Photo REST service"</js>,
@@ -22106,7 +22090,7 @@
<p>
The important class is the {@link
org.apache.juneau.rest.RestResourceResolver} class which is used
to resolve child servlet/resource implementation classes inside parent
contexts.
- In other words, it's used for resolving {@link
org.apache.juneau.rest.annotation.RestResource#children()
@RestResource(children)} instances.
+ In other words, it's used for resolving {@link
org.apache.juneau.rest.annotation.Rest#children() @Rest(children)} instances.
</p>
<p>
The general approach starts with defining a resolver that uses the
Spring application context for resolution:
@@ -22161,7 +22145,7 @@
sets it on the config object during initialization.
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
children={
...
}
@@ -22185,7 +22169,7 @@
After that, just define constructors on your child resources to take in
Spring beans:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/child"</js>
)
<jk>public class</jk> MyChildResource <jk>extends</jk> BasicRestServlet
{
@@ -22457,7 +22441,7 @@
that extends from <c>HttpServlet</c>:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/root"</js>,
children={
ChildResource.<jk>class</jk>
@@ -22474,7 +22458,7 @@
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/child"</js>,
children={
GrandChildResource.<jk>class</jk>
@@ -22485,7 +22469,7 @@
}
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/grandchild"</js>
)
<jk>public class</jk> GrandChildResource <jk>extends</jk> BasicRest {
@@ -22698,9 +22682,9 @@
<ul class='javatree'>
<li class='jc'>{@link org.apache.juneau.rest.client.RestClient}
<ul>
- <li class='jm'>{@link
org.apache.juneau.rest.client.RestClient#getRemoteResource(Class)
getRemoteResource(Class)}
- <li class='jm'>{@link
org.apache.juneau.rest.client.RestClient#getRemoteResource(Class,Object)
getRemoteResource(Class,Object)}
- <li class='jm'>{@link
org.apache.juneau.rest.client.RestClient#getRemoteResource(Class,Object,Serializer,Parser)
getRemoteResource(Class,Object,Serializer,Parser)}
+ <li class='jm'>{@link
org.apache.juneau.rest.client.RestClient#getRemote(Class) getRemote(Class)}
+ <li class='jm'>{@link
org.apache.juneau.rest.client.RestClient#getRemote(Class,Object)
getRemote(Class,Object)}
+ <li class='jm'>{@link
org.apache.juneau.rest.client.RestClient#getRemote(Class,Object,Serializer,Parser)
getRemote(Class,Object,Serializer,Parser)}
</ul>
</ul>
<p>
@@ -22710,7 +22694,7 @@
<ul class='javatree'>
<li class='jp'>{@link org.apache.juneau.http.remote}
<ul>
- <li class='ja'>{@link
org.apache.juneau.http.remote.RemoteResource}
+ <li class='ja'>{@link org.apache.juneau.http.remote.Remote}
<li class='ja'>{@link
org.apache.juneau.http.remote.RemoteMethod}
</ul>
<li class='jp'>{@link org.apache.juneau.http.annotation}
@@ -22727,7 +22711,7 @@
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
- <ja>@RemoteResource</ja>(path=<js>"/petstore"</js>)
+ <ja>@Remote</ja>(path=<js>"/petstore"</js>)
<jk>public interface</jk> PetStore {
<ja>@RemoteMethod</ja>(httpMethod=<jsf>POST</jsf>,
path=<js>"/pets"</js>)
@@ -22741,7 +22725,7 @@
<p class='bpcode w800'>
<jc>// Use a RestClient with default Simple JSON support.</jc>
<jk>try</jk> (RestClient client =
RestClient.<jsm>create</jsm>().simpleJson().build()) {
- PetStore store =
client.getRemoteResource(PetStore.<jk>class</jk>,
<js>"http://localhost:10000"</js>);
+ PetStore store = client.getRemote(PetStore.<jk>class</jk>,
<js>"http://localhost:10000"</js>);
CreatePet pet = <jk>new</jk> CreatePet(<js>"Fluffy"</js>, 9.99);
String response = store.createPet(pet,
UUID.<jsm>randomUUID</jsm>(), <jk>true</jk>);
}
@@ -22763,25 +22747,25 @@
<!--
====================================================================================================
-->
-<h4 class='topic ' onclick='toggle(this)'><a
href='#juneau-rest-client.RestProxies.RemoteResource'
id='juneau-rest-client.RestProxies.RemoteResource'>9.1.1 -
@RemoteResource</a></h4>
-<div class='topic'><!-- START: 9.1.1 -
juneau-rest-client.RestProxies.RemoteResource -->
+<h4 class='topic updated' onclick='toggle(this)'><a
href='#juneau-rest-client.RestProxies.Remote'
id='juneau-rest-client.RestProxies.Remote'>9.1.1 - @Remote</a></h4>
+<div class='topic'><!-- START: 9.1.1 - juneau-rest-client.RestProxies.Remote
-->
<p>
- The {@link org.apache.juneau.http.remote.RemoteResource
@RemoteResource} annotation is used on your interface class
+ The {@link org.apache.juneau.http.remote.Remote @Remote} 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.http.remote.RemoteResource}
+ <li class='ja'>{@link org.apache.juneau.http.remote.Remote}
<ul>
- <li class='jf'>{@link
org.apache.juneau.http.remote.RemoteResource#path path}
+ <li class='jf'>{@link org.apache.juneau.http.remote.Remote#path
path}
</ul>
</ul>
<p>
- The <ja>@RemoteResource</ja> annotation is optional, but often included
for code readability.
+ The <ja>@Remote</ja> annotation is optional, but often included for
code readability.
</p>
-<h5 class='topic'>@RemoteResource(path)</h5>
+<h5 class='topic'>@Remote(path)</h5>
<p>
- The {@link org.apache.juneau.http.remote.RemoteResource#path
@RemoteResource(path)} annotation is used to define the
+ The {@link org.apache.juneau.http.remote.Remote#path @Remote(path)}
annotation is used to define the
HTTP path of the REST service.
</p>
<p>
@@ -22789,37 +22773,37 @@
</p>
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
-
<ja>@RemoteResource</ja>(path=<js>"http://localhost:10000/petstore"</js>)
+ <ja>@Remote</ja>(path=<js>"http://localhost:10000/petstore"</js>)
<jk>public interface</jk> PetStore {...}
</p>
<p class='bpcode w800'>
- PetStore p = client.getRemoteResource(PetStore.<jk>class</jk>);
+ PetStore p = client.getRemote(PetStore.<jk>class</jk>);
</p>
<p>
When a relative path is specified, it's relative to the root-url
defined on the <c>RestClient</c> used to instantiate the interface.
</p>
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
- <ja>@RemoteResource</ja>(path=<js>"/petstore"</js>)
+ <ja>@Remote</ja>(path=<js>"/petstore"</js>)
<jk>public interface</jk> PetStore {...}
</p>
<p class='bpcode w800'>
RestClient client =
RestClient.<jsm>create</jsm>().json().rootUrl(<js>"http://localhost:10000"</js>).build();
- PetStore p = client.getRemoteResource(PetStore.<jk>class</jk>);
+ PetStore p = client.getRemote(PetStore.<jk>class</jk>);
</p>
<p>
When no path is specified, the root-url defined on the
<c>RestClient</c> is used.
</p>
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
- <ja>@RemoteResource</ja>
+ <ja>@Remote</ja>
<jk>public interface</jk> PetStore {...}
</p>
<p class='bpcode w800'>
RestClient client =
RestClient.<jsm>create</jsm>().json().rootUrl(<js>"http://localhost:10000/petstore"</js>).build();
- PetStore p = client.getRemoteResource(PetStore.<jk>class</jk>);
+ PetStore p = client.getRemote(PetStore.<jk>class</jk>);
</p>
-</div><!-- END: 9.1.1 - juneau-rest-client.RestProxies.RemoteResource -->
+</div><!-- END: 9.1.1 - juneau-rest-client.RestProxies.Remote -->
<!--
====================================================================================================
-->
@@ -22827,7 +22811,7 @@
<div class='topic'><!-- START: 9.1.2 -
juneau-rest-client.RestProxies.RemoteMethod -->
<p>
The {@link org.apache.juneau.http.remote.RemoteMethod @RemoteMethod}
annotation is applied to methods
- of <ja>@RemoteResource</ja>-annotated interfaces to identify REST
endpoints.
+ of <ja>@Remote</ja>-annotated interfaces to identify REST endpoints.
</p>
<ul class='javatree'>
<li class='ja'>{@link org.apache.juneau.http.remote.RemoteMethod}
@@ -22843,7 +22827,7 @@
</p>
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
- <ja>@RemoteResource</ja>
+ <ja>@Remote</ja>
<jk>public interface</jk> PetStore {
<jc>// GET /pets/{petId}</jc>
@@ -22864,7 +22848,7 @@
For example, the <c>getPet</c> method below defaults to <c>GET /pet</c>:
</p>
<p class='bpcode w800'>
- <ja>@RemoteResource</ja>
+ <ja>@Remote</ja>
<jk>public interface</jk> PetStore {
<jc>// GET /pet</jc>
@@ -22961,7 +22945,7 @@
</p>
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
- <ja>@RemoteResource</ja>
+ <ja>@Remote</ja>
<jk>public interface</jk> PetStore {
<jc>// POST /pets</jc>
@@ -22995,7 +22979,7 @@
<h5 class='figure'>Examples:</h5>
<p class='bpcode w800'>
<jc>// Used on parameter</jc>
- <ja>@RemoteResource</ja>(path=<js>"/petstore"</js>)
+ <ja>@Remote</ja>(path=<js>"/petstore"</js>)
<jk>public interface</jk> PetStore {
<ja>@RemoteMethod</ja>(path=<js>"/pets"</js>)
@@ -23004,7 +22988,7 @@
</p>
<p class='bpcode w800'>
<jc>// Used on class</jc>
- <ja>@RemoteResource</ja>(path=<js>"/petstore"</js>)
+ <ja>@Remote</ja>(path=<js>"/petstore"</js>)
<jk>public interface</jk> PetStore {
<ja>@RemoteMethod</ja>(path=<js>"/pets"</js>)
@@ -23109,7 +23093,7 @@
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
- <ja>@RemoteResource</ja>(path=<js>"/myproxy"</js>)
+ <ja>@Remote</ja>(path=<js>"/myproxy"</js>)
<jk>public interface</jk> MyProxy {
<jc>// Explicit names specified for form data parameters.</jc>
@@ -23216,7 +23200,7 @@
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
- <ja>@RemoteResource</ja>(path=<js>"/myproxy"</js>)
+ <ja>@Remote</ja>(path=<js>"/myproxy"</js>)
<jk>public interface</jk> MyProxy {
<jc>// Explicit names specified for query parameters.</jc>
@@ -23326,7 +23310,7 @@
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
- <ja>@RemoteResource</ja>(path=<js>"/myproxy"</js>)
+ <ja>@Remote</ja>(path=<js>"/myproxy"</js>)
<jk>public interface</jk> MyProxy {
<jc>// Explicit names specified for HTTP headers.</jc>
@@ -23416,7 +23400,7 @@
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
- <ja>@RemoteResource</ja>(path=<js>"/myproxy"</js>)
+ <ja>@Remote</ja>(path=<js>"/myproxy"</js>)
<jk>public interface</jk> MyProxy {
<jc>// Explicit names specified for path parameters.</jc>
@@ -23492,7 +23476,7 @@
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
- <ja>@RemoteResource</ja>(path=<js>"/petstore"</js>)
+ <ja>@Remote</ja>(path=<js>"/petstore"</js>)
<jk>public interface</jk> PetStore {
<ja>@RemoteMethod</ja>
@@ -23526,7 +23510,7 @@
}
</p>
<p class='bpcode w800'>
- PetStore store = restClient.getRemoteResource(PetStore.<jk>class</jk>,
<js>"http://localhost:10000"</js>);
+ PetStore store = restClient.getRemote(PetStore.<jk>class</jk>,
<js>"http://localhost:10000"</js>);
CreatePetRequest requestBean = <jk>new</jk>
CreatePetRequest(<js>"Fluffy"</js>, 9.99);
String response = store.postPet(requestBean);
</p>
@@ -23610,7 +23594,7 @@
</p>
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
- <ja>@RemoteResource</ja>
+ <ja>@Remote</ja>
<jk>public interface</jk> PetStore {
<ja>@RemoteMethod</ja>
@@ -23632,7 +23616,7 @@
}
</p>
<p class='bpcode w800'>
- PetStore store = restClient.getRemoteResource(PetStore.<jk>class</jk>,
<js>"http://localhost:10000"</js>);
+ PetStore store = restClient.getRemote(PetStore.<jk>class</jk>,
<js>"http://localhost:10000"</js>);
CreatePetResponse response = store.postPet(...);
Pet pet = response.getBody();
UUID uuid = response.getUUID();
@@ -23671,11 +23655,11 @@
annotations defined on overridden methods.
</p>
<p>
- The general approach is to define your {@link
org.apache.juneau.rest.client.remote.RemoteResource @RemoteResource}-annotated
interface first.
+ The general approach is to define your {@link
org.apache.juneau.http.remote.Remote @Remote}-annotated interface first.
The following example is pulled from the PetStore app:
</p>
<p class='bpcode w800'>
- <ja>@RemoteResource</ja>(path=<js>"/petstore"</js>)
+ <ja>@Remote</ja>(path=<js>"/petstore"</js>)
<jk>public interface</jk> PetStore {
<ja>@RemoteMethod</ja>(method=<jsf>GET</jsf>,
path=<js>"/pet"</js>)
@@ -23704,7 +23688,7 @@
Next you define the implementation of your interface as a normal Juneau
REST resource:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/petstore"</js>,
title=<js>"Petstore application"</js>,
...
@@ -23741,7 +23725,7 @@
</p>
<p class='bpcode w800'>
<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>);
+ PetStore ps = rc.getRemote(PetStore.<jk>class</jk>);
<jk>for</jk> (Pet x : ps.getPets()) {
ps.deletePet(<js>"my-special-key"</js>, x.getId());
@@ -24442,8 +24426,8 @@
<ul class='javatree'>
<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.http.remote.RemoteResource @RemoteResource}-annotated classes.
+ <li class='jc'>{@link org.apache.juneau.rest.mock2.MockRest} -
API for unit testing {@link org.apache.juneau.rest.annotation.Rest
@Rest}-annotated classes.
+ <li class='jc'>{@link org.apache.juneau.rest.mock2.MockRemote}
- API for unit testing {@link org.apache.juneau.http.remote.Remote
@Remote}-annotated classes.
</ul>
</ul>
@@ -24452,7 +24436,7 @@
<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-mock.MockRest'
id='juneau-rest-mock.MockRest'>10.1 - MockRest</a></h3>
<div class='topic'><!-- START: 10.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
+ The {@link org.apache.juneau.rest.mock2.MockRest} class is used for
performing serverless unit testing of {@link
org.apache.juneau.rest.annotation.Rest @Rest}-annotated
classes. These include both parent resource classes that extend from
{@link org.apache.juneau.rest.RestServlet} and child resources that do not.
</p>
<p>
@@ -24477,7 +24461,7 @@
<jk>public class</jk> MockTest {
<jc>// Our REST resource to test.</jc>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
serializers=SimpleJsonSerializer.<jk>class</jk>,
parsers=JsonParser.<jk>class</jk>
)
@@ -24711,20 +24695,20 @@
<!--
====================================================================================================
-->
-<h3 class='topic ' onclick='toggle(this)'><a
href='#juneau-rest-mock.MockRemoteResource'
id='juneau-rest-mock.MockRemoteResource'>10.2 - MockRemoteResource</a></h3>
-<div class='topic'><!-- START: 10.2 - juneau-rest-mock.MockRemoteResource -->
+<h3 class='topic updated' onclick='toggle(this)'><a
href='#juneau-rest-mock.MockRemote' id='juneau-rest-mock.MockRemote'>10.2 -
MockRemote</a></h3>
+<div class='topic'><!-- START: 10.2 - juneau-rest-mock.MockRemote -->
<p>
- 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
+ The {@link org.apache.juneau.rest.mock2.MockRemote} class is used for
serverless unit testing of {@link org.apache.juneau.http.remote.Remote
@Remote}-annotated
classes.
</p>
<p>
- The {@link org.apache.juneau.rest.mock2.MockRemoteResource} API
requires a {@link org.apache.juneau.rest.annotation.RestResource
@RestResource}-annotated class to be used as
+ The {@link org.apache.juneau.rest.mock2.MockRemote} API requires a
{@link org.apache.juneau.rest.annotation.Rest @Rest}-annotated class to be used
as
an underlying mocked resource to process the request and return a
response.
</p>
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
<jc>// Our remote resource to test.</jc>
- <ja>@RemoteResource</ja>
+ <ja>@Remote</ja>
<jk>public interface</jk> MyRemoteInterface {
<ja>@RemoteMethod</ja>(httpMethod=<js>"GET"</js>,
path=<js>"/echoQuery"</js>)
@@ -24732,7 +24716,7 @@
}
<jc>// Our mocked-up REST interface to test against.</jc>
- <ja>@RestResource</ja>
+ <ja>@Rest</ja>
<jk>public class</jk> MyRest {
<ja>@RestMethod</ja>(name=GET, path=<js>"/echoQuery"</js>)
@@ -24743,7 +24727,7 @@
<ja>@Test</ja>
<jk>public void</jk> testProxy() {
- MyRemoteInterface mri =
MockRemoteResource.build(MyRemoteInterface.<jk>class</jk>,
MyRest.<jk>class</jk>);
+ MyRemoteInterface mri =
MockRemote.build(MyRemoteInterface.<jk>class</jk>, MyRest.<jk>class</jk>);
<jsm>assertEquals</jsm>(123, mri.echoQuery(123));
}
</p>
@@ -24751,8 +24735,8 @@
It looks simple, but there's a lot going on here.
</p>
<p>
- Remote resource interfaces are normally created through the {@link
org.apache.juneau.rest.client.RestClient#getRemoteResource(Class)} method.
- The {@link org.apache.juneau.rest.mock2.MockRemoteResource} will create
a {@link org.apache.juneau.rest.client.RestClient} using a specialized
<c>HttpClientConnectionManager</c>
+ Remote resource interfaces are normally created through the {@link
org.apache.juneau.rest.client.RestClient#getRemote(Class)} method.
+ The {@link org.apache.juneau.rest.mock2.MockRemote} will create a
{@link org.apache.juneau.rest.client.RestClient} using a specialized
<c>HttpClientConnectionManager</c>
designed to transform client-side
<c>HttpRequest</c>/<c>HttpResponse</c> objects into server-side
{@link org.apache.juneau.rest.mock2.MockServletRequest}/{@link
org.apache.juneau.rest.mock2.MockServletResponse} objects and then pass those
to the {@link org.apache.juneau.rest.mock2.MockRest}
object described in the previous section.
@@ -24763,31 +24747,31 @@
</p>
<hr>
<p>
- By default, the {@link org.apache.juneau.rest.mock2.MockRemoteResource}
class uses JSON marshalling.
+ By default, the {@link org.apache.juneau.rest.mock2.MockRemote} class
uses JSON marshalling.
This can be overridden via any of the following methods:
</p>
<ul class='javatree'>
- <li class='jm'>{@link
org.apache.juneau.rest.mock2.MockRemoteResource#build(Class,Object,Marshall)}
- <li class='jm'>{@link
org.apache.juneau.rest.mock2.MockRemoteResource#build(Class,Object,Serializer,Parser)}
- <li class='jm'>{@link
org.apache.juneau.rest.mock2.MockRemoteResource#create(Class,Object,Marshall)}
- <li class='jm'>{@link
org.apache.juneau.rest.mock2.MockRemoteResource#create(Class,Object,Serializer,Parser)}
+ <li class='jm'>{@link
org.apache.juneau.rest.mock2.MockRemote#build(Class,Object,Marshall)}
+ <li class='jm'>{@link
org.apache.juneau.rest.mock2.MockRemote#build(Class,Object,Serializer,Parser)}
+ <li class='jm'>{@link
org.apache.juneau.rest.mock2.MockRemote#create(Class,Object,Marshall)}
+ <li class='jm'>{@link
org.apache.juneau.rest.mock2.MockRemote#create(Class,Object,Serializer,Parser)}
</ul>
<hr>
<p>
- The {@link org.apache.juneau.rest.mock2.MockRemoteResource} class has a
debug mode that will cause your HTTP requests and responses to
+ The {@link org.apache.juneau.rest.mock2.MockRemote} class has a debug
mode that will cause your HTTP requests and responses to
be sent to the console on both the client and server sides:
</p>
<p class='bpcode w800'>
<ja>@Test</ja>
<jk>public void</jk> testProxy() {
- MyRemoteInterface mri = MockRemoteResource
+ MyRemoteInterface mri = MockRemote
.create(MyRemoteInterface.<jk>class</jk>,
MyRest.<jk>class</jk>)
.debug()
.build();
<jsm>assertEquals</jsm>(123, mri.echoQuery(123));
}
</p>
-</div><!-- END: 10.2 - juneau-rest-mock.MockRemoteResource -->
+</div><!-- END: 10.2 - juneau-rest-mock.MockRemote -->
</div><!-- END: 10 - juneau-rest-mock -->
<!--
====================================================================================================
-->
@@ -25050,7 +25034,7 @@
</p>
<p class='bpcode w800'>
<jc>// $A used in annotation.</jc>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
title=<js>"$A{title}"</js>,
...
)
@@ -25113,7 +25097,7 @@
</p>
<p class='bpcode w800'>
<jc>// $MF used in annotation.</jc>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
title=<js>"$MF{Application-Title}"</js>,
...
)
@@ -25220,7 +25204,7 @@
<p>
<h5 class='figure'>BasicRestConfig.java</h5>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
config=<js>"$S{juneau.configFile,SYSTEM_DEFAULT}"</js>
...
)
@@ -25808,7 +25792,7 @@
The example is a router page that serves as a jumping off page to child
resources.
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/*"</js>,
title=<js>"My Microservice"</js>,
description=<js>"Top-level resources page"</js>,
@@ -25859,7 +25843,7 @@
...which is generated by this class...
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/helloWorld"</js>,
title=<js>"Hello World example"</js>,
description=<js>"Simplest possible REST resource"</js>
@@ -25978,7 +25962,7 @@
classes that extend from {@link
org.apache.juneau.rest.BasicRestServlet} use several <c>$C</c> variables to
externalize values:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
...
<jc>// HTML-page specific settings</jc>
@@ -25986,8 +25970,8 @@
<jc>// Default page header contents.</jc>
header={
-
<js>"<h1>$R{resourceTitle}</h1>"</js>, <jc>// Use
@RestResource(title)</jc>
-
<js>"<h2>$R{methodSummary,resourceDescription}</h2>"</js>, <jc>//
Use either @RestMethod(summary) or @RestResource(description)</jc>
+
<js>"<h1>$R{resourceTitle}</h1>"</js>, <jc>// Use @Rest(title)</jc>
+
<js>"<h2>$R{methodSummary,resourceDescription}</h2>"</js>, <jc>//
Use either @RestMethod(summary) or @Rest(description)</jc>
<js>"$C{REST/header}"</js> <jc>// Extra header
HTML defined in external config file.</jc>
},
@@ -26069,7 +26053,7 @@
<cc>#---------------------------------</cc>
<cc># Contents of MyHelloResource.java </cc>
<cc>#---------------------------------</cc>
- <ja>@RestResource</ja>(...)
+ <ja>@Rest</ja>(...)
<jk>public class</jk> MyHelloResource <jk>extends</jk> BasicRestServlet
{
<jk>private</jk> String <jf>greeting</jf>;
@@ -26104,7 +26088,7 @@
<cc>#---------------------------------</cc>
<cc># Contents of MyHelloResource.java </cc>
<cc>#---------------------------------</cc>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/hello"</js>,
messages=<js>"nls/Messages"</js>,
...
@@ -26308,15 +26292,15 @@
pulls in this information using {@link
org.apache.juneau.config.vars.ConfigVar $C} and {@link
org.apache.juneau.rest.vars.UrlVar $U} variables:
</p>
<p class='bpcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
...
<jc>// HTML-page specific settings</jc>
htmldoc=<ja>@HtmlDoc</ja>(
<jc>// Default page header contents.</jc>
header={
-
<js>"<h1>$R{resourceTitle}</h1>"</js>, <jc>// Use
@RestResource(title)</jc>
-
<js>"<h2>$R{methodSummary,resourceDescription}</h2>"</js>, <jc>//
Use either @RestMethod(summary) or @RestResource(description)</jc>
+
<js>"<h1>$R{resourceTitle}</h1>"</js>, <jc>// Use @Rest(title)</jc>
+
<js>"<h2>$R{methodSummary,resourceDescription}</h2>"</js>, <jc>//
Use either @RestMethod(summary) or @Rest(description)</jc>
<js>"$C{REST/header}"</js> <jc>// Extra header
HTML defined in external config file.</jc>
},
@@ -26525,7 +26509,7 @@
<br>This class routes HTTP requests to child resources:
<br><br>
<p class='bcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/"</js>,
title=<js>"My Microservice"</js>,
description=<js>"Top-level resources page"</js>,
@@ -26584,7 +26568,7 @@
#=======================================================================================================================</cc>
<cs>[REST]</cs>
- <cc># Comma-delimited list of key-value pairs that represent locations
of static files that can be served up by your @RestResource-annotated
+ <cc># Comma-delimited list of key-value pairs that represent locations
of static files that can be served up by your @Rest-annotated
# classes. These are static files that are served up by the servlet
under the specified sub-paths.
# For example, given the following setting...
# staticFiles = htdocs:my-docs,styles/my-styles
@@ -26893,7 +26877,7 @@
<br>This is identical to the Jetty example.
<br><br>
<p class='bcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/"</js>,
title=<js>"My Microservice"</js>,
description=<js>"Top-level resources page"</js>,
@@ -26934,7 +26918,7 @@
#=======================================================================================================================</cc>
<cs>[REST]</cs>
- <cc># Comma-delimited list of key-value pairs that represent locations
of static files that can be served up by your @RestResource-annotated
+ <cc># Comma-delimited list of key-value pairs that represent locations
of static files that can be served up by your @Rest-annotated
# classes. These are static files that are served up by the servlet
under the specified sub-paths.
# For example, given the following setting...
# staticFiles = htdocs:my-docs,styles/my-styles
@@ -27236,7 +27220,7 @@
<jd>/**
* Sample REST resource showing how to implement a "router" resource
page.
*/</jd>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/"</js>,
title=<js>"Root resources"</js>,
description=<js>"Example of a router resource page."</js>,
@@ -27286,7 +27270,7 @@
These are resources whose paths are direct descendants to the parent
resource.
</p>
<p>
- Child resources must be annotated with the {@link
org.apache.juneau.rest.annotation.RestResource#path() @RestResource(path)}
annotation to
+ Child resources must be annotated with the {@link
org.apache.juneau.rest.annotation.Rest#path() @Rest(path)} annotation to
identify the subpath of the child.
Children CAN extend from {@link
org.apache.juneau.rest.BasicRestServlet} but it is not a requirement.
</p>
@@ -27299,11 +27283,11 @@
</p>
<p>
During servlet initialization of the <l>RootResources</l> object, the
toolkit looks for the
- <l>@RestResource(children)</l> annotation.
+ <l>@Rest(children)</l> annotation.
If it finds it, it instantiates instances of each class and recursively
performs servlet initialization
on them.
It then associates the child resource with the parent by the name
specified by the
- <l>@RestResource(path)</l> annotation on the child class.
+ <l>@Rest(path)</l> annotation on the child class.
</p>
<p>
When a request for the child URL (<l>/helloWorld</l>) is received, the
<l>RootResources</l> servlet
@@ -27327,7 +27311,7 @@
<jd>/**
* Sample REST resource that prints out a simple "Hello world!" message.
*/</jd>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
title=<js>"Hello World"</js>,
description=<js>"An example of the simplest-possible
resource"</js>,
path=<js>"/helloWorld"</js>,
@@ -27352,7 +27336,7 @@
<p>
Notice that in this case we're not extending from {@link
org.apache.juneau.rest.RestServlet}.
We are however implementing {@link
org.apache.juneau.rest.BasicRestConfig} which is a no-op
- interface that defines a default <ja>@RestResource</ja> annotation with
all the serializers, parsers,
+ interface that defines a default <ja>@Rest</ja> annotation with all the
serializers, parsers,
and configuration defined on the {@link
org.apache.juneau.rest.BasicRestServlet} class.
</p>
<p>
@@ -27424,7 +27408,7 @@
<jd>/**
* Sample resource that shows how to generate ATOM feeds.
*/</jd>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/atom"</js>,
title=<js>"Sample ATOM feed resource"</js>,
description=<js>"Sample resource that shows how to render ATOM
feeds"</js>,
@@ -27534,7 +27518,7 @@
<jd>/**
* Sample resource that shows how to serialize JSON-Schema documents.
*/</jd>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/jsonSchema"</js>,
messages=<js>"nls/JsonSchemaResource"</js>,
title=<js>"Sample JSON-Schema document"</js>,
@@ -27636,7 +27620,7 @@
<jd>/**
* Shows contents of the microservice configuration file.
*/</jd>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/config"</js>,
title=<js>"Configuration"</js>,
description=<js>"Contents of configuration file."</js>,
@@ -27846,7 +27830,7 @@
<br>This class routes HTTP requests to child resources:
<br><br>
<p class='bcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/*"</js>,
title=<js>"Root resources"</js>,
description=<js>"Example of a router resource page."</js>,
@@ -27926,7 +27910,7 @@
#=======================================================================================================================</cc>
<cs>[REST]</cs>
- <cc># Comma-delimited list of key-value pairs that represent locations
of static files that can be served up by your @RestResource-annotated
+ <cc># Comma-delimited list of key-value pairs that represent locations
of static files that can be served up by your @Rest-annotated
# classes. These are static files that are served up by the servlet
under the specified sub-paths.
# For example, given the following setting...
# staticFiles = htdocs:my-docs,styles/my-styles
@@ -28237,7 +28221,7 @@
<br>This class routes HTTP requests to child resources:
<br><br>
<p class='bcode w800'>
- <ja>@RestResource</ja>(
+ <ja>@Rest</ja>(
path=<js>"/*"</js>,
title=<js>"Root resources"</js>,
description=<js>"Example of a router resource page."</js>,
@@ -28691,7 +28675,7 @@
<h3 class='topic ' onclick='toggle(this)'><a
href='#Security.juneau-rest-server' id='Security.juneau-rest-server'>19.3 -
juneau-rest-server</a></h3>
<div class='topic'><!-- START: 19.3 - Security.juneau-rest-server -->
<p>
- Denial of service attacks can be alleviated through the {@link
org.apache.juneau.rest.annotation.RestResource#maxInput() maxInput()}
+ Denial of service attacks can be alleviated through the {@link
org.apache.juneau.rest.annotation.Rest#maxInput() maxInput()}
setting. Arbitrarily-large input will trigger an exception before
causing out-of-memory errors.
The default value for this setting is 100MB.
</p>
@@ -29029,7 +29013,7 @@
<li>New <c><ja>@RestChild</ja></c> annotation for identifying child
resources.</li>
<li>
New <c>traversable</c> and <c>filterable</c> attributes added
to {@link org.apache.juneau.rest.annotation.RestMethod @RestMethod}
annotation.<br>
- Eliminates the need for <c>PojoResource</c> and
<c>FilteredRestResource</c> classes.
+ Eliminates the need for <dc>PojoResource</dc> and
<dc>FilteredRestResource</dc> classes.
</li>
<li>Simplified client API. Easier to use when making multiple
connections to the same server.</li>
<li>Support for pluggable authentication in the client API.</li>
@@ -29174,10 +29158,10 @@
<li>
Several new annotations on REST servlets:
<ul>
- <li><c>@RestResource(filters)</c> - Associate
post-formatting filters on a resource level.</li>
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#guards() @RestResource.guards} -
Associate resource-level guards.</li>
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#messages()
@RestResource.messages} - Associate a resource bundle with a REST servlet.
Comes with several convenience methods for looking up messages for the client
locale.</li>
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#properties()
@RestResource.properties} - Override default bean context, serializer, and
parser properties though an annotation.</li>
+ <li><dc>@RestResource(filters)</cc> - Associate
post-formatting filters on a resource level.</li>
+ <li><dc>@RestResource.guards</dc> - Associate
resource-level guards.</li>
+ <li><dc>@RestResource.messages</dc> - Associate a
resource bundle with a REST servlet. Comes with several convenience methods
for looking up messages for the client locale.</li>
+ <li><dc>@RestResource.properties</dc> - Override
default bean context, serializer, and parser properties though an
annotation.</li>
</ul>
</li>
<li>
@@ -29248,7 +29232,7 @@
<h5 class='topic w800'>REST server API changes</h5>
<ul class='spaced-list'>
<li>Build-in default <c>OPTIONS</c> pages.</li>
- <li>New {@link
org.apache.juneau.rest.annotation.RestResource#defaultRequestHeaders()
@RestResource.defaultRequestHeaders} and {@link
org.apache.juneau.rest.annotation.RestResource#defaultResponseHeaders()
@RestResource.defaultResponseHeaders} annotations.</li>
+ <li>New <dc>@RestResource.defaultRequestHeaders</dc> and
<dc>@RestResource.defaultResponseHeaders</dc> annotations.</li>
<li>New {@link
org.apache.juneau.rest.annotation.RestMethod#serializers()
@RestMethod(serializers)} and {@link
org.apache.juneau.rest.annotation.RestMethod#parsers() @RestMethod(parsers)}
annotations.</li>
<li>New {@link
org.apache.juneau.rest.annotation.RestMethod#properties()
@RestMethod(properties)} annotation.</li>
<li>New {@link
org.apache.juneau.rest.annotation.RestMethod#defaultRequestHeaders()
@RestMethod(defaultRequestHeaders)} annotation.</li>
@@ -29278,7 +29262,7 @@
<h5 class='topic w800'>REST server API changes</h5>
<ul class='spaced-list'>
<li>New <c>RestServletProperties</c> class that defines all the
class-level properties that can be set on the servlet.</li>
- <li>Properties can be set through {@link
org.apache.juneau.rest.annotation.RestResource#properties()
@RestResource.properties} annotation, or new
<dc>RestServlet.setProperty(String,Object)</dc> method.</li>
+ <li>Properties can be set through <dc>@RestResource.propertie</dc>
annotation, or new <dc>RestServlet.setProperty(String,Object)</dc> method.</li>
<li>New <js>"?noTrace"</js> URL parameter to prevent stack traces from
being logged (for JUnit testing of error conditions).</li>
<li>New <c>RestServletProperties.REST_useStackTraceHashes</c> property
to prevent the same stack trace from being logged multiple times.</li>
<li>New <c>RestServletProperties.REST_renderResponseStackTraces</c>
property for preventing stack traces in responses for security reasons.</li>
@@ -29628,7 +29612,7 @@
<h5 class='topic w800'>REST server API changes</h5>
<ul class='spaced-list'>
<li>
- Allow inheritance of {@link
org.apache.juneau.rest.annotation.RestResource @RestResource} annotation.<br>
+ Allow inheritance of <dc>@RestResource</dc> annotation.<br>
Serializers, parsers, filters, properties , guards, and
converters definitions are automatically inherited from parent classes and
interfaces.
</li>
<li>
@@ -29842,8 +29826,8 @@
</li>
<li>
Changed the way child REST resources are defined.<br>
- Eliminated the <ja>@RestChild</ja> annotation on getter methods
and replaced it with {@link
org.apache.juneau.rest.annotation.RestResource#children()
@RestResource(children)} defined on the resource class itself.<br>
- Child resource paths are specified through {@link
org.apache.juneau.rest.annotation.RestResource#path() @RestResource(path)}.
+ Eliminated the <ja>@RestChild</ja> annotation on getter methods
and replaced it with <dc>@RestResource(children)</dc> defined on the resource
class itself.<br>
+ Child resource paths are specified through
<dc>@RestResource(path)</dc>.
</li>
<li>
New <dc>ChildResourceDescriptions</dc> bean for
automatically generating the contents of router resource pages.
@@ -30392,7 +30376,7 @@
</p>
<ul class='spaced-list'>
<li>New <dc>Redirect</dc> class that simplifies performing redirections
in REST methods.
- <li>New pluggable {@link org.apache.juneau.rest.ResponseHandler} class
and {@link org.apache.juneau.rest.annotation.RestResource#responseHandlers()
@RestResource(responseHandlers)} annotation
+ <li>New pluggable {@link org.apache.juneau.rest.ResponseHandler} class
and <dc>@RestResource(responseHandlers)</dc> annotation
for defining customer response handlers for special kinds of
POJOs.
<li>New method <dc>UrlEncodingSerializer.serializeUrlPart(Object)</dc>
method.
<li>New method <dc>RestRequest.getServletURIBuilder()</dc> for
construcing servlet-based URLs more efficiently.
@@ -30726,7 +30710,7 @@
<ul class='spaced-list'>
<li>{@link org.apache.juneau.rest.RestConverter} API fixed to handle
the existence of POJO filters.
{@link org.apache.juneau.rest.converters.Introspectable}/{@link
org.apache.juneau.rest.converters.Queryable}/{@link
org.apache.juneau.rest.converters.Traversable} classes can now work with
filtered POJOs.
- <li>{@link org.apache.juneau.rest.annotation.RestResource#messages()
@RestResource(messages)} annotation can now be defined on super and subclasses
so that NLS messages can be defined in multiple resource bundles.
+ <li><dc>@RestResource(messages)</dc> annotation can now be defined on
super and subclasses so that NLS messages can be defined in multiple resource
bundles.
<li>Performance improvements in <c>RestServletNls</c> class.
<li>Fixed bug where two REST java methods mapped to the same path
pattern wasn't triggering an exception when it was supposed to.
</ul>
@@ -30914,7 +30898,7 @@
<li><dc>StringVarResolver</dc> now has support for chained resolvers.
<li><dc>StringVarResolver</dc> now resolves variables inside resolved
values.
i.e. if a resolved variable value itself contains a variable,
it now resolves that variable too.
- <li>Fixed bug where inner interface classes being used in
<c>RestResource.filters()</c> were being
+ <li>Fixed bug where inner interface classes being used in
<dc>RestResource.filters()</dc> were being
interpreted as surrogate classes because they have hidden 1-arg
constructors due to being inner classes.
<li>Fixed bug in {@link org.apache.juneau.internal.MultiSet} where
exception was being thrown if last set was empty.
<li>New {@link org.apache.juneau.utils.ZipFileList} class for providing
efficiently zipped directories through the REST interface.
@@ -30981,7 +30965,7 @@
want to provide labels in resource bundles.
<ul>
<li><dc>RestResource.label()</dc>
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#description()
@RestResource(description)}
+ <li><dc>@RestResource(description)</dc>
<li>{@link
org.apache.juneau.rest.annotation.RestMethod#description()
@RestMethod(description)}
<li><dc>RestMethod#responses()</dc>
<li><dc>Attr.description()</dc>
@@ -31142,7 +31126,7 @@
<li>New {@link org.apache.juneau.rest.annotation.RestMethod#encoders()
@RestMethod(encoders)} and
<dc>RestMethod.inheritEncoders()</dc> annotations.
Allows encoders to be fine-tuned at the method level.
- <li>New {@link org.apache.juneau.rest.annotation.RestResource#config()
@RestResource(config)} annotation for associating external <dc>ConfigFile</dc>
config files with servlets.
+ <li>New <dc>@RestResource(config)</dc> annotation for associating
external <dc>ConfigFile</dc> config files with servlets.
<li><dc>ResourceLink</dc>.
<li>New <c>org.apache.juneau.rest.matchers</c> package for
commonly-used {@link org.apache.juneau.rest.RestMatcher RestMatchers}:
<ul>
@@ -31494,7 +31478,7 @@
</ul>
<li>New methods in {@link org.apache.juneau.rest.RestServlet}:
<ul>
- <li><dc>RestServlet.getChildClasses()</dc> -
Programmatic equivalent to {@link
org.apache.juneau.rest.annotation.RestResource#children()
@RestResource(children)} annotation.
+ <li><dc>RestServlet.getChildClasses()</dc> -
Programmatic equivalent to <dc>@RestResource(children)</dc> annotation.
<li><dc>RestServlet.shouldLog(HttpServletRequest,HttpServletResponse,RestException)</dc>
<li><dc>RestServlet.shouldLogStackTrace(HttpServletRequest,HttpServletResponse,RestException)</dc>
<li><dc>RestServlet.logObjects(Level,String,Object[])</dc>
@@ -31508,12 +31492,12 @@
from {@link org.apache.juneau.rest.BasicRestServlet} and
<dc>RestServletJenaDefault</dc>.
These may represent a security risk if not handled correctly,
so removed
them as a precaution.
- <li>Removed <c>RestServletProperties.REST_htDocsFolder</c>. Replaced
with {@link org.apache.juneau.rest.annotation.RestResource#staticFiles()
@RestResource(staticFiles)}.
- <li>New annotations on {@link
org.apache.juneau.rest.annotation.RestResource @RestResource}.
+ <li>Removed <c>RestServletProperties.REST_htDocsFolder</c>. Replaced
with <dc>@RestResource(staticFiles)</dc>}.
+ <li>New annotations on <dc>@RestResource</dc>.
<ul>
<li><dc>RestResource.stylesheet()</dc>
<li><dc>RestResource.favicon()</dc>
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#staticFiles()
@RestResource(staticFiles)}
+ <li><dc>@RestResource(staticFiles)</dc>
</ul>
<li>Eliminated <c>org.apache.juneau.rest.jaxrs.JsonProvider</c> class.
Some JAX-RS implementations use code scanning to find
providers, so if you were using <c>DefaultJenaProvider</c>, it would
@@ -31760,8 +31744,8 @@
<li>Eliminated <c>ResourceOptions</c> and related code.
<li>New annotations and related methods:
<ul>
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#title() @RestResource(title)} /
{@link org.apache.juneau.rest.RestInfoProvider#getTitle(RestRequest)}
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#description()
@RestResource(description)} / {@link
org.apache.juneau.rest.RestInfoProvider#getDescription(RestRequest)}
+ <li><dc>@RestResource(title)</dc> /
{@link org.apache.juneau.rest.RestInfoProvider#getTitle(RestRequest)}
+ <li><dc>@RestResource(description)</dc>
/ {@link org.apache.juneau.rest.RestInfoProvider#getDescription(RestRequest)}
<li><dc>@RestResource(termsOfService)</dc> /
<dc>RestInfoProvider.getTermsOfService(RestRequest)</dc>
<li><dc>@RestResource(contact)</dc> /
<dc>RestInfoProvider.getContact(RestRequest)</dc>
<li><dc>@RestResource(license)</dc> /
<dc>RestInfoProvider.getLicense(RestRequest)</dc>
@@ -31799,7 +31783,7 @@
</li>
<li>New client-version annotations:
<ul>
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#clientVersionHeader} - The name
of the header used to identify the client version.
+ <li><dc>RestResource.clientVersionHeader</dc> - The
name of the header used to identify the client version.
<li>{@link
org.apache.juneau.rest.annotation.RestMethod#clientVersion} - The client
version range applied to a Java method.
</ul>
</li>
@@ -32172,7 +32156,7 @@
<h5 class='topic w800'>org.apache.juneau.rest</h5>
<ul class='spaced-list'>
- <li>{@link org.apache.juneau.rest.annotation.RestResource
@RestResource} annotation can now be applied to
+ <li><dc>@RestResource</dc> annotation can now be applied to
any class! You're no longer restricted to subclassing your
resources from {@link org.apache.juneau.rest.RestServlet}.
<br>This is a major enhancement in the API. Anything you could
do by subclassing from <c>RestServlet</c>
should have an equivalent for non-<c>RestServlet</c> classes.
@@ -32202,19 +32186,19 @@
<li><dc><jk>public</jk> init(RestConfig)</dc>
<li><dc><jk>public</jk> init(RestContext)</dc>
</ul>
- <li>New annotations added to {@link
org.apache.juneau.rest.annotation.RestResource @RestResource} to allow
non-<c>RestServlet</c>
+ <li>New annotations added to <dc>@RestResource</dc> to allow
non-<c>RestServlet</c>
resources to do the same as subclassing directly from
<c>RestServlet</c>:
<ul>
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#resourceResolver()
resourceResolver()}
+ <li><dc>RestResource.resourceResolver()</dc>
- Specify a {@link
org.apache.juneau.rest.RestResourceResolver} class for resolving child
resources.
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#callHandler() callHandler()}
+ <li><dc>RestResource.callHandler()</dc>
- Specify a {@link
org.apache.juneau.rest.RestCallHandler} class for handling the lifecycle of a
REST call.
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#infoProvider() infoProvider()}
+ <li><dc>RestResource.infoProvider()</dc>
- Specify a {@link
org.apache.juneau.rest.RestInfoProvider} class for customizing
title/description/Swagger information on a REST resource.
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#logger() logger()}
+ <li><dc>RestResource.logger()</dc>
- Specify a {@link
org.apache.juneau.rest.RestLogger} class for handling logging.
</ul>
- <li>New annotations added to {@link
org.apache.juneau.rest.annotation.RestResource @RestResource} and {@link
org.apache.juneau.rest.annotation.RestMethod @RestMethod}
+ <li>New annotations added to <dc>@RestResource</dc> and {@link
org.apache.juneau.rest.annotation.RestMethod @RestMethod}
to simplify defining page title, text, and links on HTML views:
<ul>
<li><dc>@RestResource(pageTitle)</dc>
@@ -32479,11 +32463,11 @@
<ul>
<li>{@link
org.apache.juneau.serializer.SerializerListener}
<li>{@link
org.apache.juneau.serializer.SerializerBuilder#listener(Class)}
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#serializerListener()
@RestResource(serializerListener)}
+ <li><dc>@RestResource(serializerListener)</dc>
<li><dc>RestConfig.serializerListener(Class)</dc>
<li>{@link org.apache.juneau.parser.ParserListener}
<li>{@link
org.apache.juneau.parser.ParserBuilder#listener(Class)}
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#parserListener()
@RestResource(parserListener)}
+ <li><dc> @RestResource(parserListener)</dc>
<li><dc>RestConfig.parserListener(Class)</dc>
<li><dc>RestClientBuilder.listeners(Class,Class)</dc>
</ul>juneau-examples-core.import1.pngjuneau-examples-core.import1.png
@@ -32636,7 +32620,7 @@
)
</p>
<li>
- A new annotation {@link
org.apache.juneau.rest.annotation.RestResource#paramResolvers()
@RestResource(paramResolvers)}
+ A new annotation <dc>@RestResource(paramResolvers)</dc>}
that allows you to define your own custom Java method parameter
resolvers.
<li>
Fixed bug where Writer returned by {@link
org.apache.juneau.rest.RestResponse#getWriter()} was not being flushed
automatically
@@ -32657,13 +32641,13 @@
<li><dc>@FormData(def)</dc> - Default form data
parameter value.
</ul>
<li>
- New attributes on {@link
org.apache.juneau.rest.annotation.RestResource @RestResource}:
+ New attributes on <dc>@RestResource</dc>:
<ul>
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#serializerListener()
serializerListener()}
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#parserListener()
parserListener()}
+ <li><dc>serializerListener()</dc>
+ <li><dc>parserListener()</dc>
<li><dc>widgets()</dc>
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#swagger() swagger()}
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#htmldoc() htmldoc()}
+ <li><dc>swagger()</dc>
+ <li><dc>htmldoc()</dc>
</ul>
<li>
New attributes on {@link
org.apache.juneau.rest.annotation.RestMethod @RestMethod}:
@@ -32880,7 +32864,7 @@
</li>
<li>
Declaration of widgets moved to {@link
org.apache.juneau.rest.annotation.HtmlDoc#widgets() @HtmlDoc(widgets)}
- instead of separately on <ja>@RestResource</ja>
and <ja>@RestMethod</ja> annotations.
+ instead of separately on <dc>@RestResource</dc>
and <ja>@RestMethod</ja> annotations.
<li>
{@link
org.apache.juneau.rest.widget.Widget#getName()} now defaults to the simple
class name.
<br>So now you can just refer to the class
name: <js>"$W{ContentTypeMenuItem}"</js>.
@@ -32928,13 +32912,13 @@
<li>
Annotations added:
<ul>
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#siteName()
@RestResource(siteName)}
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#flags() @RestResource(flags)}
+ <li><dc>@RestResource(siteName)</dc>
+ <li><dc>@RestResource(flags)</dc>
<li>{@link
org.apache.juneau.rest.annotation.RestMethod#flags() @RestMethod(flags)}
</ul>
</li>
<li>
- Eliminated the <c>@RestResource(stylesheet)</c> annotation.
+ Eliminated the <dc>@RestResource(stylesheet)</dc> annotation.
It's no longer needed now that you can easily specify styles
via <ja>@Htmldoc</ja>.
<li>
Eliminated the following annotations since they are now
redundant with {@link org.apache.juneau.rest.annotation.HtmlDoc#header()
@HtmlDoc(header)}:
@@ -33384,26 +33368,26 @@
{@link org.apache.juneau.rest.RestResourceResolver} instances
are now inherited from parent resources to child resources
unless explicitly overridden at the child level.
<br>It's also been changed to an interface.
- <li>New annotations on {@link
org.apache.juneau.rest.annotation.RestResource @RestResource}:
+ <li>New annotations on <dc>@RestResource</dc>:
<ul>
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#resourceResolver()
resourceResolver()}
+ <li><dc>resourceResolver()</dc>
<br>Allows you to specify a resource resolver
on the servlet context to make it easier to work with
dependency injection frameworks.
- <li><dc>RestResource.contextPath()</dc> -
+ <li><dc>contextPath()</dc> -
<br>Allows you to override the context path
value inherited from the servlet container.
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#allowHeaderParams()
allowHeaderParams()} -
+ <li><dc>allowHeaderParams()</dc> -
<br>Replaces the
<c>RestContext.REST_allowHeaderParams</c> setting.
- <li><dc>RestResource.allowMethodParam()</dc> -
+ <li><dc>allowMethodParam()</dc> -
<br>Replaces the
<c>RestContext.REST_allowMethodParam</c> setting.
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#allowBodyParam()
allowBodyParam()} -
+ <li><dc>allowBodyParam()</dc> -
<br>Replaces the
<c>RestContext.REST_allowBodyParam</c> setting.
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#renderResponseStackTraces()
renderResponseStackTraces()} -
+ <li><dc>renderResponseStackTraces()</dc> -
<br>Replaces the <c>RestContext.REST_xxx</c>
setting.
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#useStackTraceHashes()
useStackTraceHashes()} -
+ <li><dc>useStackTraceHashes()</dc> -
<br>Replaces the
<c>RestContext.REST_useStackTraceHashes</c> setting.
- <li>{@link
org.apache.juneau.rest.annotation.RestResource#defaultCharset()
defaultCharset()} -
+ <li><dc>defaultCharset()</dc> -
<br>Replaces the
<c>RestContext.REST_defaultCharset</c> setting.
- <li><dc>RestResource.paramFormat()</dc> -
+ <li><dc>paramFormat()</dc> -
<br>Replaces the
<c>RestContext.REST_paramFormat</c> setting.
</ul>
<li>New annotations on {@link
org.apache.juneau.rest.annotation.RestMethod @RestMethod}:
@@ -33576,7 +33560,7 @@
<h5 class='topic w800'>juneau-rest-server</h5>
<ul class='spaced-list'>
<li>
- New {@link
org.apache.juneau.rest.annotation.RestResource#maxInput()
@RestResource(maxInput)} and
+ New <dc>@RestResource(maxInput)</dc> and
{@link org.apache.juneau.rest.annotation.RestMethod#maxInput()
@RestMethod(maxInput)} for alleviating
potential DoS attacks.
</ul>
@@ -33942,7 +33926,7 @@
<li>
Support for static files has been simplified and improved.
<ul>
- <li>Syntax on {@link
org.apache.juneau.rest.annotation.RestResource#staticFiles()
@RestResource(staticFiles)} has been simplified, and
+ <li>Syntax on <dc>@RestResource(staticFiles)</dc> has
been simplified, and
now allows you to specify response headers in
the strings.
<li>Response headers for static files can also be
configured through
{@link
org.apache.juneau.rest.RestContext#REST_staticFileResponseHeaders
REST_staticFileResponseHeaders}.
@@ -33956,7 +33940,7 @@
<br>You can now simply create a {@link
org.apache.juneau.rest.RestMatcher} that has a public constructor that
takes in the server and method arguments.
<li>
- <c>@RestResource.allowMethodParam</c> renamed to {@link
org.apache.juneau.rest.annotation.RestResource#allowedMethodParams}.
+ <dc>@RestResource.allowMethodParam</dc> renamed to
<dc>RestResource.allowedMethodParams</dc>.
<li>
<c>@RestMethod.serializersInherit</c> and
<c>@RestMethod.parsersInherit</c> replaced with
simplified <dc>@RestMethod(inherit)</dc>.
@@ -34006,9 +33990,9 @@
{@link
org.apache.juneau.rest.RestRequest#getClasspathReaderResource(String)
getClasspathReaderResource(String)}
</ul>
<li>
- Changes to {@link
org.apache.juneau.rest.annotation.RestResource @RestResource}:
+ Changes to <dc>@RestResource</dc>
<ul>
- <li>New {@link
org.apache.juneau.rest.annotation.RestResource#mimeTypes() mimeTypes()}
annotation.
+ <li>New <dc>mimeTypes()</dc> annotation.
</ul>
<li>
Changes to {@link org.apache.juneau.rest.annotation.RestMethod
@RestMethod}:
@@ -34157,7 +34141,7 @@
- Used for remote proxy interfaces served up
through
<dc>RemoteInterfaceServlet</dc> or REST
<js>"PROXY"</js> methods.
<br>Defaults to <js>"POST"</js> with method
signatures as paths.
- <li class='ja'>{@link
org.apache.juneau.rest.client.remote.RemoteResource}
+ <li class='ja'><dc>RemoteResource</dc>
- Used for 3rd-party REST interfaces.
<br>Defaults to <js>"GET"</js> with
standardized naming conventions for paths.
</ul>
@@ -34353,7 +34337,7 @@
<li>
Auto-generated {@doc juneau-rest-server.Swagger Swagger UI}.
<li>
- Simplified {@link
org.apache.juneau.rest.annotation.RestResource#swagger() @RestResource(swagger)}
+ Simplified <dc>@RestResource(swagger)</dc>
and {@link
org.apache.juneau.rest.annotation.RestMethod#swagger() @RestMethod(swagger)}
annotations.
<li>
Fixed bug in <c>UriResolver</c> when request path info had
special characters.
@@ -34508,10 +34492,10 @@
</ul>
<br>These can be used in the following locations:
<ul class='doctree'>
- <li class='ja'>{@link
org.apache.juneau.rest.annotation.RestResource#serializers()}
- <li class='ja'>{@link
org.apache.juneau.rest.annotation.RestResource#parsers()}
- <li class='ja'>{@link
org.apache.juneau.rest.annotation.RestResource#beanFilters()}
- <li class='ja'>{@link
org.apache.juneau.rest.annotation.RestResource#pojoSwaps()}
+ <li class='ja'><dc>RestResource.serializers()</dc>
+ <li class='ja'><dc>RestResource.parsers()</dc>
+ <li class='ja'><dc>RestResource.beanFilters()</dc>
+ <li class='ja'><dc>RestResource.pojoSwaps()</dc>
<li class='ja'>{@link
org.apache.juneau.rest.annotation.RestMethod#serializers()}
<li class='ja'>{@link
org.apache.juneau.rest.annotation.RestMethod#parsers()}
<li class='ja'>{@link
org.apache.juneau.rest.annotation.RestMethod#beanFilters()}
@@ -34570,10 +34554,10 @@
<li>
New convenience annotations for specifying default
<c>Accept</c> and <c>Content-Type</c> headers:
<ul class='doctree'>
- <li class='jc'>{@link
org.apache.juneau.rest.annotation.RestResource}
+ <li class='jc'><dc>RestResource</dc>
<ul>
- <li class='jf'>{@link
org.apache.juneau.rest.annotation.RestResource#defaultAccept defaultAccept}
- <li class='jf'>{@link
org.apache.juneau.rest.annotation.RestResource#defaultContentType
defaultContentType}
+ <li class='jf'><dc>defaultAccept</dc>
+ <li class='jf'><dc>defaultContentType</dc>
</ul>
<li class='jc'>{@link
org.apache.juneau.rest.annotation.RestMethod}
<ul>
@@ -34871,7 +34855,7 @@
<li class='jm'>{@link
org.apache.juneau.rest.RestServlet#getPath() getPath()}
</ul>
<li>
- The registered resource resolver is now used to instantiate
objects of classes defined via <ja>@RestResource</ja>.
+ The registered resource resolver is now used to instantiate
objects of classes defined via <dc>@RestResource</dc>.
<br>This allows for any of those instance to be injectable
beans.
</ul>
@@ -34939,7 +34923,7 @@
<li>
<a
href='#juneau-rest-server.Instantiation.BasicRest'>BasicRest</a>, <a
href='#juneau-rest-server.Instantiation.BasicRestGroup'>BasicRestGroup</a>
classes
<li>
- <a
href='#juneau-rest-server.RestResource.RestResourcePath'>Path variables on
resource paths</a>
+ <a href='#juneau-rest-server.Rest.RestPath'>Path variables on
resource paths</a>
<li>
<a
href='#juneau-rest-server.RestMethod.RequestAttributes'>Request Attributes
API</a>
<li>
@@ -35144,7 +35128,7 @@
</ul>
<li class='ja'>{@link
org.apache.juneau.rest.annotation.Attr}
<li class='ja'>{@link
org.apache.juneau.rest.annotation.RestMethod#attrs()}
- <li class='ja'>{@link
org.apache.juneau.rest.annotation.RestResource#attrs()}
+ <li class='ja'><dc>RestResource.attrs()</dc>
</ul>
<br>This deprecates the following APIs:
<ul class='javatree'>
@@ -35171,10 +35155,10 @@
<li>
New annotations for simplified role-based guards on classes and
methods:
<ul class='javatree'>
- <li class='ja'>{@link
org.apache.juneau.rest.annotation.RestResource}
+ <li class='ja'><dc>RestResource</dc>
<ul>
- <li class='jm'>{@link
org.apache.juneau.rest.annotation.RestResource#roleGuard roleGuard()}
- <li class='jm'>{@link
org.apache.juneau.rest.annotation.RestResource#rolesDeclared rolesDeclared()}
+ <li class='jm'><dc>roleGuard()</dc>
+ <li class='jm'><dc>rolesDeclared()</dc>
</ul>
<li class='ja'>{@link
org.apache.juneau.rest.annotation.RestMethod}
<ul>
@@ -35185,15 +35169,15 @@
<li>
New annotations for fine-tuned handling of
http-methods/http-headers as query parameters and others:
<ul class='javatree'>
- <li class='ja'>{@link
org.apache.juneau.rest.annotation.RestResource}
+ <li class='ja'><dc>RestResource</dc>
<ul>
- <li class='jm'>{@link
org.apache.juneau.rest.annotation.RestResource#allowedHeaderParams()
allowedHeaderParams()}
- <li class='jm'>{@link
org.apache.juneau.rest.annotation.RestResource#allowedMethodHeaders()
allowedMethodHeaders()}
- <li class='jm'>{@link
org.apache.juneau.rest.annotation.RestResource#allowedMethodParams()
allowedMethodParams()}
+ <li class='jm'><dc>allowedHeaderParams()</dc>
+ <li class='jm'><dc>allowedMethodHeaders()}</dc>
+ <li class='jm'><dc>allowedMethodParams()</dc>
</ul>
</ul>
<li>
- The {@link
org.apache.juneau.rest.annotation.RestResource#path() @RestResource(path)}
annotation can now use variables:
+ The <dc>@RestResource(path)</dc> annotation can now use
variables:
<p class='bcode'>
<ja>@RestResource</ja>(
path=<js>"/myResource/{foo}/{bar}"</js>
@@ -35335,13 +35319,13 @@
</ul>
</ul>
<li>
- The <c>@RestResource(staticFiles)</c> annotation now supports
absolute path locations and multiple mappings:
+ The <dc>@RestResource(staticFiles)</dc> 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
+ Fixed a bug in <dc>@RestResource(staticFiles)</dc> where the
order of lookup between parent and child resources
was wrong.
</ul>
@@ -35368,7 +35352,7 @@
<h3 class='topic' onclick='toggle(this)'><a href='#8.1.2' id='8.1.2'>8.1.2
(TBD)</a></h3>
<div class='topic'><!-- START: 8.1.2 -->
<p>
- Juneau 8.1.2 is a minor release with mostly bug fixes. Improvements
around specifying bean properties have also been made.
+ Juneau 8.1.2 is a moderate release.
</p>
<h5 class='topic w800'>juneau-marshall</h5>
@@ -35394,9 +35378,11 @@
<li>
{@link org.apache.juneau.marshall.CharMarshall} and {@link
org.apache.juneau.marshall.StreamMarshall} now have public constructors.
<li>
- {@link org.apache.juneau.annotation.Beanp @Beanp} replaces
{@link org.apache.juneau.annotation.BeanProperty @BeanProperty} with shorter
syntax.
+ {@link org.apache.juneau.annotation.Beanp @Beanp} replaces
{@link org.apache.juneau.annotation.BeanProperty @BeanProperty}.
<li>
- {@link org.apache.juneau.annotation.Beanc @Beanc} replaces
{@link org.apache.juneau.annotation.BeanConstructor @BeanConstructor} with
shorter syntax.
+ {@link org.apache.juneau.annotation.Beanc @Beanc} replaces
{@link org.apache.juneau.annotation.BeanConstructor @BeanConstructor}.
+ <li>
+ {@link org.apache.juneau.http.remote.Remote @Remote} replaces
{@link org.apache.juneau.http.remote.RemoteResource @RemoteResource}.
<li>
Shortened names for {@link
org.apache.juneau.annotation.Bean#dictionary @Bean(dictionary)} and {@link
org.apache.juneau.BeanContextBuilder#dictionary(Class...)}.
</ul>
@@ -35404,6 +35390,8 @@
<h5 class='topic w800'>juneau-rest-server</h5>
<ul class='spaced-list'>
<li>
+ {@link org.apache.juneau.rest.annotation.Rest @Rest} replaces
{@link org.apache.juneau.rest.annotation.RestResource @RestResource} with
shorter syntax.
+ <li>
New method {@link
org.apache.juneau.rest.RestResponse#setHeaderSafe(String,String)} to strip
invalid characters from header values.
<li>
Fixed issues related to invalid characters being set on HTTP
header values.
diff --git a/juneau-doc/src/main/javadoc/resources/docs.txt
b/juneau-doc/src/main/javadoc/resources/docs.txt
index c95bbc3..73c2fce 100644
--- a/juneau-doc/src/main/javadoc/resources/docs.txt
+++ b/juneau-doc/src/main/javadoc/resources/docs.txt
@@ -179,9 +179,9 @@ juneau-marshall.SimpleVariableLanguage.VarResolvers =
#juneau-marshall.SimpleVar
juneau-marshall.Transforms = #juneau-marshall.Transforms, Overview >
juneau-marshall > Transforms
juneau-marshall.Transforms.AutoPojoSwaps =
#juneau-marshall.Transforms.AutoPojoSwaps, Overview > juneau-marshall >
Transforms > Auto-detected POJO swaps
juneau-marshall.Transforms.BeanAnnotation =
#juneau-marshall.Transforms.BeanAnnotation, Overview > juneau-marshall >
Transforms > @Bean Annotation
-juneau-marshall.Transforms.BeanConstructorAnnotation =
#juneau-marshall.Transforms.BeanConstructorAnnotation, Overview >
juneau-marshall > Transforms > @BeancAnnotation
juneau-marshall.Transforms.BeanFilters =
#juneau-marshall.Transforms.BeanFilters, Overview > juneau-marshall >
Transforms > BeanFilter Class
juneau-marshall.Transforms.BeanIgnoreAnnotation =
#juneau-marshall.Transforms.BeanIgnoreAnnotation, Overview > juneau-marshall >
Transforms > @BeanIgnore Annotation
+juneau-marshall.Transforms.BeancAnnotation =
#juneau-marshall.Transforms.BeancAnnotation, Overview > juneau-marshall >
Transforms > @BeancAnnotation
juneau-marshall.Transforms.BeanpAnnotation =
#juneau-marshall.Transforms.BeanpAnnotation, Overview > juneau-marshall >
Transforms > @Beanp Annotation
juneau-marshall.Transforms.BypassSerialization =
#juneau-marshall.Transforms.BypassSerialization, Overview > juneau-marshall >
Transforms > Bypass Serialization using Readers and InputStreams
juneau-marshall.Transforms.DefaultPojoSwaps =
#juneau-marshall.Transforms.DefaultPojoSwaps, Overview > juneau-marshall >
Transforms > Default PojoSwaps
@@ -254,13 +254,13 @@ juneau-rest-client.RestProxies.FormData =
#juneau-rest-client.RestProxies.FormDa
juneau-rest-client.RestProxies.Header =
#juneau-rest-client.RestProxies.Header, Overview > juneau-rest-client > REST
Proxies > @Header
juneau-rest-client.RestProxies.Path = #juneau-rest-client.RestProxies.Path,
Overview > juneau-rest-client > REST Proxies > @Path
juneau-rest-client.RestProxies.Query = #juneau-rest-client.RestProxies.Query,
Overview > juneau-rest-client > REST Proxies > @Query
+juneau-rest-client.RestProxies.Remote =
#juneau-rest-client.RestProxies.Remote, Overview > juneau-rest-client > REST
Proxies > @Remote
juneau-rest-client.RestProxies.RemoteMethod =
#juneau-rest-client.RestProxies.RemoteMethod, Overview > juneau-rest-client >
REST Proxies > @RemoteMethod
-juneau-rest-client.RestProxies.RemoteResource =
#juneau-rest-client.RestProxies.RemoteResource, Overview > juneau-rest-client >
REST Proxies > @RemoteResource
juneau-rest-client.RestProxies.Request =
#juneau-rest-client.RestProxies.Request, Overview > juneau-rest-client > REST
Proxies > @Request
juneau-rest-client.RestProxies.Response =
#juneau-rest-client.RestProxies.Response, Overview > juneau-rest-client > REST
Proxies > @Response
juneau-rest-client.SSL = #juneau-rest-client.SSL, Overview >
juneau-rest-client > SSL Support
juneau-rest-mock = #juneau-rest-mock, Overview > juneau-rest-mock
-juneau-rest-mock.MockRemoteResource = #juneau-rest-mock.MockRemoteResource,
Overview > juneau-rest-mock > MockRemoteResource
+juneau-rest-mock.MockRemote = #juneau-rest-mock.MockRemote, Overview >
juneau-rest-mock > MockRemote
juneau-rest-mock.MockRest = #juneau-rest-mock.MockRest, Overview >
juneau-rest-mock > MockRest
juneau-rest-server = #juneau-rest-server, Overview > juneau-rest-server
juneau-rest-server-jaxrs = #juneau-rest-server-jaxrs, Overview >
juneau-rest-server-jaxrs
@@ -319,6 +319,9 @@ juneau-rest-server.OpenApiSchemaPartSerializing =
#juneau-rest-server.OpenApiSch
juneau-rest-server.OtherNotes = #juneau-rest-server.OtherNotes, Overview >
juneau-rest-server > Other Notes
juneau-rest-server.OverloadingHttpMethods =
#juneau-rest-server.OverloadingHttpMethods, Overview > juneau-rest-server >
Overloading HTTP Methods
juneau-rest-server.Parsers = #juneau-rest-server.Parsers, Overview >
juneau-rest-server > Parsers
+juneau-rest-server.Rest = #juneau-rest-server.Rest, Overview >
juneau-rest-server > @Rest
+juneau-rest-server.Rest.AnnotationInheritance =
#juneau-rest-server.Rest.AnnotationInheritance, Overview > juneau-rest-server >
@Rest > Annotation Inheritance
+juneau-rest-server.Rest.RestPath = #juneau-rest-server.Rest.RestPath, Overview
> juneau-rest-server > @Rest > @Rest(path)
juneau-rest-server.RestContext = #juneau-rest-server.RestContext, Overview >
juneau-rest-server > RestContext
juneau-rest-server.RestInfoProvider = #juneau-rest-server.RestInfoProvider,
Overview > juneau-rest-server > RestInfoProvider
juneau-rest-server.RestInfoProvider.BasicRestInfoProvider =
#juneau-rest-server.RestInfoProvider.BasicRestInfoProvider, Overview >
juneau-rest-server > RestInfoProvider > BasicRestInfoProvider
@@ -340,9 +343,6 @@ juneau-rest-server.RestMethod.RestMethodPath =
#juneau-rest-server.RestMethod.Re
juneau-rest-server.RestMethod.RestRequest =
#juneau-rest-server.RestMethod.RestRequest, Overview > juneau-rest-server >
@RestMethod > RestRequest
juneau-rest-server.RestMethod.RestResponse =
#juneau-rest-server.RestMethod.RestResponse, Overview > juneau-rest-server >
@RestMethod > RestResponse
juneau-rest-server.RestMethod.StreamResource =
#juneau-rest-server.RestMethod.StreamResource, Overview > juneau-rest-server >
@RestMethod > StreamResource
-juneau-rest-server.RestResource = #juneau-rest-server.RestResource, Overview >
juneau-rest-server > @RestResource
-juneau-rest-server.RestResource.AnnotationInheritance =
#juneau-rest-server.RestResource.AnnotationInheritance, Overview >
juneau-rest-server > @RestResource > Annotation Inheritance
-juneau-rest-server.RestResource.RestResourcePath =
#juneau-rest-server.RestResource.RestResourcePath, Overview >
juneau-rest-server > @RestResource > @RestResource(path)
juneau-rest-server.RoleGuards = #juneau-rest-server.RoleGuards, Overview >
juneau-rest-server > Role guards
juneau-rest-server.Serializers = #juneau-rest-server.Serializers, Overview >
juneau-rest-server > Serializers
juneau-rest-server.StaticFiles = #juneau-rest-server.StaticFiles, Overview >
juneau-rest-server > Static files
diff --git a/juneau-doc/src/main/javadoc/resources/fragments/toc.html
b/juneau-doc/src/main/javadoc/resources/fragments/toc.html
index dd596ef..5c8d125 100644
--- a/juneau-doc/src/main/javadoc/resources/fragments/toc.html
+++ b/juneau-doc/src/main/javadoc/resources/fragments/toc.html
@@ -47,7 +47,7 @@
<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.BeanpAnnotation'>@Beanp
Annotation</a></p>
- <li><p class=''><a class='doclink'
href='{OVERVIEW_URL}#juneau-marshall.Transforms.BeanConstructorAnnotation'>@BeancAnnotation</a></p>
+ <li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#juneau-marshall.Transforms.BeancAnnotation'>@BeancAnnotation</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>
@@ -210,10 +210,10 @@
<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>
+ <li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#juneau-rest-server.Rest'>@Rest</a></p>
<ol>
- <li><p class=''><a class='doclink'
href='{OVERVIEW_URL}#juneau-rest-server.RestResource.AnnotationInheritance'>Annotation
Inheritance</a></p>
- <li><p class=''><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.Rest.AnnotationInheritance'>Annotation
Inheritance</a></p>
+ <li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#juneau-rest-server.Rest.RestPath'>@Rest(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>
@@ -319,7 +319,7 @@
<ol>
<li><p class=''><a class='doclink'
href='{OVERVIEW_URL}#juneau-rest-client.RestProxies'>REST Proxies</a></p>
<ol>
- <li><p class=''><a class='doclink'
href='{OVERVIEW_URL}#juneau-rest-client.RestProxies.RemoteResource'>@RemoteResource</a></p>
+ <li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#juneau-rest-client.RestProxies.Remote'>@Remote</a></p>
<li><p class=''><a class='doclink'
href='{OVERVIEW_URL}#juneau-rest-client.RestProxies.RemoteMethod'>@RemoteMethod</a></p>
<li><p class=''><a class='doclink'
href='{OVERVIEW_URL}#juneau-rest-client.RestProxies.Body'>@Body</a></p>
<li><p class=''><a class='doclink'
href='{OVERVIEW_URL}#juneau-rest-client.RestProxies.FormData'>@FormData</a></p>
@@ -347,7 +347,7 @@
<li><p class='toc2'><a class='doclink'
href='{OVERVIEW_URL}#juneau-rest-mock'>juneau-rest-mock</a></p>
<ol>
<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>
+ <li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#juneau-rest-mock.MockRemote'>MockRemote</a></p>
</ol>
<li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-core'>juneau-microservice-core</a></p>
<ol>
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 999811b..072505b 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
@@ -38,7 +38,7 @@ import org.apache.juneau.utils.*;
* a REST resource.
*
* <ul class='seealso'>
- * <li class='link'>{@doc juneau-rest-server.RestResource}
+ * <li class='link'>{@doc juneau-rest-server.Rest}
* </ul>
*
* @deprecated Use {@link Rest}