Repository: incubator-juneau-website Updated Branches: refs/heads/asf-site afe199a90 -> abde93787
Add HttpMethodName statics class. 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/abde9378 Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/tree/abde9378 Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/diff/abde9378 Branch: refs/heads/asf-site Commit: abde93787f1579727283a26f2057a422fb004046 Parents: afe199a Author: JamesBognar <[email protected]> Authored: Mon Oct 2 18:34:54 2017 -0400 Committer: JamesBognar <[email protected]> Committed: Mon Oct 2 18:34:54 2017 -0400 ---------------------------------------------------------------------- content/about.html | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/abde9378/content/about.html ---------------------------------------------------------------------- diff --git a/content/about.html b/content/about.html index 0058f96..c6bb23c 100644 --- a/content/about.html +++ b/content/about.html @@ -1198,31 +1198,31 @@ ) <jk>public class</jk> SystemPropertiesResource <jk>extends</jk> RestServletDefault { - <ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/"</js>) + <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/"</js>) <jk>public</jk> Map getSystemProperties(<ja>@Query</ja>(<js>"sort"</js>) <jk>boolean</jk> sort) <jk>throws</jk> Throwable { <jk>if</jk> (sort) <jk>return new</jk> TreeMap(System.<jsm>getProperties</jsm>()); <jk>return</jk> System.<jsm>getProperties</jsm>(); } - <ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/{propertyName}"</js>) + <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/{propertyName}"</js>) <jk>public</jk> String getSystemProperty(<ja>@Path</ja> String propertyName) <jk>throws</jk> Throwable { <jk>return</jk> System.<jsm>getProperty</jsm>(propertyName); } - <ja>@RestMethod</ja>(name=<js>"PUT"</js>, path=<js>"/{propertyName}"</js>, guards=AdminGuard.<jk>class</jk>) + <ja>@RestMethod</ja>(name=<jsf>PUT</jsf>, path=<js>"/{propertyName}"</js>, guards=AdminGuard.<jk>class</jk>) <jk>public</jk> String setSystemProperty(<ja>@Path</ja> String propertyName, <ja>@Body</ja> String value) { System.<jsm>setProperty</jsm>(propertyName, value); <jk>return</jk> <js>"OK"</js>; } - <ja>@RestMethod</ja>(name=<js>"POST"</js>, path=<js>"/"</js>, guards=AdminGuard.<jk>class</jk>) + <ja>@RestMethod</ja>(name=<jsf>POST</jsf>, path=<js>"/"</js>, guards=AdminGuard.<jk>class</jk>) <jk>public</jk> String setSystemProperties(<ja>@Body</ja> java.util.Properties newProperties) { System.<jsm>setProperties</jsm>(newProperties); <jk>return</jk> <js>"OK"</js>; } - <ja>@RestMethod</ja>(name=<js>"DELETE"</js>, path=<js>"/{propertyName}"</js>, guards=AdminGuard.<jk>class</jk>) + <ja>@RestMethod</ja>(name=<jsf>DELETE</jsf>, path=<js>"/{propertyName}"</js>, guards=AdminGuard.<jk>class</jk>) <jk>public</jk> String deleteSystemProperty(<ja>@Path</ja> String propertyName) { System.<jsm>clearProperty</jsm>(propertyName); <jk>return</jk> <js>"OK"</js>; @@ -1295,7 +1295,7 @@ <jk>public class</jk> SystemPropertiesResource <jk>extends</jk> RestServlet { <ja>@RestMethod</ja>( - name=<js>"GET"</js>, path=<js>"/"</js>, + name=<jsf>GET</jsf>, path=<js>"/"</js>, summary=<js>"Show all system properties"</js>, description=<js>"Returns all system properties defined in the JVM."</js>, @@ -1332,13 +1332,13 @@ <jk>import static</jk> org.apache.juneau.dto.html5.HtmlBuilder.*; <ja>@RestMethod</ja>( - name=<js>"GET"</js>, path=<js>"/formPage"</js>, + name=<jsf>GET</jsf>, path=<js>"/formPage"</js>, summary=<js>"Form entry page"</js>, description=<js>"A form post page for setting a single system property value."</js>, guards=AdminGuard.<jk>class</jk> ) <jk>public</jk> Form getFormPage() { - <jk>return</jk> <jsm>form</jsm>().method(<js>"POST"</js>).action(<js>"formPagePost"</js>).children( + <jk>return</jk> <jsm>form</jsm>().method(<jsf>POST</jsf>).action(<js>"formPagePost"</js>).children( <jsm>table</jsm>( <jsm>tr</jsm>( <jsm>th</jsm>(<js>"Set system property"</js>).colspan(2) @@ -1355,7 +1355,7 @@ } <ja>@RestMethod</ja>( - name=<js>"POST"</js>, path=<js>"/formPagePost"</js>, + name=<jsf>POST</jsf>, path=<js>"/formPagePost"</js>, description=<js>"Accepts a simple form post of a system property name/value pair."</js>, guards=AdminGuard.<jk>class</jk> ) @@ -1401,7 +1401,7 @@ This approach uses annotated parameters for retrieving input from the request. </p> <p class='bcode'> - <ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/example1/{p1}/{p2}/{p3}/*"</js>) + <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/example1/{p1}/{p2}/{p3}/*"</js>) <jk>public</jk> String example1( <ja>@Method</ja> String method, <jc>// HTTP method.</jc> <ja>@Path</ja> String p1, <jc>// Path variables.</jc> @@ -1429,7 +1429,7 @@ This approach uses low-level request/response objects to perform the same as above. </p> <p class='bcode'> - <ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/example2/{p1}/{p2}/{p3}/*"</js>) + <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/example2/{p1}/{p2}/{p3}/*"</js>) <jk>public</jk> String example2( RestRequest req, <jc>// A direct subclass of HttpServletRequest.</jc> RestResponse res <jc>// A direct subclass of HttpServletResponse.</jc> @@ -1471,7 +1471,7 @@ This approach is sort of the middle ground where you get access functional area APIs. </p> <p class='bcode'> - <ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/example3/{p1}/{p2}/{p3}/*"</js>) + <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/example3/{p1}/{p2}/{p3}/*"</js>) <jk>public</jk> String example3( HttpMethod method, <jc>// HTTP method.</jc> RequestPathMatch path, <jc>// Path variables.</jc> @@ -1574,7 +1574,7 @@ serializing a Swagger bean which is constructed in the RestRequest object: </p> <p class='bcode'> - <ja>@RestMethod</ja>(name=<js>"OPTIONS"</js>, path=<js>"/*"</js>) + <ja>@RestMethod</ja>(name=<jsf>OPTIONS</jsf>, path=<js>"/*"</js>) <jk>public</jk> Swagger getOptions(RestRequest req) { <jk>return</jk> req.getSwagger(); } @@ -1716,7 +1716,7 @@ </p> <p class='bcode'> <ja>@RestMethod</ja>( - name=<js>"GET"</js>, + name=<jsf>GET</jsf>, path=<js>"/"</js>, summary=<js>"The complete list of pets in the store"</js>, @@ -1955,7 +1955,7 @@ </p> <ol> <li>Extending from <code>RemoteableServlet</code>. - <li>Using a <code><ja>@RestMethod</ja>(name=<js>"PROXY"</js>)</code> annotation on a Java method. + <li>Using a <code><ja>@RestMethod</ja>(name=<jsf>PROXY</jsf>)</code> annotation on a Java method. </ol> <p> The <code>RemoteableServlet</code> class is a simple specialized servlet with an abstract <code>getServiceMap()</code> @@ -1984,12 +1984,12 @@ } </p> <p> - The <code><ja>@RestMethod</ja>(name=<js>"PROXY"</js>)</code> approach is easier if you only have a single interface you want to expose. + The <code><ja>@RestMethod</ja>(name=<jsf>PROXY</jsf>)</code> approach is easier if you only have a single interface you want to expose. You simply define a Java method whose return type is an interface, and return the implementation of that interface: </p> <p class='bcode'> <jc>// Our exposed proxy object.</jc> - <ja>@RestMethod</ja>(name=<js>"PROXY"</js>, path=<js>"/addressbookproxy/*"</js>) + <ja>@RestMethod</ja>(name=<jsf>PROXY</jsf>, path=<js>"/addressbookproxy/*"</js>) <jk>public</jk> IAddressBook getProxy() { <jk>return</jk> addressBook; } @@ -2027,7 +2027,7 @@ <ja>@Remoteable</ja> <jk>public interface</jk> MyProxyInterface { - <ja>@RemoteMethod</ja>(httpMethod=<js>"POST"</js>, path=<js>"/method"</js>) + <ja>@RemoteMethod</ja>(httpMethod=<jsf>POST</jsf>, path=<js>"/method"</js>) String doSomething(<ja>@Header</ja>(<js>"E-Tag"</js>) UUID etag, <ja>@Query</ja>(<js>"debug"</js>) <jk>boolean</jk> debug, <ja>@Body</ja> MyPojo pojo); }
