You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2017/03/17 13:57:11 UTC
incubator-juneau-website git commit: Add info on child resources.
Repository: incubator-juneau-website
Updated Branches:
refs/heads/asf-site 4752869d5 -> 05c3ae114
Add info on child resources.
Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/commit/05c3ae11
Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/tree/05c3ae11
Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/diff/05c3ae11
Branch: refs/heads/asf-site
Commit: 05c3ae1142792750b054d181dba1e4b34fe17569
Parents: 4752869
Author: JamesBognar <ja...@apache.org>
Authored: Fri Mar 17 09:57:08 2017 -0400
Committer: JamesBognar <ja...@apache.org>
Committed: Fri Mar 17 09:57:08 2017 -0400
----------------------------------------------------------------------
content/about.html | 34 ++++++++++++++++++++++++++
content/images/Samples_RootResources.png | Bin 0 -> 62372 bytes
2 files changed, 34 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/05c3ae11/content/about.html
----------------------------------------------------------------------
diff --git a/content/about.html b/content/about.html
index c344e7e..8cdb32d 100644
--- a/content/about.html
+++ b/content/about.html
@@ -549,6 +549,40 @@
}
</p>
<p>
+ Navigatable hierarchies of REST resources are easy to set up either programmatically or through annotations:
+ </p>
+ <p class='bcode'>
+ <ja>@RestResource</ja>(
+ path=<js>"/"</js>,
+ children={
+ HelloWorldResource.<jk>class</jk>,
+ SystemPropertiesResource.<jk>classv,
+ MethodExampleResource.<jk>class</jk>,
+ RequestEchoResource.<jk>class</jk>,
+ TempDirResource.<jk>class</jk>,
+ AddressBookResource.<jk>class</jk>,
+ SampleRemoteableServlet.<jk>class</jk>,
+ PhotosResource.<jk>class</jk>,
+ AtomFeedResource.<jk>class</jk>,
+ JsonSchemaResource.<jk>class</jk>,
+ SqlQueryResource.<jk>class</jk>,
+ TumblrParserResource.<jk>class</jk>,
+ CodeFormatterResource.<jk>class</jk>,
+ UrlEncodedFormResource.<jk>class</jk>,
+ ConfigResource.<jk>class</jk>,
+ LogsResource.<jk>class</jk>,
+ DockerRegistryResource.<jk>class</jk>,
+ ShutdownResource.<jk>class</jk>
+ }
+ )
+ <jk>public class</jk> RootResources <jk>extends</jk> RestServletGroupDefault { <jc>/* No code needed! */</jc> }
+ </p>
+ <p>
+ The above resource when rendered in HTML shows how easy it is to discover and navigate to child resources using a browser:
+ </p>
+ <img class='bordered' src='images/Samples_RootResources.png'>
+ <p>
+ Resources can be nested arbitrarily deep.
The <ja>@RestResource</ja> and <ja>@RestMethod</ja> annotations can be applied to any classes, not just
servlets. The only requirement is that the top-level resource be a subclass of <code>RestServlet</code> as a hook into
the servlet container.
http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/05c3ae11/content/images/Samples_RootResources.png
----------------------------------------------------------------------
diff --git a/content/images/Samples_RootResources.png b/content/images/Samples_RootResources.png
new file mode 100644
index 0000000..62408e2
Binary files /dev/null and b/content/images/Samples_RootResources.png differ