Rename juneau-samples to juneau-examples-rest. Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-juneau/commit/e3d95284 Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau/tree/e3d95284 Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau/diff/e3d95284
Branch: refs/heads/master Commit: e3d952842730eeabf2b05d053805961f47f7fc6e Parents: e4dfdf8 Author: JamesBognar <[email protected]> Authored: Sun Jan 22 09:47:43 2017 -0500 Committer: JamesBognar <[email protected]> Committed: Sun Jan 22 09:47:43 2017 -0500 ---------------------------------------------------------------------- .../juneau/jena/annotation/RdfSchema.java | 4 +- .../java/org/apache/juneau/jena/package.html | 48 +- .../main/java/org/apache/juneau/ObjectMap.java | 80 +- .../java/org/apache/juneau/ini/package.html | 4 +- .../java/org/apache/juneau/json/package.html | 44 +- .../java/org/apache/juneau/svl/package.html | 10 +- .../org/apache/juneau/transform/package.html | 8 +- .../org/apache/juneau/urlencoding/package.html | 44 +- .../apache/juneau/xml/annotation/XmlSchema.java | 4 +- .../java/org/apache/juneau/xml/package.html | 72 +- juneau-core/src/main/javadoc/overview.html | 904 +++++++++---------- juneau-distrib/pom.xml | 2 +- juneau-examples-rest/.gitignore | 6 + juneau-examples-rest/.project | 33 + juneau-examples-rest/examples.cfg | 145 +++ juneau-examples-rest/pom.xml | 152 ++++ .../juneau/examples/addressbook/Address.java | 54 ++ .../examples/addressbook/AddressBook.java | 102 +++ .../examples/addressbook/CreateAddress.java | 43 + .../examples/addressbook/CreatePerson.java | 45 + .../examples/addressbook/IAddressBook.java | 45 + .../juneau/examples/addressbook/Person.java | 73 ++ .../examples/addressbook/package-info.java | 35 + .../juneau/examples/addressbook/package.html | 42 + .../apache/juneau/examples/rest/AdminGuard.java | 26 + .../juneau/examples/rest/AtomFeedResource.java | 103 +++ .../examples/rest/CodeFormatterResource.java | 50 + .../apache/juneau/examples/rest/Constants.java | 28 + .../juneau/examples/rest/DirectoryResource.java | 234 +++++ .../examples/rest/DockerRegistryResource.java | 88 ++ .../examples/rest/HelloWorldResource.java | 38 + .../examples/rest/JsonSchemaResource.java | 74 ++ .../examples/rest/MethodExampleResource.java | 91 ++ .../juneau/examples/rest/PhotosResource.java | 142 +++ .../examples/rest/RequestEchoResource.java | 60 ++ .../juneau/examples/rest/RootResources.java | 55 ++ .../examples/rest/SampleRemoteableServlet.java | 55 ++ .../juneau/examples/rest/SourceResource.java | 112 +++ .../juneau/examples/rest/SqlQueryResource.java | 128 +++ .../examples/rest/SystemPropertiesResource.java | 153 ++++ .../juneau/examples/rest/TempDirResource.java | 77 ++ .../examples/rest/TumblrParserResource.java | 87 ++ .../examples/rest/UrlEncodedFormResource.java | 53 ++ .../rest/addressbook/AddressBookResource.java | 320 +++++++ .../examples/rest/addressbook/ClientTest.java | 107 +++ .../src/main/resources/examples.cfg | 143 +++ .../examples/rest/CodeFormatterResource.html | 68 ++ .../juneau/examples/rest/SqlQueryResource.html | 66 ++ .../juneau/examples/rest/TempDirUploadPage.html | 34 + .../juneau/examples/rest/UrlEncodedForm.html | 62 ++ .../nls/AddressBookResource.properties | 89 ++ .../juneau/examples/rest/averycutecat.jpg | Bin 0 -> 318563 bytes .../examples/rest/htdocs/code-highlighting.css | 136 +++ .../rest/nls/AtomFeedResource.properties | 21 + .../rest/nls/CodeFormatterResource.properties | 18 + .../rest/nls/HelloWorldResource.properties | 19 + .../rest/nls/JsonSchemaResource.properties | 20 + .../rest/nls/MethodExampleResource.properties | 37 + .../examples/rest/nls/PhotosResource.properties | 24 + .../rest/nls/RequestEchoResource.properties | 19 + .../examples/rest/nls/RootResources.properties | 18 + .../rest/nls/SampleRemoteableServlet.properties | 17 + .../examples/rest/nls/SourceResource.properties | 19 + .../rest/nls/SqlQueryResource.properties | 19 + .../rest/nls/TempDirResource.properties | 18 + .../rest/nls/TumblrParserResource.properties | 19 + .../rest/nls/UrlEncodedFormResource.properties | 22 + .../examples/rest/AddressBookResourceTest.java | 231 +++++ .../rest/CT_AddressBookResource_test0.json | 26 + .../juneau/examples/rest/RootResourcesTest.java | 147 +++ .../SampleRemoteableServicesResourceTest.java | 69 ++ .../juneau/examples/rest/SamplesRestClient.java | 69 ++ .../rest/TestMultiPartFormPostsTest.java | 47 + .../apache/juneau/examples/rest/TestUtils.java | 360 ++++++++ .../apache/juneau/examples/rest/_TestSuite.java | 57 ++ juneau-examples-rest/war/web.xml | 47 + juneau-releng/launches/Package Juneau.launch | 2 +- .../org/apache/juneau/rest/client/package.html | 4 +- juneau-rest-test/pom.xml | 2 +- .../apache/juneau/rest/test/ParamsResource.java | 2 +- .../java/org/apache/juneau/rest/package.html | 4 +- .../apache/juneau/rest/remoteable/package.html | 8 +- juneau-samples/.gitignore | 6 - juneau-samples/.project | 33 - juneau-samples/pom.xml | 152 ---- juneau-samples/samples.cfg | 145 --- .../apache/juneau/rest/samples/AdminGuard.java | 26 - .../juneau/rest/samples/AtomFeedResource.java | 103 --- .../rest/samples/CodeFormatterResource.java | 50 - .../apache/juneau/rest/samples/Constants.java | 28 - .../juneau/rest/samples/DirectoryResource.java | 234 ----- .../rest/samples/DockerRegistryResource.java | 88 -- .../juneau/rest/samples/HelloWorldResource.java | 38 - .../juneau/rest/samples/JsonSchemaResource.java | 74 -- .../rest/samples/MethodExampleResource.java | 91 -- .../juneau/rest/samples/PhotosResource.java | 142 --- .../rest/samples/RequestEchoResource.java | 60 -- .../juneau/rest/samples/RootResources.java | 55 -- .../rest/samples/SampleRemoteableServlet.java | 55 -- .../juneau/rest/samples/SourceResource.java | 112 --- .../juneau/rest/samples/SqlQueryResource.java | 128 --- .../rest/samples/SystemPropertiesResource.java | 153 ---- .../juneau/rest/samples/TempDirResource.java | 77 -- .../rest/samples/TumblrParserResource.java | 87 -- .../rest/samples/UrlEncodedFormResource.java | 53 -- .../addressbook/AddressBookResource.java | 320 ------- .../rest/samples/addressbook/ClientTest.java | 107 --- .../juneau/samples/addressbook/Address.java | 54 -- .../juneau/samples/addressbook/AddressBook.java | 102 --- .../samples/addressbook/CreateAddress.java | 43 - .../samples/addressbook/CreatePerson.java | 45 - .../samples/addressbook/IAddressBook.java | 45 - .../juneau/samples/addressbook/Person.java | 73 -- .../samples/addressbook/package-info.java | 35 - .../juneau/samples/addressbook/package.html | 42 - .../rest/samples/CodeFormatterResource.html | 68 -- .../juneau/rest/samples/SqlQueryResource.html | 66 -- .../juneau/rest/samples/TempDirUploadPage.html | 34 - .../juneau/rest/samples/UrlEncodedForm.html | 62 -- .../nls/AddressBookResource.properties | 89 -- .../apache/juneau/rest/samples/averycutecat.jpg | Bin 318563 -> 0 bytes .../rest/samples/htdocs/code-highlighting.css | 136 --- .../samples/nls/AtomFeedResource.properties | 21 - .../nls/CodeFormatterResource.properties | 18 - .../samples/nls/HelloWorldResource.properties | 19 - .../samples/nls/JsonSchemaResource.properties | 20 - .../nls/MethodExampleResource.properties | 37 - .../rest/samples/nls/PhotosResource.properties | 24 - .../samples/nls/RequestEchoResource.properties | 19 - .../rest/samples/nls/RootResources.properties | 18 - .../nls/SampleRemoteableServlet.properties | 17 - .../rest/samples/nls/SourceResource.properties | 19 - .../samples/nls/SqlQueryResource.properties | 19 - .../rest/samples/nls/TempDirResource.properties | 18 - .../samples/nls/TumblrParserResource.properties | 19 - .../nls/UrlEncodedFormResource.properties | 22 - juneau-samples/src/main/resources/samples.cfg | 143 --- .../rest/samples/AddressBookResourceTest.java | 231 ----- .../samples/CT_AddressBookResource_test0.json | 26 - .../juneau/rest/samples/RootResourcesTest.java | 147 --- .../SampleRemoteableServicesResourceTest.java | 69 -- .../juneau/rest/samples/SamplesRestClient.java | 69 -- .../samples/TestMultiPartFormPostsTest.java | 47 - .../apache/juneau/rest/samples/TestUtils.java | 360 -------- .../apache/juneau/rest/samples/_TestSuite.java | 57 -- juneau-samples/war/web.xml | 47 - pom.xml | 2 +- 147 files changed, 5383 insertions(+), 5459 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/e3d95284/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfSchema.java ---------------------------------------------------------------------- diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfSchema.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfSchema.java index 1347939..5471bcf 100644 --- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfSchema.java +++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfSchema.java @@ -66,14 +66,14 @@ public @interface RdfSchema { * <ja>@RdfNs</ja>(prefix=<js>"mail"</js>, namespaceURI="<js>http://www.apache.org/mail/"</js>) * } * ) - * <jk>package</jk> org.apache.juneau.samples.addressbook; + * <jk>package</jk> org.apache.juneau.examples.addressbook; * <jk>import</jk> org.apache.juneau.rdf.annotation.*; * </p> * <p> * Class in package using defined namespaces... * </p> * <p class='bcode'> - * <jk>package</jk> org.apache.juneau.samples.addressbook; + * <jk>package</jk> org.apache.juneau.examples.addressbook; * * <jc>// Bean class, override "ab" namespace on package.</jc> * <ja>@Rdf</ja>(prefix=<js>"addr"</js>) http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/e3d95284/juneau-core-rdf/src/main/java/org/apache/juneau/jena/package.html ---------------------------------------------------------------------- diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/package.html b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/package.html index 6036583..9974c40 100644 --- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/package.html +++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/package.html @@ -1014,16 +1014,16 @@ Two using the built-in Juneau Server API, and two using the JAX-RS integration component. </p> <ul class='spaced-list'> - <li>Create a servlet that subclasses from {@link org.apache.juneau.server.jena.RestServletJenaDefault}.<br> + <li>Create a servlet that subclasses from {@link org.apache.juneau.rest.jena.RestServletJenaDefault}.<br> This includes serialization and parsing for all Jena supported types, including all supported flavors of RDF. - <li>Create a servlet that subclasses from {@link org.apache.juneau.server.RestServlet} and specify the - RDF serializers and parsers using the {@link org.apache.juneau.server.annotation.RestResource#serializers()} and - {@link org.apache.juneau.server.annotation.RestResource#parsers()} on the entire servlet class, or - the {@link org.apache.juneau.server.annotation.RestMethod#serializers()} and {@link org.apache.juneau.server.annotation.RestMethod#parsers()} + <li>Create a servlet that subclasses from {@link org.apache.juneau.rest.RestServlet} and specify the + RDF serializers and parsers using the {@link org.apache.juneau.rest.annotation.RestResource#serializers()} and + {@link org.apache.juneau.rest.annotation.RestResource#parsers()} on the entire servlet class, or + the {@link org.apache.juneau.rest.annotation.RestMethod#serializers()} and {@link org.apache.juneau.rest.annotation.RestMethod#parsers()} annotations on individual methods within the class. - <li>Register {@link org.apache.juneau.server.jaxrs.rdf.DefaultJenaProvider} with JAX-RS to provide support RDF support for all JAX-RS resource.<br> + <li>Register {@link org.apache.juneau.rest.jaxrs.rdf.DefaultJenaProvider} with JAX-RS to provide support RDF support for all JAX-RS resource.<br> This includes serialization and parsing for all Juneau supported types (JSON, XML, HTML...), including all supported flavors of RDF. - <li>Create and register a subclass of {@link org.apache.juneau.server.jaxrs.BaseProvider} and specify the serializers and parsers to use on JAX-RS resources. + <li>Create and register a subclass of {@link org.apache.juneau.rest.jaxrs.BaseProvider} and specify the serializers and parsers to use on JAX-RS resources. </ul> <p> In general, the Juneau REST server API is much more configurable and easier to use than JAX-RS, but beware that the author may be slightly biased in this statement. @@ -1034,12 +1034,12 @@ <h4 class='topic' onclick='toggle(this)'>4.1.1 - Using RestServletJenaDefault</h4> <div class='topic'> <p> - The quickest way to implement a REST resource with RDF support is to create a subclass of {@link org.apache.juneau.server.jena.RestServletJenaDefault}.<br> + The quickest way to implement a REST resource with RDF support is to create a subclass of {@link org.apache.juneau.rest.jena.RestServletJenaDefault}.<br> This class provides support for all the RDF flavors in addition to JSON, XML, HTML, and URL-Encoding. </p> <p> - The reason why RDF support was not added to {@link org.apache.juneau.server.RestServletDefault} directly was to keep the Jena prerequisites - out of the <code>org.apache.juneau.server</code> package. + The reason why RDF support was not added to {@link org.apache.juneau.rest.RestServletDefault} directly was to keep the Jena prerequisites + out of the <code>org.apache.juneau.rest</code> package. </p> <p> The <code>AddressBookResource</code> example shown in the first chapter uses the <code>RestServletJenaDefault</code> class.<br> @@ -1073,11 +1073,11 @@ The <code>$L{...}</code> variable represent localized strings pulled from the resource bundle identified by the <code>messages</code> annotation. These variables are replaced at runtime based on the HTTP request locale. Several built-in runtime variable types are defined, and the API can be extended to include user-defined variables. - See {@link org.apache.juneau.server.RestServlet#getVarResolver()} for more information. + See {@link org.apache.juneau.rest.RestServlet#getVarResolver()} for more information. </p> <p> This document won't go into all the details of the Juneau <code>RestServlet</code> class.<br> - Refer to the {@link org.apache.juneau.server} documentation for more information on the REST servlet class in general. + Refer to the {@link org.apache.juneau.rest} documentation for more information on the REST servlet class in general. </p> <p> The rest of the code in the resource class consists of REST methods that simply accept and return POJOs.<br> @@ -1109,7 +1109,7 @@ </p> <p> The resource class can be registered with the web application like any other servlet, or can be - defined as a child of another resource through the {@link org.apache.juneau.server.annotation.RestResource#children()} annotation. + defined as a child of another resource through the {@link org.apache.juneau.rest.annotation.RestResource#children()} annotation. </div> <!-- ======================================================================================================== --> @@ -1117,7 +1117,7 @@ <h4 class='topic' onclick='toggle(this)'>4.1.2 - Using RestServlet with annotations</h4> <div class='topic'> <p> - For fine-tuned control of media types, the {@link org.apache.juneau.server.RestServlet} class + For fine-tuned control of media types, the {@link org.apache.juneau.rest.RestServlet} class can be subclassed directly.<br> The serializers/parsers can be specified through annotations at the class and/or method levels. </p> @@ -1156,10 +1156,10 @@ } </p> <p> - The {@link org.apache.juneau.server.annotation.RestMethod#serializersInherit()} and - {@link org.apache.juneau.server.annotation.RestMethod#parsersInherit()} control how various artifacts + The {@link org.apache.juneau.rest.annotation.RestMethod#serializersInherit()} and + {@link org.apache.juneau.rest.annotation.RestMethod#parsersInherit()} control how various artifacts are inherited from the parent class.<br> - Refer to {@link org.apache.juneau.server} for additional information on using these annotations. + Refer to {@link org.apache.juneau.rest} for additional information on using these annotations. </p> </div> @@ -1168,7 +1168,7 @@ <h4 class='topic' onclick='toggle(this)'>4.1.3 - Using JAX-RS DefaultJenaProvider</h4> <div class='topic'> <p> - RDF media type support in JAX-RS can be achieved by using the {@link org.apache.juneau.server.jaxrs.rdf.DefaultJenaProvider} class.<br> + RDF media type support in JAX-RS can be achieved by using the {@link org.apache.juneau.rest.jaxrs.rdf.DefaultJenaProvider} class.<br> It implements the JAX-RS <code>MessageBodyReader</code> and <code>MessageBodyWriter</code> interfaces for all Juneau supported media types. </p> <p> @@ -1258,13 +1258,13 @@ <p> Simply include a reference to the provider in the configuration file. <p class='bcode'> - org.apache.juneau.server.jaxrs.DefaultJenaProvider + org.apache.juneau.rest.jaxrs.DefaultJenaProvider </p> <p> - Properties can be specified on providers through the {@link org.apache.juneau.server.jaxrs.JuneauProvider#properties()} annotation. + Properties can be specified on providers through the {@link org.apache.juneau.rest.jaxrs.JuneauProvider#properties()} annotation. </p> <p> - Properties can also be specified at the method level by using the {@link org.apache.juneau.server.annotation.RestMethod#properties} annotation, like so: + Properties can also be specified at the method level by using the {@link org.apache.juneau.rest.annotation.RestMethod#properties} annotation, like so: </p> <p class='bcode'> <ja>@GET</ja> @@ -1292,8 +1292,8 @@ There is currently no way to define this at the class level.<br> You can override properties at the method level, but this can be cumbersome since it would have to be done for all methods in the resource. - <li>The Juneau Server API allows you to manipulate properties programatically through the {@link org.apache.juneau.server.RestResponse#setProperty(String,Object)} - method, and through the {@link org.apache.juneau.server.annotation.Properties} annotation.<br> + <li>The Juneau Server API allows you to manipulate properties programatically through the {@link org.apache.juneau.rest.RestResponse#setProperty(String,Object)} + method, and through the {@link org.apache.juneau.rest.annotation.Properties} annotation.<br> There is no equivalent in JAX-RS. </ul> </div> @@ -1353,7 +1353,7 @@ <h3 class='topic' onclick='toggle(this)'>4.2 - REST client support</h3> <div class='topic'> <p> - The {@link org.apache.juneau.client.RestClient} class provides an easy-to-use REST client interface with + The {@link org.apache.juneau.rest.client.RestClient} class provides an easy-to-use REST client interface with pluggable media type handling using any of the Juneau serializers and parsers. </p> <p> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/e3d95284/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java b/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java index b090829..48aceeb 100644 --- a/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java +++ b/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java @@ -22,7 +22,6 @@ import org.apache.juneau.json.*; import org.apache.juneau.parser.*; import org.apache.juneau.serializer.*; import org.apache.juneau.transform.*; -import org.apache.juneau.transforms.*; import org.apache.juneau.utils.*; /** @@ -1077,84 +1076,9 @@ public class ObjectMap extends LinkedHashMap<String,Object> { /** * Converts this map into the class type specified by the <js>"_type"</js> entry value. * <p> - * This method can be used to convert <code>ObjectMap</code> objects to a variety of POJO types. + * TODO - Needs better description. * - * <h6 class='topic'>Examples of valid class types:</h6> - * <p> - * An object map can be converted to a bean. - * </p> - * <p class='bcode'> - * { - * _type: <js>'org.apache.juneau.samples.addressbook.Person'</js>, - * name: <js>'John Smith'</js>, - * ... - * } - * </p> - * <p> - * It can also be converted into another map type. - * </p> - * <p class='bcode'> - * <jc>// Generic TreeMap (String keys, Object values)</jc> - * { - * _type: <js>'java.util.TreeMap'</js>, - * name: <js>'John Smith'</js>, - * ... - * } - * <jc>// TreeMap where values are forced to be strings.</jc> - * { - * _type: <js>'java.util.TreeMap<java.lang.String,java.lang.String>'</js>, - * name: <js>'John Smith'</js>, - * ... - * } - * </p> - * <p> - * It can also be converted to Collections objects if map defines an <code>items</code> entry of type array. - * </p> - * <p class='bcode'> - * <jc>// LinkedList of strings</jc> - * { - * _type: <js>'java.util.LinkedList'</js>, - * items: [ <js>'John Smith'</js>, ... ] - * } - * <jc>// LinkedList of beans</jc> - * { - * _type: <js>'java.util.LinkedList<org.apache.juneau.samples.addressbook.Person>'</js>, - * items: [ { name: <js>'John Smith'</js>, ... }, ... ] - * } - * </p> - * <p> - * It can also be converted to arrays. - * </p> - * <p class='bcode'> - * <jc>// Array of strings</jc> - * { - * _type: <js>'java.lang.String[]'</js>, - * items: [ <js>'John Smith'</js>, ... ] - * } - * <jc>// Array of beans</jc> - * { - * _type: <js>'org.apache.juneau.samples.addressbook.Person[]'</js>, - * items: [ { name: <js>'John Smith'</js>, ... }, ... ] - * } - * </p> - * <p> - * It can also be converted to any type that can be handled by the {@link BeanSession#convertToType(Object, Class)} method. - * In this case, the value is specified by an <code>value</code> entry of any type. - * For example, if the bean context has a {@link CalendarSwap} associated with it, it can convert a string value to a calendar. - * <p class='bcode'> - * { - * _type: <js>'java.util.GregorianCalendar'</js>, - * value: <js>'2001-07-04T15:30:45-05:00'</js> - * } - * </p> - * - * <h6 class='topic'>Notes:</h6> - * <ul> - * <li>This method is recursive. It will also recursively convert any descendant entries to POJOs. - * </ul> - * - * @return The new Java object of type specified by the <js>"_class"</js> entry value, or this - * same object if entry does not exist. + * @return This object map cast as another object. */ public Object cast() { return cast((BeanRegistry)null); http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/e3d95284/juneau-core/src/main/java/org/apache/juneau/ini/package.html ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/ini/package.html b/juneau-core/src/main/java/org/apache/juneau/ini/package.html index 141999c..4b0e158 100644 --- a/juneau-core/src/main/java/org/apache/juneau/ini/package.html +++ b/juneau-core/src/main/java/org/apache/juneau/ini/package.html @@ -397,9 +397,9 @@ <p> The <code>org.apache.juneau.microservice.resources.ConfigResource</code> is a predefined REST interface that allows access to the config file used by a microservice.<br> - The <code>juneau-samples</code> project is a microservice that includes this resource + The <code>juneau-examples-rest</code> project is a microservice that includes this resource at <code>http://localhost:10000/sample/config</code>.<br> - The sample microservice uses the following config file <code>juneau-samples.cfg</code>: + The sample microservice uses the following config file <code>juneau-examples.cfg</code>: </p> <p class='bcode'> <cc>#================================================================================ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/e3d95284/juneau-core/src/main/java/org/apache/juneau/json/package.html ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/json/package.html b/juneau-core/src/main/java/org/apache/juneau/json/package.html index 6c238cd..1131613 100644 --- a/juneau-core/src/main/java/org/apache/juneau/json/package.html +++ b/juneau-core/src/main/java/org/apache/juneau/json/package.html @@ -973,16 +973,16 @@ Two using the built-in Juneau Server API, and two using the JAX-RS integration component. </p> <ul class='spaced-list'> - <li>Create a servlet that subclasses from {@link org.apache.juneau.server.RestServletDefault}.<br> + <li>Create a servlet that subclasses from {@link org.apache.juneau.rest.RestServletDefault}.<br> This includes JSON serialization/parsing support by default, in addition to several other media types. - <li>Create a servlet that subclasses from {@link org.apache.juneau.server.RestServlet} and specify the - a JSON serializer and/or parser using the {@link org.apache.juneau.server.annotation.RestResource#serializers()} and - {@link org.apache.juneau.server.annotation.RestResource#parsers()} on the entire servlet class, or - the {@link org.apache.juneau.server.annotation.RestMethod#serializers()} and {@link org.apache.juneau.server.annotation.RestMethod#parsers()} + <li>Create a servlet that subclasses from {@link org.apache.juneau.rest.RestServlet} and specify the + a JSON serializer and/or parser using the {@link org.apache.juneau.rest.annotation.RestResource#serializers()} and + {@link org.apache.juneau.rest.annotation.RestResource#parsers()} on the entire servlet class, or + the {@link org.apache.juneau.rest.annotation.RestMethod#serializers()} and {@link org.apache.juneau.rest.annotation.RestMethod#parsers()} annotations on individual methods within the class. - <li>Register {@link org.apache.juneau.server.jaxrs.DefaultProvider} with JAX-RS.<br> + <li>Register {@link org.apache.juneau.rest.jaxrs.DefaultProvider} with JAX-RS.<br> This includes JSON serialization/parsing support by default, in addition to several other media types. - <li>Create and register a subclass of {@link org.apache.juneau.server.jaxrs.BaseProvider} and specify the serializers and parsers to use on JAX-RS resources. + <li>Create and register a subclass of {@link org.apache.juneau.rest.jaxrs.BaseProvider} and specify the serializers and parsers to use on JAX-RS resources. </ul> <p> In general, the Juneau REST server API is much more configurable and easier to use than JAX-RS, but beware that the author may be slightly biased in this statement. @@ -993,7 +993,7 @@ <h4 class='topic' onclick='toggle(this)'>4.1.1 - Using RestServletDefault</h4> <div class='topic'> <p> - The quickest way to implement a REST resource with JSON support is to create a subclass of {@link org.apache.juneau.server.RestServletDefault}.<br> + The quickest way to implement a REST resource with JSON support is to create a subclass of {@link org.apache.juneau.rest.RestServletDefault}.<br> This class provides support for JSON, XML, HTML, URL-Encoding, and others. </p> <p> @@ -1026,11 +1026,11 @@ The <code>$L{...}</code> variable represent localized strings pulled from the resource bundle identified by the <code>messages</code> annotation. These variables are replaced at runtime based on the HTTP request locale. Several built-in runtime variable types are defined, and the API can be extended to include user-defined variables. - See {@link org.apache.juneau.server.RestServlet#getVarResolver()} for more information. + See {@link org.apache.juneau.rest.RestServlet#getVarResolver()} for more information. </p> <p> This document won't go into all the details of the Juneau <code>RestServlet</code> class.<br> - Refer to the {@link org.apache.juneau.server} documentation for more information on the REST servlet class in general. + Refer to the {@link org.apache.juneau.rest} documentation for more information on the REST servlet class in general. </p> <p> The rest of the code in the resource class consists of REST methods that simply accept and return POJOs.<br> @@ -1062,7 +1062,7 @@ </p> <p> The resource class can be registered with the web application like any other servlet, or can be - defined as a child of another resource through the {@link org.apache.juneau.server.annotation.RestResource#children()} annotation. + defined as a child of another resource through the {@link org.apache.juneau.rest.annotation.RestResource#children()} annotation. </div> <!-- ======================================================================================================== --> @@ -1070,7 +1070,7 @@ <h4 class='topic' onclick='toggle(this)'>4.1.2 - Using RestServlet with annotations</h4> <div class='topic'> <p> - For fine-tuned control of media types, the {@link org.apache.juneau.server.RestServlet} class + For fine-tuned control of media types, the {@link org.apache.juneau.rest.RestServlet} class can be subclassed directly.<br> The serializers/parsers can be specified through annotations at the class and/or method levels. </p> @@ -1106,10 +1106,10 @@ } </p> <p> - The {@link org.apache.juneau.server.annotation.RestMethod#serializersInherit()} and - {@link org.apache.juneau.server.annotation.RestMethod#parsersInherit()} control how various artifacts + The {@link org.apache.juneau.rest.annotation.RestMethod#serializersInherit()} and + {@link org.apache.juneau.rest.annotation.RestMethod#parsersInherit()} control how various artifacts are inherited from the parent class.<br> - Refer to {@link org.apache.juneau.server} for additional information on using these annotations. + Refer to {@link org.apache.juneau.rest} for additional information on using these annotations. </p> </div> @@ -1118,7 +1118,7 @@ <h4 class='topic' onclick='toggle(this)'>4.1.3 - Using JAX-RS DefaultProvider</h4> <div class='topic'> <p> - JSON media type support in JAX-RS can be achieved by using the {@link org.apache.juneau.server.jaxrs.DefaultProvider} class.<br> + JSON media type support in JAX-RS can be achieved by using the {@link org.apache.juneau.rest.jaxrs.DefaultProvider} class.<br> It implements the JAX-RS <code>MessageBodyReader</code> and <code>MessageBodyWriter</code> interfaces for all Juneau supported media types. </p> <p> @@ -1190,11 +1190,11 @@ <p> Simply include a reference to the provider in the configuration file. <p class='bcode'> - org.apache.juneau.server.jaxrs.DefaultProvider + org.apache.juneau.rest.jaxrs.DefaultProvider </p> <p> - Properties can be specified on providers through the {@link org.apache.juneau.server.jaxrs.JuneauProvider#properties()} annotation.<br> - Properties can also be specified at the method level by using the {@link org.apache.juneau.server.annotation.RestMethod#properties} annotation, like so: + Properties can be specified on providers through the {@link org.apache.juneau.rest.jaxrs.JuneauProvider#properties()} annotation.<br> + Properties can also be specified at the method level by using the {@link org.apache.juneau.rest.annotation.RestMethod#properties} annotation, like so: </p> <p class='bcode'> <ja>@GET</ja> @@ -1221,8 +1221,8 @@ There is currently no way to define this at the class level.<br> You can override properties at the method level, but this can be cumbersome since it would have to be done for all methods in the resource. - <li>The Juneau Server API allows you to manipulate properties programatically through the {@link org.apache.juneau.server.RestResponse#setProperty(String,Object)} - method, and through the {@link org.apache.juneau.server.annotation.Properties} annotation.<br> + <li>The Juneau Server API allows you to manipulate properties programatically through the {@link org.apache.juneau.rest.RestResponse#setProperty(String,Object)} + method, and through the {@link org.apache.juneau.rest.annotation.Properties} annotation.<br> There is no equivalent in JAX-RS. </ul> </div> @@ -1271,7 +1271,7 @@ <h3 class='topic' onclick='toggle(this)'>4.2 - REST client support</h3> <div class='topic'> <p> - The {@link org.apache.juneau.client.RestClient} class provides an easy-to-use REST client interface with + The {@link org.apache.juneau.rest.client.RestClient} class provides an easy-to-use REST client interface with pluggable media type handling using any of the Juneau serializers and parsers.<br> Defining a client to support JSON media types on HTTP requests and responses can be done in one line of code: </p> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/e3d95284/juneau-core/src/main/java/org/apache/juneau/svl/package.html ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/svl/package.html b/juneau-core/src/main/java/org/apache/juneau/svl/package.html index 3bd321e..fe61c42 100644 --- a/juneau-core/src/main/java/org/apache/juneau/svl/package.html +++ b/juneau-core/src/main/java/org/apache/juneau/svl/package.html @@ -150,21 +150,21 @@ <li class='c'>{@link org.apache.juneau.svl.vars.ConfigFileVar} - Resolves variables from a {@link org.apache.juneau.ini.ConfigFile} object. <li class='c'>{@link org.apache.juneau.svl.vars.EnvVariablesVar} - Resolves environment variables. <li class='c'>{@link org.apache.juneau.svl.vars.ManifestFileVar} - Resolves variables from a {@link org.apache.juneau.utils.ManifestFile} object. - <li class='c'>{@link org.apache.juneau.server.vars.ServletInitParamVar} - Resolves servlet initialization parameters. + <li class='c'>{@link org.apache.juneau.rest.vars.ServletInitParamVar} - Resolves servlet initialization parameters. </ul> </li> <li class='a'>{@link org.apache.juneau.svl.MultipartVar} - Variables that consist of 2 or more comma-delimited arguments. <ul> - <li class='c'>{@link org.apache.juneau.server.vars.LocalizationVar} - Resolves localized strings for an HTTP request. + <li class='c'>{@link org.apache.juneau.rest.vars.LocalizationVar} - Resolves localized strings for an HTTP request. </ul> </li> - <li class='c'>{@link org.apache.juneau.server.vars.RequestVar} - Resolves specialized HTTP request values. - <li class='c'>{@link org.apache.juneau.server.vars.UrlEncodeVar} - URL-encodes the value inside the variable. + <li class='c'>{@link org.apache.juneau.rest.vars.RequestVar} - Resolves specialized HTTP request values. + <li class='c'>{@link org.apache.juneau.rest.vars.UrlEncodeVar} - URL-encodes the value inside the variable. </ul> </li> <li class='a'>{@link org.apache.juneau.svl.StreamedVar} - Superclass of all vars that stream their value to writers. <ul> - <li class='c'>{@link org.apache.juneau.server.vars.SerializedRequestAttrVar} - Resolves HTTP request attribute values passed through a {@link org.apache.juneau.serializer.Serializer}. + <li class='c'>{@link org.apache.juneau.rest.vars.SerializedRequestAttrVar} - Resolves HTTP request attribute values passed through a {@link org.apache.juneau.serializer.Serializer}. </ul> </li> </ul> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/e3d95284/juneau-core/src/main/java/org/apache/juneau/transform/package.html ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/package.html b/juneau-core/src/main/java/org/apache/juneau/transform/package.html index 063f3c4..9a9b2a6 100644 --- a/juneau-core/src/main/java/org/apache/juneau/transform/package.html +++ b/juneau-core/src/main/java/org/apache/juneau/transform/package.html @@ -96,10 +96,10 @@ <li>{@link org.apache.juneau.serializer.SerializerGroup#addBeanFilters(Class[])} / {@link org.apache.juneau.serializer.SerializerGroup#addPojoSwaps(Class[])} - On groups of serializers. <li>{@link org.apache.juneau.parser.Parser#addBeanFilters(Class[])} / {@link org.apache.juneau.parser.Parser#addPojoSwaps(Class[])} - On parsers. <li>{@link org.apache.juneau.parser.ParserGroup#addBeanFilters(Class[])} / {@link org.apache.juneau.parser.ParserGroup#addPojoSwaps(Class[])} - On groups of parsers. - <li>{@link org.apache.juneau.client.RestClient#addBeanFilters(Class[])} / {@link org.apache.juneau.client.RestClient#addPojoSwaps(Class[])} - On the serializer and parser registered on a REST client. - <li>{@link org.apache.juneau.server.annotation.RestResource#beanFilters() @RestResource.beanFilters()} / {@link org.apache.juneau.server.annotation.RestResource#pojoSwaps() @RestResource.pojoSwaps()}- On all serializers and parsers defined on a REST servlet. - <li>{@link org.apache.juneau.server.annotation.RestMethod#beanFilters() @RestMethod.beanFilters()} / {@link org.apache.juneau.server.annotation.RestMethod#pojoSwaps() @RestMethod.pojoSwaps()} - On all serializers and parsers defined on a method in a REST servlet. - <li>{@link org.apache.juneau.server.jaxrs.JuneauProvider#beanFilters() @JuneauProvider.beanFilters()} / {@link org.apache.juneau.server.jaxrs.JuneauProvider#pojoSwaps() @JuneauProvider.pojoSwaps()} - On all serializers and parsers defined on a JAX-RS provider. + <li>{@link org.apache.juneau.rest.client.RestClient#addBeanFilters(Class[])} / {@link org.apache.juneau.rest.client.RestClient#addPojoSwaps(Class[])} - On the serializer and parser registered on a REST client. + <li>{@link org.apache.juneau.rest.annotation.RestResource#beanFilters() @RestResource.beanFilters()} / {@link org.apache.juneau.rest.annotation.RestResource#pojoSwaps() @RestResource.pojoSwaps()}- On all serializers and parsers defined on a REST servlet. + <li>{@link org.apache.juneau.rest.annotation.RestMethod#beanFilters() @RestMethod.beanFilters()} / {@link org.apache.juneau.rest.annotation.RestMethod#pojoSwaps() @RestMethod.pojoSwaps()} - On all serializers and parsers defined on a method in a REST servlet. + <li>{@link org.apache.juneau.rest.jaxrs.JuneauProvider#beanFilters() @JuneauProvider.beanFilters()} / {@link org.apache.juneau.rest.jaxrs.JuneauProvider#pojoSwaps() @JuneauProvider.pojoSwaps()} - On all serializers and parsers defined on a JAX-RS provider. </ul> <p> Swaps can also be associated with classes through the {@link org.apache.juneau.annotation.Pojo#swap @Pojo.swap()} annotation. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/e3d95284/juneau-core/src/main/java/org/apache/juneau/urlencoding/package.html ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/package.html b/juneau-core/src/main/java/org/apache/juneau/urlencoding/package.html index 650e4c4..83bebb6 100644 --- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/package.html +++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/package.html @@ -923,16 +923,16 @@ Two using the built-in Juneau Server API, and two using the JAX-RS integration component. </p> <ul class='spaced-list'> - <li>Create a servlet that subclasses from {@link org.apache.juneau.server.RestServletDefault}.<br> + <li>Create a servlet that subclasses from {@link org.apache.juneau.rest.RestServletDefault}.<br> This includes URL-encoding serialization/parsing support by default, in addition to several other media types. - <li>Create a servlet that subclasses from {@link org.apache.juneau.server.RestServlet} and specify the - URL-encoding serializer and/or parser using the {@link org.apache.juneau.server.annotation.RestResource#serializers()} and - {@link org.apache.juneau.server.annotation.RestResource#parsers()} on the entire servlet class, or - the {@link org.apache.juneau.server.annotation.RestMethod#serializers()} and {@link org.apache.juneau.server.annotation.RestMethod#parsers()} + <li>Create a servlet that subclasses from {@link org.apache.juneau.rest.RestServlet} and specify the + URL-encoding serializer and/or parser using the {@link org.apache.juneau.rest.annotation.RestResource#serializers()} and + {@link org.apache.juneau.rest.annotation.RestResource#parsers()} on the entire servlet class, or + the {@link org.apache.juneau.rest.annotation.RestMethod#serializers()} and {@link org.apache.juneau.rest.annotation.RestMethod#parsers()} annotations on individual methods within the class. - <li>Register {@link org.apache.juneau.server.jaxrs.DefaultProvider} with JAX-RS.<br> + <li>Register {@link org.apache.juneau.rest.jaxrs.DefaultProvider} with JAX-RS.<br> This includes URL-encoding serialization/parsing support by default, in addition to several other media types. - <li>Create and register a subclass of {@link org.apache.juneau.server.jaxrs.BaseProvider} and specify the serializers and parsers to use on JAX-RS resources. + <li>Create and register a subclass of {@link org.apache.juneau.rest.jaxrs.BaseProvider} and specify the serializers and parsers to use on JAX-RS resources. </ul> <p> In general, the Juneau REST server API is much more configurable and easier to use than JAX-RS, but beware that the author may be slightly biased in this statement. @@ -943,7 +943,7 @@ <h4 class='topic' onclick='toggle(this)'>4.1.1 - Using RestServletDefault</h4> <div class='topic'> <p> - The quickest way to implement a REST resource with URL-encoding support is to create a subclass of {@link org.apache.juneau.server.RestServletDefault}.<br> + The quickest way to implement a REST resource with URL-encoding support is to create a subclass of {@link org.apache.juneau.rest.RestServletDefault}.<br> This class provides support for JSON, XML, HTML, URL-Encoding, and others. </p> <p> @@ -975,11 +975,11 @@ The <code>$L{...}</code> variable represent localized strings pulled from the resource bundle identified by the <code>messages</code> annotation. These variables are replaced at runtime based on the HTTP request locale. Several built-in runtime variable types are defined, and the API can be extended to include user-defined variables. - See {@link org.apache.juneau.server.RestServlet#getVarResolver()} for more information. + See {@link org.apache.juneau.rest.RestServlet#getVarResolver()} for more information. </p> <p> This document won't go into all the details of the Juneau <code>RestServlet</code> class.<br> - Refer to the {@link org.apache.juneau.server} documentation for more information on the REST servlet class in general. + Refer to the {@link org.apache.juneau.rest} documentation for more information on the REST servlet class in general. </p> <p> The rest of the code in the resource class consists of REST methods that simply accept and return POJOs.<br> @@ -1011,7 +1011,7 @@ </p> <p> The resource class can be registered with the web application like any other servlet, or can be - defined as a child of another resource through the {@link org.apache.juneau.server.annotation.RestResource#children()} annotation. + defined as a child of another resource through the {@link org.apache.juneau.rest.annotation.RestResource#children()} annotation. </div> <!-- ======================================================================================================== --> @@ -1019,7 +1019,7 @@ <h4 class='topic' onclick='toggle(this)'>4.1.2 - Using RestServlet with annotations</h4> <div class='topic'> <p> - For fine-tuned control of media types, the {@link org.apache.juneau.server.RestServlet} class + For fine-tuned control of media types, the {@link org.apache.juneau.rest.RestServlet} class can be subclassed directly.<br> The serializers/parsers can be specified through annotations at the class and/or method levels. </p> @@ -1055,10 +1055,10 @@ } </p> <p> - The {@link org.apache.juneau.server.annotation.RestMethod#serializersInherit()} and - {@link org.apache.juneau.server.annotation.RestMethod#parsersInherit()} control how various artifacts + The {@link org.apache.juneau.rest.annotation.RestMethod#serializersInherit()} and + {@link org.apache.juneau.rest.annotation.RestMethod#parsersInherit()} control how various artifacts are inherited from the parent class.<br> - Refer to {@link org.apache.juneau.server} for additional information on using these annotations. + Refer to {@link org.apache.juneau.rest} for additional information on using these annotations. </p> </div> @@ -1067,7 +1067,7 @@ <h4 class='topic' onclick='toggle(this)'>4.1.3 - Using JAX-RS DefaultProvider</h4> <div class='topic'> <p> - URL-encoding media type support in JAX-RS can be achieved by using the {@link org.apache.juneau.server.jaxrs.DefaultProvider} class.<br> + URL-encoding media type support in JAX-RS can be achieved by using the {@link org.apache.juneau.rest.jaxrs.DefaultProvider} class.<br> It implements the JAX-RS <code>MessageBodyReader</code> and <code>MessageBodyWriter</code> interfaces for all Juneau supported media types. </p> <p> @@ -1143,11 +1143,11 @@ <p> Simply include a reference to the provider in the configuration file. <p class='bcode'> - org.apache.juneau.server.jaxrs.DefaultProvider + org.apache.juneau.rest.jaxrs.DefaultProvider </p> <p> - Properties can be specified on providers through the {@link org.apache.juneau.server.jaxrs.JuneauProvider#properties()} annotation.<br> - Properties can also be specified at the method level by using the {@link org.apache.juneau.server.annotation.RestMethod#properties} annotation, like so: + Properties can be specified on providers through the {@link org.apache.juneau.rest.jaxrs.JuneauProvider#properties()} annotation.<br> + Properties can also be specified at the method level by using the {@link org.apache.juneau.rest.annotation.RestMethod#properties} annotation, like so: </p> <p class='bcode'> <ja>@GET</ja> @@ -1174,8 +1174,8 @@ There is currently no way to define this at the class level.<br> You can override properties at the method level, but this can be cumbersome since it would have to be done for all methods in the resource. - <li>The Juneau Server API allows you to manipulate properties programatically through the {@link org.apache.juneau.server.RestResponse#setProperty(String,Object)} - method, and through the {@link org.apache.juneau.server.annotation.Properties} annotation.<br> + <li>The Juneau Server API allows you to manipulate properties programatically through the {@link org.apache.juneau.rest.RestResponse#setProperty(String,Object)} + method, and through the {@link org.apache.juneau.rest.annotation.Properties} annotation.<br> There is no equivalent in JAX-RS. </ul> </div> @@ -1220,7 +1220,7 @@ <h3 class='topic' onclick='toggle(this)'>4.2 - REST client support</h3> <div class='topic'> <p> - The {@link org.apache.juneau.client.RestClient} class provides an easy-to-use REST client interface with + The {@link org.apache.juneau.rest.client.RestClient} class provides an easy-to-use REST client interface with pluggable media type handling using any of the Juneau serializers and parsers.<br> Defining a client to support the URL-encoding media type on HTTP requests and responses can be done in one line of code: </p> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/e3d95284/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlSchema.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlSchema.java b/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlSchema.java index 61c91d4..adf06e5 100644 --- a/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlSchema.java +++ b/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlSchema.java @@ -66,14 +66,14 @@ public @interface XmlSchema { * <ja>@XmlNs</ja>(prefix=<js>"mail"</js>, namespaceURI="<js>http://www.apache.org/mail/"</js>) * } * ) - * <jk>package</jk> org.apache.juneau.samples.addressbook; + * <jk>package</jk> org.apache.juneau.examples.addressbook; * <jk>import</jk> org.apache.juneau.xml.annotation.*; * </p> * <p> * Class in package using defined namespaces... * </p> * <p class='bcode'> - * <jk>package</jk> corg.apache.juneau.samples.addressbook; + * <jk>package</jk> corg.apache.juneau.examples.addressbook; * * <jc>// Bean class, override "ab" namespace on package.</jc> * <ja>@Xml</ja>(prefix=<js>"addr"</js>) http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/e3d95284/juneau-core/src/main/java/org/apache/juneau/xml/package.html ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/package.html b/juneau-core/src/main/java/org/apache/juneau/xml/package.html index 11a4978..d6b48b9 100644 --- a/juneau-core/src/main/java/org/apache/juneau/xml/package.html +++ b/juneau-core/src/main/java/org/apache/juneau/xml/package.html @@ -146,7 +146,7 @@ <h3 class='topic' onclick='toggle(this)'>1.1 - XML support overview - example</h3> <div class='topic'> <p> - The example shown here is from the Address Book resource located in the <code>juneau-samples</code> microservice project.<br> + The example shown here is from the Address Book resource located in the <code>juneau-examples-rest</code> microservice project.<br> The POJO model consists of a <code>List</code> of <code>Person</code> beans, with each <code>Person</code> containing zero or more <code>Address</code> beans. </p> @@ -1750,7 +1750,7 @@ <ja>@XmlNs</ja>(prefix=<js>"mail"</js>, namespaceURI=<js>"http://www.apache.org/mail/"</js>) } ) - <jk>package</jk> org.apache.juneau.samples.addressbook; + <jk>package</jk> org.apache.juneau.examples.addressbook; <jk>import</jk> org.apache.juneau.xml.annotation.*; </p> <p> @@ -2129,14 +2129,14 @@ <xa>targetNamespace</xa>=<xs>'http://www.apache.org/2013/Juneau'</xs> <xa>elementFormDefault</xa>=<xs>'qualified'</xs> <xa>xmlns:juneau</xa>=<xs>'http://www.apache.org/2013/Juneau'</xs><xt>></xt> - <xt><element</xt> <xa>name</xa>=<xs>'person'</xs> <xa>_type</xa>=<xs>'juneau:org.apache.juneau.samples.addressbook.Person'</xs><xt>/></xt> - <xt><complexType</xt> <xa>name</xa>=<xs>'org.apache.juneau.samples.addressbook.Person'</xs><xt>></xt> + <xt><element</xt> <xa>name</xa>=<xs>'person'</xs> <xa>_type</xa>=<xs>'juneau:org.apache.juneau.examples.addressbook.Person'</xs><xt>/></xt> + <xt><complexType</xt> <xa>name</xa>=<xs>'org.apache.juneau.examples.addressbook.Person'</xs><xt>></xt> <xt><sequence></xt> <xt><element</xt> <xa>name</xa>=<xs>'id'</xs> <xa>_type</xa>=<xs>'integer'</xs> <xa>minOccurs</xa>=<xs>'0'</xs><xt>/></xt> <xt><element</xt> <xa>name</xa>=<xs>'name'</xs> <xa>_type</xa>=<xs>'string'</xs> <xa>minOccurs</xa>=<xs>'0'</xs><xt>/></xt> <xt><element</xt> <xa>name</xa>=<xs>'addressBookUri'</xs> <xa>_type</xa>=<xs>'string'</xs> <xa>minOccurs</xa>=<xs>'0'</xs><xt>/></xt> <xt><element</xt> <xa>name</xa>=<xs>'birthDate'</xs> <xa>_type</xa>=<xs>'juneau:java.util.Calendar'</xs> <xa>minOccurs</xa>=<xs>'0'</xs><xt>/></xt> - <xt><element</xt> <xa>name</xa>=<xs>'addresses'</xs> <xa>_type</xa>=<xs>'juneau:java.util.LinkedList_x003C_org.apache.juneau.samples.addressbook.Address_x003E_'</xs> <xa>minOccurs</xa>=<xs>'0'</xs><xt>/></xt> + <xt><element</xt> <xa>name</xa>=<xs>'addresses'</xs> <xa>_type</xa>=<xs>'juneau:java.util.LinkedList_x003C_org.apache.juneau.examples.addressbook.Address_x003E_'</xs> <xa>minOccurs</xa>=<xs>'0'</xs><xt>/></xt> <xt></sequence></xt> <xt><attribute</xt> <xa>name</xa>=<xs>'uri'</xs> <xa>_type</xa>=<xs>'string'</xs><xt>/></xt> <xt></complexType></xt> @@ -2145,15 +2145,15 @@ <xt><any</xt> <xa>processContents</xa>=<xs>'skip'</xs> <xa>maxOccurs</xa>=<xs>'unbounded'</xs> <xa>minOccurs</xa>=<xs>'0'</xs><xt>/></xt> <xt></sequence></xt> <xt></complexType></xt> - <xt><complexType</xt> <xa>name</xa>=<xs>'java.util.LinkedList_x003C_org.apache.juneau.samples.addressbook.Address_x003E_'</xs><xt>></xt> + <xt><complexType</xt> <xa>name</xa>=<xs>'java.util.LinkedList_x003C_org.apache.juneau.examples.addressbook.Address_x003E_'</xs><xt>></xt> <xt><sequence></xt> <xt><choice</xt> <xa>minOccurs</xa>=<xs>'0'</xs> <xa>maxOccurs</xa>=<xs>'unbounded'</xs><xt>></xt> - <xt><element</xt> <xa>name</xa>=<xs>'address'</xs> <xa>_type</xa>=<xs>'juneau:org.apache.juneau.samples.addressbook.Address'</xs><xt>/></xt> + <xt><element</xt> <xa>name</xa>=<xs>'address'</xs> <xa>_type</xa>=<xs>'juneau:org.apache.juneau.examples.addressbook.Address'</xs><xt>/></xt> <xt><element</xt> <xa>name</xa>=<xs>'null'</xs> <xa>_type</xa>=<xs>'string'</xs><xt>/></xt> <xt></choice></xt> <xt></sequence></xt> <xt></complexType></xt> - <xt><complexType</xt> <xa>name</xa>=<xs>'org.apache.juneau.samples.addressbook.Address'</xs><xt>></xt> + <xt><complexType</xt> <xa>name</xa>=<xs>'org.apache.juneau.examples.addressbook.Address'</xs><xt>></xt> <xt><sequence></xt> <xt><element</xt> <xa>name</xa>=<xs>'personUri'</xs> <xa>_type</xa>=<xs>'string'</xs> <xa>minOccurs</xa>=<xs>'0'</xs><xt>/></xt> <xt><element</xt> <xa>name</xa>=<xs>'id'</xs> <xa>_type</xa>=<xs>'integer'</xs> <xa>minOccurs</xa>=<xs>'0'</xs><xt>/></xt> @@ -2247,10 +2247,10 @@ <xt><any</xt> <xa>processContents</xa>=<xs>'skip'</xs> <xa>maxOccurs</xa>=<xs>'unbounded'</xs> <xa>minOccurs</xa>=<xs>'0'</xs><xt>/></xt> <xt></sequence></xt> <xt></complexType></xt> - <xt><complexType</xt> <xa>name</xa>=<xs>'java.util.LinkedList_x003C_org.apache.juneau.samples.addressbook.Address_x003E_'</xs><xt>></xt> + <xt><complexType</xt> <xa>name</xa>=<xs>'java.util.LinkedList_x003C_org.apache.juneau.examples.addressbook.Address_x003E_'</xs><xt>></xt> <xt><sequence></xt> <xt><choice</xt> <xa>minOccurs</xa>=<xs>'0'</xs> <xa>maxOccurs</xa>=<xs>'unbounded'</xs><xt>></xt> - <xt><element</xt> <xa>name</xa>=<xs>'address'</xs> <xa>_type</xa>=<xs>'addr:org.apache.juneau.samples.addressbook.Address'</xs><xt>/></xt> + <xt><element</xt> <xa>name</xa>=<xs>'address'</xs> <xa>_type</xa>=<xs>'addr:org.apache.juneau.examples.addressbook.Address'</xs><xt>/></xt> <xt><element</xt> <xa>name</xa>=<xs>'null'</xs> <xa>_type</xa>=<xs>'string'</xs><xt>/></xt> <xt></choice></xt> <xt></sequence></xt> @@ -2274,8 +2274,8 @@ <xt><impor</xt>t <xa>namespace</xa>=<xs>'http://www.apache.org/2013/Juneau'</xs> <xa>schemaLocation</xa>=<xs>'juneau.xsd'</xs><xt>/></xt> <xt><import</xt> <xa>namespace</xa>=<xs>'http://www.apache.org/address/'</xs> <xa>schemaLocation</xa>=<xs>'addr.xsd'</xs><xt>/></xt> <xt><import</xt> <xa>namespace</xa>=<xs>'http://www.apache.org/mail/'</xs> <xa>schemaLocation</xa>=<xs>'mail.xsd'</xs><xt>/></xt> - <xt><element</xt> <xa>name</xa>=<xs>'person'</xs> <xa>_type</xa>=<xs>'per:org.apache.juneau.samples.addressbook.Person'</xs><xt>/></xt> - <xt><complexType</xt> <xa>name</xa>=<xs>'org.apache.juneau.samples.addressbook.Person'</xs><xt>></xt> + <xt><element</xt> <xa>name</xa>=<xs>'person'</xs> <xa>_type</xa>=<xs>'per:org.apache.juneau.examples.addressbook.Person'</xs><xt>/></xt> + <xt><complexType</xt> <xa>name</xa>=<xs>'org.apache.juneau.examples.addressbook.Person'</xs><xt>></xt> <xt><sequence></xt> <xt><any</xt> <xa>minOccurs</xa>=<xs>'0'</xs> <xa>maxOccurs</xa>=<xs>'unbounded'</xs><xt>/></xt> <xt></sequence></xt> @@ -2285,7 +2285,7 @@ <xt><element</xt> <xa>name</xa>=<xs>'name'</xs> <xa>_type</xa>=<xs>'juneau:java.lang.String'</xs><xt>/></xt> <xt><element</xt> <xa>name</xa>=<xs>'addressBookUri'</xs> <xa>_type</xa>=<xs>'juneau:java.net.URI'</xs><xt>/></xt> <xt><element</xt> <xa>name</xa>=<xs>'birthDate'</xs> <xa>_type</xa>=<xs>'juneau:java.util.Calendar'</xs><xt>/></xt> - <xt><element</xt> <xa>name</xa>=<xs>'addresses'</xs> <xa>_type</xa>=<xs>'juneau:java.util.LinkedList_x003C_org.apache.juneau.samples.addressbook.Address_x003E_'</xs><xt>/></xt> + <xt><element</xt> <xa>name</xa>=<xs>'addresses'</xs> <xa>_type</xa>=<xs>'juneau:java.util.LinkedList_x003C_org.apache.juneau.examples.addressbook.Address_x003E_'</xs><xt>/></xt> <xt></schema></xt> [\u0000] <xt><schema</xt> @@ -2300,7 +2300,7 @@ <xt><import</xt> <xa>namespace</xa>=<xs>'http://www.apache.org/2013/Juneau'</xs> <xa>schemaLocation</xa>=<xs>'juneau.xsd'</xs><xt>/></xt> <xt><import</xt> <xa>namespace</xa>=<xs>'http://www.apache.org/person/'</xs> <xa>schemaLocation</xa>=<xs>'per.xsd'</xs><xt>/></xt> <xt><import</xt> <xa>namespace</xa>=<xs>'http://www.apache.org/mail/'</xs> <xa>schemaLocation</xa>=<xs>'mail.xsd'</xs><xt>/></xt> - <xt><complexType</xt> <xa>name</xa>=<xs>'org.apache.juneau.samples.addressbook.Address'</xs><xt>></xt> + <xt><complexType</xt> <xa>name</xa>=<xs>'org.apache.juneau.examples.addressbook.Address'</xs><xt>></xt> <xt><sequence></xt> <xt><any</xt> <xa>minOccurs</xa>=<xs>'0'</xs> <xa>maxOccurs</xa>=<xs>'unbounded'</xs><xt>/></xt> <xt></sequence></xt> @@ -2607,16 +2607,16 @@ Two using the built-in Juneau Server API, and two using the JAX-RS integration component. </p> <ul class='spaced-list'> - <li>Create a servlet that subclasses from {@link org.apache.juneau.server.RestServletDefault}.<br> + <li>Create a servlet that subclasses from {@link org.apache.juneau.rest.RestServletDefault}.<br> This includes XML serialization/parsing support by default, in addition to several other media types. - <li>Create a servlet that subclasses from {@link org.apache.juneau.server.RestServlet} and specify the - an XML serializer and/or parser using the {@link org.apache.juneau.server.annotation.RestResource#serializers()} and - {@link org.apache.juneau.server.annotation.RestResource#parsers()} on the entire servlet class, or - the {@link org.apache.juneau.server.annotation.RestMethod#serializers()} and {@link org.apache.juneau.server.annotation.RestMethod#parsers()} + <li>Create a servlet that subclasses from {@link org.apache.juneau.rest.RestServlet} and specify the + an XML serializer and/or parser using the {@link org.apache.juneau.rest.annotation.RestResource#serializers()} and + {@link org.apache.juneau.rest.annotation.RestResource#parsers()} on the entire servlet class, or + the {@link org.apache.juneau.rest.annotation.RestMethod#serializers()} and {@link org.apache.juneau.rest.annotation.RestMethod#parsers()} annotations on individual methods within the class. - <li>Register {@link org.apache.juneau.server.jaxrs.DefaultProvider} with JAX-RS to provide XML support.<br> + <li>Register {@link org.apache.juneau.rest.jaxrs.DefaultProvider} with JAX-RS to provide XML support.<br> This includes XML serialization/parsing support by default, in addition to several other media types. - <li>Create and register a subclass of {@link org.apache.juneau.server.jaxrs.BaseProvider} and specify the serializers and parsers to use on JAX-RS resources. + <li>Create and register a subclass of {@link org.apache.juneau.rest.jaxrs.BaseProvider} and specify the serializers and parsers to use on JAX-RS resources. </ul> <p> In general, the Juneau REST server API is much more configurable and easier to use than JAX-RS, but beware that the author may be slightly biased in this statement. @@ -2627,7 +2627,7 @@ <h4 class='topic' onclick='toggle(this)'>4.1.1 - Using RestServletDefault</h4> <div class='topic'> <p> - The quickest way to implement a REST resource with XML support is to create a subclass of {@link org.apache.juneau.server.RestServletDefault}.<br> + The quickest way to implement a REST resource with XML support is to create a subclass of {@link org.apache.juneau.rest.RestServletDefault}.<br> This class provides support for JSON, XML, HTML, URL-Encoding, and others. </p> <p> @@ -2660,11 +2660,11 @@ The <code>$L{...}</code> variable represent localized strings pulled from the resource bundle identified by the <code>messages</code> annotation. These variables are replaced at runtime based on the HTTP request locale. Several built-in runtime variable types are defined, and the API can be extended to include user-defined variables. - See {@link org.apache.juneau.server.RestServlet#getVarResolver()} for more information. + See {@link org.apache.juneau.rest.RestServlet#getVarResolver()} for more information. </p> <p> This document won't go into all the details of the Juneau <code>RestServlet</code> class.<br> - Refer to the {@link org.apache.juneau.server} documentation for more information on the REST servlet class in general. + Refer to the {@link org.apache.juneau.rest} documentation for more information on the REST servlet class in general. </p> <p> The rest of the code in the resource class consists of REST methods that simply accept and return POJOs.<br> @@ -2696,7 +2696,7 @@ </p> <p> The resource class can be registered with the web application like any other servlet, or can be - defined as a child of another resource through the {@link org.apache.juneau.server.annotation.RestResource#children()} annotation. + defined as a child of another resource through the {@link org.apache.juneau.rest.annotation.RestResource#children()} annotation. </div> <!-- ======================================================================================================== --> @@ -2704,7 +2704,7 @@ <h4 class='topic' onclick='toggle(this)'>4.1.2 - Using RestServlet with annotations</h4> <div class='topic'> <p> - For fine-tuned control of media types, the {@link org.apache.juneau.server.RestServlet} class + For fine-tuned control of media types, the {@link org.apache.juneau.rest.RestServlet} class can be subclassed directly.<br> The serializers/parsers can be specified through annotations at the class and/or method levels. </p> @@ -2740,10 +2740,10 @@ } </p> <p> - The {@link org.apache.juneau.server.annotation.RestMethod#serializersInherit()} and - {@link org.apache.juneau.server.annotation.RestMethod#parsersInherit()} control how various artifacts + The {@link org.apache.juneau.rest.annotation.RestMethod#serializersInherit()} and + {@link org.apache.juneau.rest.annotation.RestMethod#parsersInherit()} control how various artifacts are inherited from the parent class.<br> - Refer to {@link org.apache.juneau.server} for additional information on using these annotations. + Refer to {@link org.apache.juneau.rest} for additional information on using these annotations. </p> </div> @@ -2752,7 +2752,7 @@ <h4 class='topic' onclick='toggle(this)'>4.1.3 - Using JAX-RS DefaultProvider</h4> <div class='topic'> <p> - XML media type support in JAX-RS can be achieved by using the {@link org.apache.juneau.server.jaxrs.DefaultProvider} class.<br> + XML media type support in JAX-RS can be achieved by using the {@link org.apache.juneau.rest.jaxrs.DefaultProvider} class.<br> It implements the JAX-RS <code>MessageBodyReader</code> and <code>MessageBodyWriter</code> interfaces for all Juneau supported media types. </p> <p> @@ -2824,11 +2824,11 @@ <p> Simply include a reference to the provider in the configuration file. <p class='bcode'> - org.apache.juneau.server.jaxrs.DefaultProvider + org.apache.juneau.rest.jaxrs.DefaultProvider </p> <p> - Properties can be specified on providers through the {@link org.apache.juneau.server.jaxrs.JuneauProvider#properties()} annotation.<br> - Properties can also be specified at the method level by using the {@link org.apache.juneau.server.annotation.RestMethod#properties} annotation, like so: + Properties can be specified on providers through the {@link org.apache.juneau.rest.jaxrs.JuneauProvider#properties()} annotation.<br> + Properties can also be specified at the method level by using the {@link org.apache.juneau.rest.annotation.RestMethod#properties} annotation, like so: </p> <p class='bcode'> <ja>@GET</ja> @@ -2855,8 +2855,8 @@ There is currently no way to define this at the class level.<br> You can override properties at the method level, but this can be cumbersome since it would have to be done for all methods in the resource. - <li>The Juneau Server API allows you to manipulate properties programatically through the {@link org.apache.juneau.server.RestResponse#setProperty(String,Object)} - method, and through the {@link org.apache.juneau.server.annotation.Properties} annotation.<br> + <li>The Juneau Server API allows you to manipulate properties programatically through the {@link org.apache.juneau.rest.RestResponse#setProperty(String,Object)} + method, and through the {@link org.apache.juneau.rest.annotation.Properties} annotation.<br> There is no equivalent in JAX-RS. </ul> </div> @@ -2903,7 +2903,7 @@ <h3 class='topic' onclick='toggle(this)'>4.2 - REST client support</h3> <div class='topic'> <p> - The {@link org.apache.juneau.client.RestClient} class provides an easy-to-use REST client interface with + The {@link org.apache.juneau.rest.client.RestClient} class provides an easy-to-use REST client interface with pluggable media type handling using any of the Juneau serializers and parsers.<br> Defining a client to support XML media types on HTTP requests and responses can be done in one line of code: </p>
