Repository: incubator-juneau Updated Branches: refs/heads/master 19c566dd2 -> f400b0c0f
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/PathRemainder.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/PathRemainder.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/PathRemainder.java index 4287407..85496a1 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/PathRemainder.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/PathRemainder.java @@ -28,9 +28,9 @@ import java.lang.annotation.*; * ... * } * </p> + * * <p> * This is functionally equivalent to the following code... - * </p> * <p class='bcode'> * <ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/foo/*"</js>) * <jk>public void</jk> doGet(RestRequest req, RestResponse res) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Properties.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Properties.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Properties.java index b1ab9e0..c00269f 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Properties.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Properties.java @@ -31,6 +31,7 @@ import org.apache.juneau.*; * ... * } * </p> + * * <p> * This is functionally equivalent to the following code... * <p class='bcode'> @@ -41,6 +42,7 @@ import org.apache.juneau.*; * ... * } * </p> + * * <p> * ...or this... * <p class='bcode'> @@ -50,6 +52,7 @@ import org.apache.juneau.*; * ... * } * </p> + * * <p> * The parameter type can be one of the following: * <ul> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Property.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Property.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Property.java index e48228a..fa25444 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Property.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Property.java @@ -26,6 +26,7 @@ import org.apache.juneau.xml.*; /** * Property name/value pair used in the {@link RestResource#properties()} annotation. + * * <p> * Any of the following property names can be specified: * <ul> @@ -39,9 +40,11 @@ import org.apache.juneau.xml.*; * <li>{@link XmlSerializerContext} * <li>{@link XmlParserContext} * </ul> + * * <p> * Property values types that are not <code>Strings</code> will automatically be converted to the correct type * (e.g. <code>Boolean</code>, etc...). + * * <p> * See {@link RestResource#properties} for more information. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Query.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Query.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Query.java index 298b312..f548d61 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Query.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Query.java @@ -22,6 +22,7 @@ import org.apache.juneau.rest.*; /** * Identical to {@link FormData @FormData}, but only retrieves the parameter from the URL string, not URL-encoded form * posts. + * * <p> * Unlike {@link FormData @FormData}, using this annotation does not result in the servlet reading the contents of * URL-encoded form posts. @@ -36,9 +37,9 @@ import org.apache.juneau.rest.*; * ... * } * </p> + * * <p> * This is functionally equivalent to the following code... - * </p> * <p class='bcode'> * <ja>@RestMethod</ja>(name=<js>"GET"</js>) * <jk>public void</jk> doGet(RestRequest req, RestResponse res) { @@ -62,6 +63,7 @@ public @interface Query { /** * A synonym for {@link #name()}. + * * <p> * Allows you to use shortened notation if you're only specifying the name. */ @@ -69,11 +71,13 @@ public @interface Query { /** * Specify <jk>true</jk> if using multi-part parameters to represent collections and arrays. + * * <p> * Normally, we expect single parameters to be specified in UON notation for representing collections of values * (e.g. <js>"&key=(1,2,3)"</js>. * This annotation allows the use of multi-part parameters to represent collections * (e.g. <js>"&key=1&key=2&key=3"</js>. + * * <p> * This setting should only be applied to Java parameters of type array or Collection. */ @@ -81,6 +85,7 @@ public @interface Query { /** * The expected format of the request parameter. + * * <p> * Possible values: * <ul class='spaced-list'> @@ -95,6 +100,7 @@ public @interface Query { * <js>"INHERIT"</js> (default) - Inherit from the {@link RestContext#REST_paramFormat} property on the * servlet method or class. * </ul> + * * <p> * Note that the parameter value <js>"(foo)"</js> is interpreted as <js>"(foo)"</js> when using plain mode, but * <js>"foo"</js> when using UON mode. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/ResourceSwagger.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/ResourceSwagger.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/ResourceSwagger.java index 05f6b69..e30c4f1 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/ResourceSwagger.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/ResourceSwagger.java @@ -37,8 +37,10 @@ public @interface ResourceSwagger { /** * Optional contact information for the exposed API. + * * <p> * It is used to populate the Swagger contact field and to display on HTML pages. + * * <p> * A simplified JSON string with the following fields: * <p class='bcode'> @@ -48,6 +50,7 @@ public @interface ResourceSwagger { * email: string * } * </p> + * * <p> * The default value pulls the description from the <code>contact</code> entry in the servlet resource bundle. * (e.g. <js>"contact = {name:'John Smith',email:'[email protected]'}"</js> or @@ -61,10 +64,13 @@ public @interface ResourceSwagger { * ) * ) * </p> + * * <p> * This field can contain variables (e.g. "$L{my.localized.variable}"). + * * <p> * Corresponds to the swagger field <code>/info/contact</code>. + * * <p> * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getContact(RestRequest)} method. */ @@ -72,8 +78,10 @@ public @interface ResourceSwagger { /** * Optional license information for the exposed API. + * * <p> * It is used to populate the Swagger license field and to display on HTML pages. + * * <p> * A simplified JSON string with the following fields: * <p class='bcode'> @@ -82,6 +90,7 @@ public @interface ResourceSwagger { * url: string * } * </p> + * * <p> * The default value pulls the description from the <code>license</code> entry in the servlet resource bundle. * (e.g. <js>"license = {name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'}"</js> or @@ -95,10 +104,13 @@ public @interface ResourceSwagger { * ) * ) * </p> + * * <p> * This field can contain variables (e.g. "$L{my.localized.variable}"). + * * <p> * Corresponds to the swagger field <code>/info/license</code>. + * * <p> * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getLicense(RestRequest)} method. */ @@ -106,15 +118,20 @@ public @interface ResourceSwagger { /** * Provides the version of the application API (not to be confused with the specification version). + * * <p> * It is used to populate the Swagger version field and to display on HTML pages. + * * <p> * The default value pulls the description from the <code>version</code> entry in the servlet resource bundle. * (e.g. <js>"version = 2.0"</js> or <js>"MyServlet.version = 2.0"</js>). + * * <p> * This field can contain variables (e.g. "$L{my.localized.variable}"). + * * <p> * Corresponds to the swagger field <code>/info/version</code>. + * * <p> * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getVersion(RestRequest)} method. */ @@ -122,8 +139,10 @@ public @interface ResourceSwagger { /** * Optional tagging information for the exposed API. + * * <p> * It is used to populate the Swagger tags field and to display on HTML pages. + * * <p> * A simplified JSON string with the following fields: * <p class='bcode'> @@ -138,6 +157,7 @@ public @interface ResourceSwagger { * } * ] * </p> + * * <p> * The default value pulls the description from the <code>tags</code> entry in the servlet resource bundle. * (e.g. <js>"tags = [{name:'Foo',description:'Foobar'}]"</js> or @@ -151,10 +171,13 @@ public @interface ResourceSwagger { * ) * ) * </p> + * * <p> * This field can contain variables (e.g. "$L{my.localized.variable}"). + * * <p> * Corresponds to the swagger field <code>/tags</code>. + * * <p> * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getTags(RestRequest)} method. */ @@ -162,8 +185,10 @@ public @interface ResourceSwagger { /** * Optional external documentation information for the exposed API. + * * <p> * It is used to populate the Swagger external documentation field and to display on HTML pages. + * * <p> * A simplified JSON string with the following fields: * <p class='bcode'> @@ -172,6 +197,7 @@ public @interface ResourceSwagger { * url: string * } * </p> + * * <p> * The default value pulls the description from the <code>externalDocs</code> entry in the servlet resource bundle. * (e.g. <js>"externalDocs = {url:'http://juneau.apache.org'}"</js> or @@ -185,10 +211,13 @@ public @interface ResourceSwagger { * ) * ) * </p> + * * <p> * This field can contain variables (e.g. "$L{my.localized.variable}"). + * * <p> * Corresponds to the swagger field <code>/tags</code>. + * * <p> * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getExternalDocs(RestRequest)} * method. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Response.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Response.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Response.java index 68c2634..2080b2a 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Response.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Response.java @@ -50,12 +50,15 @@ public @interface Response { /** * Optional description. + * * <p> * The default value pulls the description from the <code>description</code> entry in the servlet resource bundle. * (e.g. <js>"myMethod.res.[code].description = foo"</js> or * <js>"MyServlet.myMethod.res.[code].description = foo"</js>). + * * <p> * This field can contain variables (e.g. "$L{my.localized.variable}"). + * * <p> * Corresponds to the swagger field <code>/paths/{path}/{method}/responses/{code}/description</code>. */ @@ -63,6 +66,7 @@ public @interface Response { /** * A definition of the response structure. + * * <p> * It can be a primitive, an array or an object. * If this field does not exist, it means no content is returned as part of the response. @@ -85,6 +89,7 @@ public @interface Response { /** * Optional response headers. + * * <p> * Response variables can also be defined in the servlet resource bundle. * (e.g. <js>"myMethod.res.[code].[category].[name] = foo"</js> or http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java index 003dece..62a63d4 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java @@ -38,13 +38,16 @@ public @interface RestMethod { /** * REST method name. + * * <p> * Typically <js>"GET"</js>, <js>"PUT"</js>, <js>"POST"</js>, <js>"DELETE"</js>, or <js>"OPTIONS"</js>. + * * <p> * Method names are case-insensitive (always folded to upper-case). + * * <p> * Besides the standard HTTP method names, the following can also be specified: - * <ul> + * <ul class='spaced-list'> * <li> * <js>"*"</js> * - Denotes any method. @@ -78,11 +81,12 @@ public @interface RestMethod { /** * Optional path pattern for the specified method. + * * <p> * Appending <js>"/*"</js> to the end of the path pattern will make it match any remainder too. - * <br> - * Not appending <js>"/*"</js> to the end of the pattern will cause a 404 (Not found) error to occur if the exact + * <br>Not appending <js>"/*"</js> to the end of the pattern will cause a 404 (Not found) error to occur if the exact * pattern is not found. + * * <p> * The path can contain variables that get resolved to {@link Path @Path} parameters: * <p class='bcode'> @@ -92,6 +96,7 @@ public @interface RestMethod { * <jc>// Example 2</jc> * <ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/myurl/{0}/{1}/{2}/*"</js>) * </p> + * * <p> * Refer to {@link Path @Path} on how path variables get resolved. */ @@ -99,8 +104,10 @@ public @interface RestMethod { /** * URL path pattern priority. + * * <p> * To force path patterns to be checked before other path patterns, use a higher priority number. + * * <p> * By default, it's <code>0</code>, which means it will use an internal heuristic to determine a best match. */ @@ -108,9 +115,11 @@ public @interface RestMethod { /** * Method guards. + * * <p> * Associates one or more {@link RestGuard RestGuards} with a method call. * These guards get called immediately before execution of the REST method. + * * <p> * Typically, guards will be used for permissions checking on the user making the request, but it can also be used * for other purposes like pre-call validation of a request. @@ -119,12 +128,15 @@ public @interface RestMethod { /** * Method response converters. + * * <p> * Associates one or more {@link RestConverter RestConverters} with a method call. * These converters get called immediately after execution of the REST method in the same order specified in the * annotation. + * * <p> * Can be used for performing post-processing on the response object before serialization. + * * <p> * Default converters are available in the <a class='doclink' * href='../converters/package-summary.html#TOC'>org.apache.juneau.rest.converters</a> package. @@ -133,11 +145,14 @@ public @interface RestMethod { /** * Method matchers. + * * <p> * Associates one more more {@link RestMatcher RestMatchers} with this method. + * * <p> * Matchers are used to allow multiple Java methods to handle requests assigned to the same URL path pattern, but * differing based on some request attribute, such as a specific header value. + * * <p> * See {@link RestMatcher} for details. */ @@ -145,9 +160,11 @@ public @interface RestMethod { /** * Overrides the list of serializers assigned at the method level. + * * <p> * Use this annotation when the list of serializers assigned to a method differs from the list of serializers * assigned at the servlet level. + * * <p> * To append to the list of serializers assigned at the servlet level, use * <code>serializersInherit=<jsf>SERIALIZERS</jsf></code>. @@ -172,6 +189,7 @@ public @interface RestMethod { /** * Used in conjunction with {@link #serializers()} to identify what class-level settings are inherited by the method * serializer group. + * * <p> * Possible values: * <ul> @@ -179,9 +197,9 @@ public @interface RestMethod { * <li>{@link Inherit#PROPERTIES} - Inherit class-level properties. * <li>{@link Inherit#TRANSFORMS} - Inherit class-level transforms. * </ul> + * * <p> * For example, to inherit all serializers, properties, and transforms from the servlet class: - * </p> * <p class='bcode'> * <ja>@RestMethod</ja>( * path=<js>"/foo"</js>, @@ -194,9 +212,11 @@ public @interface RestMethod { /** * Overrides the list of parsers assigned at the method level. + * * <p> * Use this annotation when the list of parsers assigned to a method differs from the list of parsers assigned at * the servlet level. + * * <p> * To append to the list of serializers assigned at the servlet level, use * <code>serializersInherit=<jsf>SERIALIZERS</jsf></code>. @@ -221,6 +241,7 @@ public @interface RestMethod { /** * Used in conjunction with {@link #parsers()} to identify what class-level settings are inherited by the method * parser group. + * * <p> * Possible values: * <ul> @@ -228,6 +249,7 @@ public @interface RestMethod { * <li>{@link Inherit#PROPERTIES} - Inherit class-level properties. * <li>{@link Inherit#TRANSFORMS} - Inherit class-level transforms. * </ul> + * * <p> * For example, to inherit all parsers, properties, and transforms from the servlet class: * <p class='bcode'> @@ -242,9 +264,11 @@ public @interface RestMethod { /** * Appends to the list of {@link Encoder encoders} specified on the servlet. + * * <p> * Use this annotation when the list of encoders assigned to a method differs from the list of encoders assigned at * the servlet level. + * * <p> * These can be used to enable various kinds of compression (e.g. <js>"gzip"</js>) on requests and responses. * @@ -261,6 +285,7 @@ public @interface RestMethod { * } * } * </p> + * * <p> * If you want to OVERRIDE the set of encoders specified by the servlet, combine this annotation with * <code><ja>@RestMethod</ja>(inheritEncoders=<jk>false</jk>)</code>. @@ -274,6 +299,7 @@ public @interface RestMethod { /** * Same as {@link RestResource#properties()}, except defines property values by default when this method is called. + * * <p> * This is equivalent to simply calling <code>res.addProperties()</code> in the Java method, but is provided for * convenience. @@ -282,6 +308,7 @@ public @interface RestMethod { /** * Shortcut for setting {@link #properties()} of simple boolean types. + * * <p> * Setting a flag is equivalent to setting the same property to <js>"true"</js>. */ @@ -299,9 +326,11 @@ public @interface RestMethod { /** * Shortcut for specifying the {@link BeanContext#BEAN_includeProperties} property on all serializers. + * * <p> * The typical use case is when you're rendering summary and details views of the same bean in a resource and * you want to expose or hide specific properties depending on the level of detail you want. + * * <p> * In the example below, our 'summary' view is a list of beans where we only want to show the ID property, * and our detail view is a single bean where we want to expose different fields: @@ -325,22 +354,22 @@ public @interface RestMethod { * <ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/mybeans/{id}"</js>, bpIncludes=<js>"{MyBean:'a,b'}"</js>) * <jk>public</jk> MyBean getBeanDetails(<ja>@Path</ja> String id); * </p> + * * <p> * The format of this value is a lax JSON object. - * <br> - * Keys can be fully-qualified or short class names or <js>"*"</js> to represent all classes. - * <br> - * Values are comma-delimited lists of bean property names. - * <br> - * Properties apply to specified class and all subclasses. + * <br>Keys can be fully-qualified or short class names or <js>"*"</js> to represent all classes. + * <br>Values are comma-delimited lists of bean property names. + * <br>Properties apply to specified class and all subclasses. */ String bpIncludes() default ""; /** * Shortcut for specifying the {@link BeanContext#BEAN_excludeProperties} property on all serializers. + * * <p> * Same as {@link #bpIncludes()} except you specify a list of bean property names that you want to exclude from * serialization. + * * <p> * In the example below, our 'summary' view is a list of beans where we want to exclude some properties: * <p class='bcode'> @@ -363,28 +392,31 @@ public @interface RestMethod { * <ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/mybeans/{id}"</js>) * <jk>public</jk> MyBean getBeanDetails(<ja>@Path</ja> String id); * </p> + * * <p> * The format of this value is a lax JSON object. - * <br> - * Keys can be fully-qualified or short class names or <js>"*"</js> to represent all classes. - * <br> - * Values are comma-delimited lists of bean property names. - * <br> - * Properties apply to specified class and all subclasses. + * <br>Keys can be fully-qualified or short class names or <js>"*"</js> to represent all classes. + * <br>Values are comma-delimited lists of bean property names. + * <br>Properties apply to specified class and all subclasses. */ String bpExcludes() default ""; /** * Specifies default values for request headers. + * * <p> * Strings are of the format <js>"Header-Name: header-value"</js>. + * * <p> * Affects values returned by {@link RestRequest#getHeader(String)} when the header is not present on the request. + * * <p> * The most useful reason for this annotation is to provide a default <code>Accept</code> header when one is not * specified so that a particular default {@link Serializer} is picked. + * * <p> * Only one header value can be specified per entry (i.e. it's not a delimited list of header entries). + * * <p> * Header values specified at the method level override header values specified at the servlet level. * @@ -396,6 +428,7 @@ public @interface RestMethod { * ... * } * </p> + * * <p> * You can use either <js>':'</js> or <js>'='</js> as the key/value delimiter. * Key and value is trimmed of whitespace. @@ -404,8 +437,10 @@ public @interface RestMethod { /** * Specifies default values for query parameters. + * * <p> * Strings are of the format <js>"name=value"</js>. + * * <p> * Affects values returned by {@link RestRequest#getQuery(String)} when the parameter is not present on the request. * @@ -416,6 +451,7 @@ public @interface RestMethod { * ... * } * </p> + * * <p> * You can use either <js>':'</js> or <js>'='</js> as the key/value delimiter. * Key and value is trimmed of whitespace. @@ -424,8 +460,10 @@ public @interface RestMethod { /** * Specifies default values for form-data parameters. + * * <p> * Strings are of the format <js>"name=value"</js>. + * * <p> * Affects values returned by {@link RestRequest#getFormData(String)} when the parameter is not present on the * request. @@ -437,6 +475,7 @@ public @interface RestMethod { * ... * } * </p> + * * <p> * You can use either <js>':'</js> or <js>'='</js> as the key/value delimiter. * Key and value is trimmed of whitespace. @@ -445,6 +484,7 @@ public @interface RestMethod { /** * Optional summary for the exposed API. + * * <p> * This summary is used in the following locations: * <ul class='spaced-list'> @@ -455,11 +495,14 @@ public @interface RestMethod { * <li> * The summary of the method in the Swagger page. * </ul> + * * <p> * The default value pulls the description from the <code>(className.?)[javaMethodName].summary</code> entry in the * servlet resource bundle. (e.g. <js>"MyClass.myMethod.summary = foo"</js> or <js>"myMethod.summary = foo"</js>). + * * <p> * This field value can contain variables (e.g. "$L{my.localized.variable}"). + * * <p> * Corresponds to the swagger field <code>/paths/{path}/{method}/summary</code>. */ @@ -467,6 +510,7 @@ public @interface RestMethod { /** * Optional description for the exposed API. + * * <p> * This description is used in the following locations: * <ul class='spaced-list'> @@ -477,12 +521,15 @@ public @interface RestMethod { * <li> * The description of the method in the Swagger page. * </ul> + * * <p> * The default value pulls the description from the <code>(className.?)[javaMethodName].description</code> entry in * the servlet resource bundle. (e.g. <js>"MyClass.myMethod.description = foo"</js> or * <js>"myMethod.description = foo"</js>). + * * <p> * This field value can contain variables (e.g. "$L{my.localized.variable}"). + * * <p> * Corresponds to the swagger field <code>/paths/{path}/{method}/description</code>. */ @@ -490,14 +537,18 @@ public @interface RestMethod { /** * Specifies whether this method can be called based on the client version. + * * <p> * The client version is identified via the HTTP request header identified by * {@link RestResource#clientVersionHeader()} which by default is <js>"X-Client-Version"</js>. + * * <p> * This is a specialized kind of {@link RestMatcher} that allows you to invoke different Java methods for the same * method/path based on the client version. + * * <p> * The format of the client version range is similar to that of OSGi versions. + * * <p> * In the following example, the Java methods are mapped to the same HTTP method and URL <js>"/foobar"</js>. * <p class='bcode'> @@ -520,6 +571,7 @@ public @interface RestMethod { * ... * } * </p> + * * <p> * It's common to combine the client version with transforms that will convert new POJOs into older POJOs for * backwards compatibility. @@ -535,6 +587,7 @@ public @interface RestMethod { * <jk>public</jk> NewPojo oldMethod() { * <jk>return</jk> newMethod() * } + * * <p> * Note that in the previous example, we're returning the exact same POJO, but using a transform to convert it into * an older form. @@ -551,6 +604,7 @@ public @interface RestMethod { /** * Defines widgets that can be used in conjunction with string variables of the form <js>"$W{name}"</js>to quickly * generate arbitrary replacement text. + * * <p> * Widgets are inherited from parent to child, but can be overridden by reusing the widget name. */ @@ -563,6 +617,7 @@ public @interface RestMethod { /** * Provides HTML-doc-specific metadata on this method. + * * <p> * Information provided here overrides information provided in the servlet-level annotation. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java index c7f49a0..5db9ae5 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java @@ -34,6 +34,7 @@ import org.apache.juneau.xml.*; /** * Used to denote that a class is a REST resource and to associate metadata on it. + * * <p> * Usually used on a subclass of {@link RestServlet}, but can be used to annotate any class that you want to expose as * a REST resource. @@ -49,14 +50,17 @@ public @interface RestResource { /** * Identifies the location of the resource bundle for this class. + * * <p> * This annotation is used to provide localized messages for the following methods: * <ul> * <li>{@link RestRequest#getMessage(String, Object...)} * <li>{@link RestContext#getMessages()} * </ul> + * * <p> * Refer to the {@link MessageBundle} class for a description of the message key formats used in the properties file. + * * <p> * The value can be a relative path like <js>"nls/Messages"</js>, indicating to look for the resource bundle * <js>"com.foo.sample.nls.Messages"</js> if the resource class is in <js>"com.foo.sample"</js>, or it can be an @@ -66,12 +70,15 @@ public @interface RestResource { /** * Class-level guards. + * * <p> * Associates one or more {@link RestGuard RestGuards} with all REST methods defined in this class. * These guards get called immediately before execution of any REST method in this class. + * * <p> * Typically, guards will be used for permissions checking on the user making the request, but it can also be used * for other purposes like pre-call validation of a request. + * * <p> * The programmatic equivalent to this annotation are the {@link RestConfig#addGuards(Class...)}/ * {@link RestConfig#addGuards(RestGuard...)} methods. @@ -80,15 +87,19 @@ public @interface RestResource { /** * Class-level converters. + * * <p> * Associates one or more {@link RestConverter converters} with a resource class. * These converters get called immediately after execution of the REST method in the same order specified in the * annotation. + * * <p> * Can be used for performing post-processing on the response object before serialization. + * * <p> * Default converter implementations are provided in the <a class='doclink' * href='../converters/package-summary.html#TOC'>org.apache.juneau.rest.converters</a> package. + * * <p> * The programmatic equivalent to this annotation are the {@link RestConfig#addConverters(Class...)}/ * {@link RestConfig#addConverters(RestConverter...)} methods. @@ -97,6 +108,7 @@ public @interface RestResource { /** * Class-level bean filters. + * * <p> * Shortcut to add bean filters to the bean contexts of the objects returned by the following methods: * <ul> @@ -104,10 +116,12 @@ public @interface RestResource { * <li>{@link RestContext#getSerializers()} * <li>{@link RestContext#getParsers()} * </ul> + * * <p> * If the specified class is an instance of {@link BeanFilterBuilder}, then a filter built from that builder is added. * Any other classes are wrapped in a {@link InterfaceBeanFilterBuilder} to indicate that subclasses should be * treated as the specified class type. + * * <p> * The programmatic equivalent to this annotation is the {@link RestConfig#addBeanFilters(Class...)} method. */ @@ -115,6 +129,7 @@ public @interface RestResource { /** * Class-level POJO swaps. + * * <p> * Shortcut to add POJO swaps to the bean contexts of the objects returned by the following methods: * <ul> @@ -122,9 +137,11 @@ public @interface RestResource { * <li>{@link RestContext#getSerializers()} * <li>{@link RestContext#getParsers()} * </ul> + * * <p> * If the specified class is an instance of {@link PojoSwap}, then that swap is added. * Any other classes are wrapped in a {@link SurrogateSwap}. + * * <p> * The programmatic equivalent to this annotation is the {@link RestConfig#addPojoSwaps(Class...)} method. */ @@ -132,10 +149,12 @@ public @interface RestResource { /** * Class-level Java method parameter resolvers. + * * <p> * By default, the Juneau framework will automatically Java method parameters of various types (e.g. * <code>RestRequest</code>, <code>Accept</code>, <code>Reader</code>). * This annotation allows you to provide your own resolvers for your own class types that you want resolved. + * * <p> * For example, if you want to pass in instances of <code>MySpecialObject</code> to your Java method, define * the following resolver: @@ -155,8 +174,10 @@ public @interface RestResource { * } * } * </p> + * * <p> * <b>Note:</b>{@link RestParam} classes must have no-arg constructors. + * * <p> * The programmatic equivalent to this annotation is the {@link RestConfig#addParamResolvers(Class...)} method. */ @@ -164,6 +185,7 @@ public @interface RestResource { /** * Class-level properties. + * * <p> * Shortcut for specifying class-level properties on this servlet to the objects returned by the following methods: * <ul> @@ -185,12 +207,15 @@ public @interface RestResource { * <li>{@link XmlSerializerContext} * <li>{@link XmlParserContext} * </ul> + * * <p> * Property values will be converted to the appropriate type. + * * <p> * In some cases, properties can be overridden at runtime through the * {@link RestResponse#setProperty(String, Object)} method or through a {@link Properties @Properties} annotated * method parameter. + * * <p> * The programmatic equivalent to this annotation are the {@link RestConfig#setProperty(String, Object)}/ * {@link RestConfig#setProperties(java.util.Map)} methods. @@ -199,6 +224,7 @@ public @interface RestResource { /** * Shortcut for setting {@link #properties()} of simple boolean types. + * * <p> * Setting a flag is equivalent to setting the same property to <js>"true"</js>. */ @@ -206,8 +232,10 @@ public @interface RestResource { /** * Specifies a list of {@link Serializer} classes to add to the list of serializers available for this servlet. + * * <p> * This annotation can only be used on {@link Serializer} classes that have no-arg constructors. + * * <p> * The programmatic equivalent to this annotation are the {@link RestConfig#addSerializers(Class...)}/ * {@link RestConfig#addSerializers(Serializer...)} methods. @@ -216,8 +244,10 @@ public @interface RestResource { /** * Specifies a list of {@link Parser} classes to add to the list of parsers available for this servlet. + * * <p> * This annotation can only be used on {@link Parser} classes that have no-arg constructors. + * * <p> * The programmatic equivalent to this annotation are the {@link RestConfig#addParsers(Class...)}/ * {@link RestConfig#addParsers(Parser...)} methods. @@ -227,8 +257,10 @@ public @interface RestResource { /** * Specifies a list of {@link ResponseHandler} classes that know how to convert POJOs returned by REST methods or * set via {@link RestResponse#setOutput(Object)} into appropriate HTTP responses. + * * <p> * See {@link ResponseHandler} for details. + * * <p> * The programmatic equivalent to this annotation are the {@link RestConfig#addResponseHandlers(Class...)}/ * {@link RestConfig#addResponseHandlers(ResponseHandler...)} methods. @@ -237,8 +269,10 @@ public @interface RestResource { /** * Specifies a list of {@link Encoder} to associate with this servlet. + * * <p> * These can be used to enable various kinds of compression (e.g. <js>"gzip"</js>) on requests and responses. + * * <p> * This annotation can only be used on {@link Encoder} classes that have no-arg constructors. * @@ -250,6 +284,7 @@ public @interface RestResource { * ... * } * </p> + * * <p> * The programmatic equivalent to this annotation are the {@link RestConfig#addEncoders(Class...)}/ * {@link RestConfig#addEncoders(Encoder...)} methods. @@ -258,13 +293,17 @@ public @interface RestResource { /** * Specifies default values for request headers. + * * <p> * Strings are of the format <js>"Header-Name: header-value"</js>. + * * <p> * Affects values returned by {@link RestRequest#getHeader(String)} when the header is not present on the request. + * * <p> * The most useful reason for this annotation is to provide a default <code>Accept</code> header when one is not * specified so that a particular default {@link Serializer} is picked. + * * <p> * Only one header value can be specified per entry (i.e. it's not a delimited list of header entries). * @@ -276,6 +315,7 @@ public @interface RestResource { * ... * } * </p> + * * <p> * The programmatic equivalent to this annotation are the {@link RestConfig#addDefaultRequestHeader(String, Object)}/ * {@link RestConfig#addDefaultRequestHeaders(String...)} methods. @@ -284,13 +324,17 @@ public @interface RestResource { /** * Specifies default values for response headers. + * * <p> * Strings are of the format <js>"Header-Name: header-value"</js>. + * * <p> * This is equivalent to calling {@link RestResponse#setHeader(String, String)} programmatically in each of the Java * methods. + * * <p> * The header value will not be set if the header value has already been specified (hence the 'default' in the name). + * * <p> * Only one header value can be specified per entry (i.e. it's not a delimited list of header entries). * @@ -302,6 +346,7 @@ public @interface RestResource { * ... * } * </p> + * * <p> * The programmatic equivalent to this annotation are the {@link RestConfig#addDefaultResponseHeader(String, Object)}/ * {@link RestConfig#addDefaultResponseHeaders(String...)} methods. @@ -310,6 +355,7 @@ public @interface RestResource { /** * Defines children of this resource. + * * <p> * A REST child resource is simply another servlet that is initialized as part of the parent resource and has a * servlet path directly under the parent servlet path. @@ -317,9 +363,11 @@ public @interface RestResource { * <code>web.xml</code> file of the web application. * This can cut down on the number of entries that show up in the <code>web.xml</code> file if you are defining * large numbers of servlets. + * * <p> * Child resources must specify a value for {@link #path()} that identifies the subpath of the child resource * relative to the parent path. + * * <p> * It should be noted that servlets can be nested arbitrarily deep using this technique (i.e. children can also have * children). @@ -347,6 +395,7 @@ public @interface RestResource { * </p> * </dd> * </dl> + * * <p> * The programmatic equivalent to this annotation are the {@link RestConfig#addChildResource(String, Object)}/ * {@link RestConfig#addChildResources(Class...)}/{@link RestConfig#addChildResources(Object...)} methods. @@ -355,13 +404,16 @@ public @interface RestResource { /** * Identifies the URL subpath relative to the parent resource. + * * <p> * Typically, this annotation is only applicable to resources defined as children through the {@link #children()} * annotation. * However, it may be used in other ways (e.g. defining paths for top-level resources in microservices). + * * <p> * This annotation is ignored on top-level servlets (i.e. servlets defined in <code>web.xml</code> files). * Therefore, implementers can optionally specify a path value for documentation purposes. + * * <p> * The programmatic equivalent to this annotation is the {@link RestConfig#setPath(String)} method. */ @@ -369,16 +421,21 @@ public @interface RestResource { /** * Optional servlet title. + * * <p> * It is used to populate the Swagger title field and as a default value for the {@link HtmlDoc#title()} value. * This value can be retrieved programmatically through the {@link RestRequest#getServletTitle()} method. + * * <p> * The default value pulls the label from the <code>label</code> entry in the servlet resource bundle. * (e.g. <js>"title = foo"</js> or <js>"MyServlet.title = foo"</js>). + * * <p> * This field can contain variables (e.g. "$L{my.localized.variable}"). + * * <p> * Corresponds to the swagger field <code>/info/title</code>. + * * <p> * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getTitle(RestRequest)} method. */ @@ -386,17 +443,22 @@ public @interface RestResource { /** * Optional servlet description. + * * <p> * It is used to populate the Swagger description field and as a default value for the {@link HtmlDoc#description()} * value. * This value can be retrieved programmatically through the {@link RestRequest#getServletDescription()} method. + * * <p> * The default value pulls the description from the <code>description</code> entry in the servlet resource bundle. * (e.g. <js>"description = foo"</js> or <js>"MyServlet.description = foo"</js>). + * * <p> * This field can contain variables (e.g. "$L{my.localized.variable}"). + * * <p> * Corresponds to the swagger field <code>/info/description</code>. + * * <p> * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getDescription(RestRequest)} method. */ @@ -404,10 +466,13 @@ public @interface RestResource { /** * Optional location of configuration file for this servlet. + * * <p> * The configuration file . + * * <p> * This field can contain variables (e.g. "$L{my.localized.variable}"). + * * <p> * The programmatic equivalent to this annotation is the {@link RestConfig#setConfigFile(ConfigFile)} method. */ @@ -415,9 +480,11 @@ public @interface RestResource { /** * The stylesheet to use for HTML views. + * * <p> * The name is a path to a stylesheet located in either the classpath or working directory. * The resulting stylesheet becomes available through the servlet via the URL <js>"[servlet-path]/style.css"</js>. + * * <p> * The default set of styles located in the <code>org.apache.juneau.rest.styles</code> package are: * <ul class='spaced-list'> @@ -426,15 +493,18 @@ public @interface RestResource { * <li> * <js>"styles/devops.css"</js> - Theme based on IBM DevOps look-and-feel. * </ul> + * * <p> * The classpath search starts with the child servlet class and proceeds up the class hierarchy chain. * Since the {@link RestServlet} class is in the <code>org.apache.juneau.rest</code> package and the predefined * styles are in the <code>org.apache.juneau.rest.styles</code> package, the paths to the predefined styles are * prefixed with <js>"styles/"</js>. + * * <p> * If the stylesheet cannot be found on the classpath, an attempt to look in the working directory for it will be * made. * This allows for stylesheets to be placed on the file system in the working directory. + * * <p> * If the file cannot be located, the request to <js>"[servlet-path]/style.css"</js> will return * {@link HttpServletResponse#SC_NOT_FOUND}. @@ -449,6 +519,7 @@ public @interface RestResource { * <jk>public class</jk> MyResource <jk>extends</jk> RestServletDefault { * } * </p> + * * <p> * In this example, the servlet will attempt to find the <code>mycss.css</code> file in the following ordered * locations: @@ -459,10 +530,12 @@ public @interface RestResource { * <code>org.apache.juneau.rest</code>). * <li><code>[working-dir]/mystyles</code> directory. * </ol> + * * <p> * Multiple stylesheets can be specified as a comma-delimited list. * When multiple stylesheets are specified, their contents will be concatenated and return in the order specified * in the list. + * * <p> * The programmatic equivalent to this annotation are the {@link RestConfig#addStyleSheet(Object...)}/ * {@link RestConfig#addStyleSheet(Class, String)} methods. @@ -471,10 +544,12 @@ public @interface RestResource { /** * The favicon to use for HTML views. + * * <p> * The name is a path to an icon file located in either the classpath or working directory in a similar way to how * the {@link #stylesheet()} stylesheet is resolved. * The resulting favicon becomes available in the servlet via the URL <js>"[servlet-path]/favicon.ico"</js>. + * * <p> * If the file cannot be located, the request to <js>"[servlet-path]/favicon.ico"</js> will return * {@link HttpServletResponse#SC_NOT_FOUND}. @@ -489,16 +564,17 @@ public @interface RestResource { * <jk>public class</jk> MyResource <jk>extends</jk> RestServletDefault { * } * </p> + * * <p> * In this example, the servlet will attempt to find the <code>myicon.ico</code> file in the following ordered * locations: - * </p> * <ol> * <li><code>com.foo.mypackage.mydocs</code> package. * <li><code>org.apache.juneau.rest.mydocs</code> package (since <code>RestServletDefault</code> is in * <code>org.apache.juneau.rest</code>). * <li><code>[working-dir]/mydocs</code> directory. * </ol> + * * <p> * The programmatic equivalent to this annotation are the {@link RestConfig#setFavIcon(Object)}/ * {@link RestConfig#setFavIcon(Class, String)} methods. @@ -507,10 +583,13 @@ public @interface RestResource { /** * Defines paths and locations of statically served files. + * * <p> * This is a JSON map of paths to packages/directories located on either the classpath or working directory. + * * <p> * Mappings are cumulative from parent to child. Child resources can override mappings made on parent resources. + * * <p> * If the file cannot be located, the request will return {@link HttpServletResponse#SC_NOT_FOUND}. * @@ -525,16 +604,17 @@ public @interface RestResource { * <jk>public class</jk> MyResource <jk>extends</jk> RestServletDefault { * } * </p> + * * <p> * In this example, given a GET request to <code>/myresource/htdocs/foobar.html</code>, the servlet will attempt to * find the <code>foobar.html</code> file in the following ordered locations: - * </p> * <ol> * <li><code>com.foo.mypackage.docs</code> package. * <li><code>org.apache.juneau.rest.docs</code> package (since <code>RestServletDefault</code> is in * <code>org.apache.juneau.rest</code>). * <li><code>[working-dir]/docs</code> directory. * </ol> + * * <p> * The programmatic equivalent to this annotation is the {@link RestConfig#addStaticFiles(Class, String)} method. */ @@ -542,11 +622,14 @@ public @interface RestResource { /** * Specifies the HTTP header name used to identify the client version. + * * <p> * The client version is used to support backwards compatibility for breaking REST interface changes. * Used in conjunction with {@link RestMethod#clientVersion()} annotation. + * * <p> * If not specified, uses <js>"X-Client-Version"</js>. + * * <p> * The programmatic equivalent to this annotation is the {@link RestConfig#setClientVersionHeader(String)} method. */ @@ -554,14 +637,18 @@ public @interface RestResource { /** * Specifies the resolver class to use for resolving child resources by class name. + * * <p> * The default implementation simply instantiates the class using one of the following constructors: * <ul> * <li><code><jk>public</jk> T(RestConfig)</code> * <li><code><jk>public</jk> T()</code> * </ul> + * + * <p> * The former constructor can be used to get access to the {@link RestConfig} object to get access to the config * file and initialization information or make programmatic modifications to the resource before full initialization. + * * <p> * Non-<code>RestServlet</code> classes can also add the following two methods to get access to the * {@link RestConfig} and {@link RestContext} objects: @@ -569,8 +656,10 @@ public @interface RestResource { * <li><code><jk>public void</jk> init(RestConfig);</code> * <li><code><jk>public void</jk> init(RestContext);</code> * </ul> + * * <p> * Subclasses can be used to provide customized resolution of REST resource class instances. + * * <p> * The programmatic equivalent to this annotation are the {@link RestConfig#setResourceResolver(Class)}/ * {@link RestConfig#setResourceResolver(RestResourceResolver)} methods. @@ -579,9 +668,11 @@ public @interface RestResource { /** * Specifies the logger class to use for logging. + * * <p> * The default logger performs basic error logging to the Java logger. * Subclasses can be used to customize logging behavior on the resource. + * * <p> * The programmatic equivalent to this annotation are the * {@link RestConfig#setLogger(Class)}/{@link RestConfig#setLogger(RestLogger)} methods. @@ -590,9 +681,11 @@ public @interface RestResource { /** * Specifies the REST call handler class. + * * <p> * This class handles the basic lifecycle of an HTTP REST call. * Subclasses can be used to customize how these HTTP calls are handled. + * * <p> * The programmatic equivalent to this annotation are the * {@link RestConfig#setCallHandler(Class)}/{@link RestConfig#setCallHandler(RestCallHandler)} methods. @@ -601,8 +694,10 @@ public @interface RestResource { /** * Specifies the class used to retrieve title/description/swagger information about a resource. + * * <p> * Subclasses can be used to customize the documentation on a resource. + * * <p> * The programmatic equivalent to this annotation are the * {@link RestConfig#setInfoProvider(Class)}/{@link RestConfig#setInfoProvider(RestInfoProvider)} methods. @@ -622,8 +717,10 @@ public @interface RestResource { /** * Defines widgets that can be used in conjunction with string variables of the form <js>"$W{name}"</js>to quickly * generate arbitrary replacement text. + * * <p> * Widgets are inherited from parent to child, but can be overridden by reusing the widget name. + * * <p> * See {@link #htmldoc()} for an example of usage. */ @@ -631,6 +728,7 @@ public @interface RestResource { /** * Provides swagger-specific metadata on this resource. + * * <p> * Used to populate the auto-generated OPTIONS swagger documentation. * @@ -655,6 +753,7 @@ public @interface RestResource { /** * Provides HTML-doc-specific metadata on this method. + * * <p> * Used to customize the output from the HTML Doc serializer. * <p class='bcode'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Introspectable.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Introspectable.java b/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Introspectable.java index e6d10f9..b7f0dd1 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Introspectable.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Introspectable.java @@ -22,12 +22,15 @@ import org.apache.juneau.utils.*; /** * Converter for enablement of {@link PojoIntrospector} support on response objects returned by a * <code>@RestMethod</code> method. + * * <p> * When enabled, public methods can be called on objects returned through the {@link RestResponse#setOutput(Object)} * method. + * * <p> * Note that opening up public methods for calling through a REST interface can be dangerous, and should be done with * caution. + * * <p> * Java methods are invoked by passing in the following URL parameters: * <ul class='spaced-list'> @@ -37,6 +40,7 @@ import org.apache.juneau.utils.*; * <li> * <code>&invokeArgs</code> - The arguments as a JSON array. * </ul> + * * <p> * See {@link PojoIntrospector} for additional information on introspection of POJO methods. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Queryable.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Queryable.java b/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Queryable.java index 2f4cd95..ed447c2 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Queryable.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Queryable.java @@ -18,9 +18,11 @@ import org.apache.juneau.utils.*; /** * Converter for enabling of {@link PojoQuery} support on response objects returned by a <code>@RestMethod</code> method. + * * <p> * When enabled, objects in a POJO tree can be filtered using the functionality described in the {@link PojoQuery} * class. + * * <p> * The following HTTP request parameters are available for tabular data (e.g. {@code Collections} of {@code Maps}, * arrays of beans, etc...): http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Traversable.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Traversable.java b/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Traversable.java index c8ff5be..efcd579 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Traversable.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Traversable.java @@ -21,6 +21,7 @@ import org.apache.juneau.utils.*; /** * Converter for enabling of {@link PojoRest} support on response objects returned by a <code>@RestMethod</code> method. + * * <p> * When enabled, objects in a POJO tree returned by the REST method can be addressed through additional URL path * information. @@ -39,6 +40,7 @@ import org.apache.juneau.utils.*; * <jk>int</jk> zip = r.getResponse(Integer.<jk>class</jk>); * } * </p> + * * <p> * See {@link PojoRest} for additional information on addressing elements in a POJO tree using URL notation. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaDefault.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaDefault.java b/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaDefault.java index cd10aa0..01a47d1 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaDefault.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaDefault.java @@ -30,9 +30,10 @@ import org.apache.juneau.xml.*; /** * Subclass of {@link RestServlet} with default sets of serializers and parsers that include RDF support. + * * <p> * Extends the {@link org.apache.juneau.rest.RestServletDefault} class with additional RDF support. - * <p> + * * <p> * Supports the following request <code>Accept</code> header values with the resulting response <code>Content-Type</code>: * </p> @@ -200,6 +201,7 @@ import org.apache.juneau.xml.*; * <td>{@link org.apache.juneau.jena.RdfParser.Turtle}</td> * </tr> * </table> + * * <p> * Note that the list of serializers and parsers can be appended to using the * {@link RestResource#serializers() @RestResource.serializers()} and http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaGroupDefault.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaGroupDefault.java b/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaGroupDefault.java index 130ab25..cbe3d4f 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaGroupDefault.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaGroupDefault.java @@ -18,9 +18,11 @@ import org.apache.juneau.rest.labels.*; /** * Specialized subclass of {@link RestServletJenaDefault} for showing "group" pages. + * * <p> * Group pages consist of simple lists of child resource URLs and their labels. * They're meant to be used as jumping-off points for child resources. + * * <p> * Child resources are specified using the {@link RestResource#children()} annotation. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/labels/BeanDescription.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/labels/BeanDescription.java b/juneau-rest/src/main/java/org/apache/juneau/rest/labels/BeanDescription.java index fd48db5..96c7904 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/labels/BeanDescription.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/labels/BeanDescription.java @@ -17,9 +17,11 @@ import org.apache.juneau.annotation.*; /** * Simple serializable bean description. + * * <p> * Given a particular class type, this serializes the class into the fully-qualified class name and the properties * associated with the class. + * * <p> * Useful for rendering simple information about a bean during REST OPTIONS requests. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ChildResourceDescriptions.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ChildResourceDescriptions.java b/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ChildResourceDescriptions.java index 97b2eac..809203f 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ChildResourceDescriptions.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ChildResourceDescriptions.java @@ -18,6 +18,7 @@ import org.apache.juneau.rest.*; /** * A POJO structure that describes the list of child resources associated with a resource. + * * <p> * Typically used in top-level GET methods of router resources to render a list of available child resources. */ @@ -40,8 +41,9 @@ public class ChildResourceDescriptions extends LinkedList<ResourceDescription> { * * @param context The servlet context that this bean describes. * @param req The HTTP servlet request. - * @param sort If <jk>true</jk>, list will be ordered by name alphabetically. - * Default is to maintain the order as specified in the annotation. + * @param sort + * If <jk>true</jk>, list will be ordered by name alphabetically. + * Default is to maintain the order as specified in the annotation. */ public ChildResourceDescriptions(RestContext context, RestRequest req, boolean sort) { for (Map.Entry<String,RestContext> e : context.getChildResources().entrySet()) http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/labels/NameDescription.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/labels/NameDescription.java b/juneau-rest/src/main/java/org/apache/juneau/rest/labels/NameDescription.java index 48d9378..e7ff1cd 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/labels/NameDescription.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/labels/NameDescription.java @@ -16,6 +16,7 @@ import org.apache.juneau.annotation.*; /** * Simple bean with {@code name} and {@code description} properties. + * * <p> * Primarily used for constructing tables with name/description columns on REST OPTIONS requests. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.java b/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.java index 8c92777..c82fed2 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.java @@ -18,11 +18,14 @@ import org.apache.juneau.rest.annotation.*; /** * Configurable properties for the {@link RemoteableServlet} class. + * * <p> * Properties can be set on the {@link RestServlet} class using the {@link RestResource#properties} or * {@link RestMethod#properties} annotations. + * * <p> * These properties can also be passed in as servlet init parameters. + * * <p> * These properties are only valid at the class level, not the method level. * Setting them on {@link RestMethod#properties()} has no effect. @@ -32,6 +35,7 @@ public final class RemoteableServiceProperties { /** * Only expose interfaces and methods annotated with {@link Remoteable @Remoteable} ({@link Boolean}, * default=<jk>false</jk>). + * * <p> * When enabled, the {@link RemoteableServlet} class will only work with annotated remoteable interfaces and methods. * Otherwise, all public methods can be executed through the service. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServlet.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServlet.java b/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServlet.java index 5df35db..8cb8f96 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServlet.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServlet.java @@ -25,8 +25,10 @@ import org.apache.juneau.rest.annotation.*; /** * Abstract class for defining Remoteable services. + * * <p> * Remoteable services are POJOs whose methods can be invoked remotely through proxy interfaces. + * * <p> * To implement a remoteable service, developers must simply subclass from this class and implement the * {@link #getServiceMap()} method that maps java interfaces to POJO instances. @@ -44,6 +46,7 @@ public abstract class RemoteableServlet extends RestServletDefault { /** * Returns the list of interfaces to their implementation objects. + * * <p> * This class is called often and not cached, so any caching should occur in the subclass if necessary. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/response/DefaultHandler.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/response/DefaultHandler.java b/juneau-rest/src/main/java/org/apache/juneau/rest/response/DefaultHandler.java index 57ecc18..d5362e7 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/response/DefaultHandler.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/response/DefaultHandler.java @@ -25,10 +25,13 @@ import org.apache.juneau.serializer.*; /** * Response handler for POJOs not handled by other handlers. + * * <p> * This uses the serializers defined on the response to serialize the POJO. + * * <p> * The {@link Serializer} used is based on the <code>Accept</code> header on the request. + * * <p> * The <code>Content-Type</code> header is set to the mime-type defined on the selected serializer based on the * {@link Produces#contentType() @Produces.contentType} annotation. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/response/InputStreamHandler.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/response/InputStreamHandler.java b/juneau-rest/src/main/java/org/apache/juneau/rest/response/InputStreamHandler.java index 96ae45f..a2c91b2 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/response/InputStreamHandler.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/response/InputStreamHandler.java @@ -19,11 +19,12 @@ import org.apache.juneau.utils.*; /** * Response handler for {@link InputStream} objects. + * * <p> * Simply pipes the contents of the {@link InputStream} to {@link RestResponse#getNegotiatedOutputStream()}. + * * <p> - * Sets the <code>Content-Type</code> response header to whatever was set via - * {@link RestResponse#setContentType(String)}. + * Sets the <code>Content-Type</code> response header to whatever was set via {@link RestResponse#setContentType(String)}. */ public final class InputStreamHandler implements ResponseHandler { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/response/ReaderHandler.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/response/ReaderHandler.java b/juneau-rest/src/main/java/org/apache/juneau/rest/response/ReaderHandler.java index d34f280..e231b2c 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/response/ReaderHandler.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/response/ReaderHandler.java @@ -19,6 +19,7 @@ import org.apache.juneau.utils.*; /** * Response handler for {@link Reader} objects. + * * <p> * Simply pipes the contents of the {@link Reader} to {@link RestResponse#getNegotiatedWriter()}. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/response/StreamableHandler.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/response/StreamableHandler.java b/juneau-rest/src/main/java/org/apache/juneau/rest/response/StreamableHandler.java index f454fa6..1bcc153 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/response/StreamableHandler.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/response/StreamableHandler.java @@ -21,6 +21,7 @@ import org.apache.juneau.rest.*; /** * Response handler for {@link Writable} and {@link ReaderResource} objects. + * * <p> * Uses the {@link Writable#writeTo(Writer)} method to send the contents to the * {@link RestResponse#getNegotiatedWriter()} writer. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/response/WritableHandler.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/response/WritableHandler.java b/juneau-rest/src/main/java/org/apache/juneau/rest/response/WritableHandler.java index 4f1e9e7..46e4a79 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/response/WritableHandler.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/response/WritableHandler.java @@ -21,9 +21,9 @@ import org.apache.juneau.rest.*; /** * Response handler for {@link Writable} and {@link ReaderResource} objects. + * * <p> - * Uses the {@link Writable#writeTo(Writer)} method to send the contents to the - * {@link RestResponse#getNegotiatedWriter()} writer. + * Uses the {@link Writable#writeTo(Writer)} method to send the contents to the {@link RestResponse#getNegotiatedWriter()} writer. */ public final class WritableHandler implements ResponseHandler { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/response/ZipFileListResponseHandler.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/response/ZipFileListResponseHandler.java b/juneau-rest/src/main/java/org/apache/juneau/rest/response/ZipFileListResponseHandler.java index bdbf32e..5f895a4 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/response/ZipFileListResponseHandler.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/response/ZipFileListResponseHandler.java @@ -22,8 +22,10 @@ import org.apache.juneau.utils.ZipFileList.*; /** * Response handler for ZipFileList objects. + * * <p> * Can be associated with a REST resource using the {@link RestResource#responseHandlers} annotation. + * * <p> * Sets the following headers: * <ul class='spaced-list'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/vars/LocalizationVar.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/LocalizationVar.java b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/LocalizationVar.java index c7ecad1..c518793 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/LocalizationVar.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/LocalizationVar.java @@ -19,14 +19,18 @@ import org.apache.juneau.svl.*; /** * Localized string variable resolver. + * * <p> * The format for this var is <js>"$L{key}"</js> or <js>"$L{key,args...}"</js>. + * * <p> * This variable resolver requires that a {@link RestRequest} object be set as a context object on the resolver or a * session object on the resolver session. + * * <p> * Values are pulled from the {@link RestRequest#getMessage(String,Object[])} method. * These in turn are pulled from the resource bundle associated with the servlet class where the request was made. + * * <p> * Since this is a {@link SimpleVar}, any variables contained in the result will be recursively resolved. * Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/vars/RequestVar.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/RequestVar.java b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/RequestVar.java index c6e8e22..e1a7060 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/RequestVar.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/RequestVar.java @@ -19,6 +19,7 @@ import org.apache.juneau.svl.*; /** * Request attribute variable resolver. + * * <p> * The format for this var is <js>"$R{key}"</js>. * The possible values are: @@ -35,9 +36,11 @@ import org.apache.juneau.svl.*; * <li><code>$R{servletPath}</code> - Value returned by {@link RestRequest#getServletPath()}. * <li><code>$R{servletURI}</code> - Value returned by {@link UriContext#getRootRelativeServletPath()}. * </ul> + * * <p> * This variable resolver requires that a {@link RestRequest} object be set as a context object on the resolver or a * session object on the resolver session. + * * <p> * Since this is a {@link SimpleVar}, any variables contained in the result will be recursively resolved. * Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/vars/SerializedRequestAttrVar.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/SerializedRequestAttrVar.java b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/SerializedRequestAttrVar.java index da6f78f..a4a297f 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/SerializedRequestAttrVar.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/SerializedRequestAttrVar.java @@ -22,11 +22,14 @@ import org.apache.juneau.svl.*; /** * Serialized request attribute variable resolver. + * * <p> * The format for this var is <js>"$SA{contentType,key}"</js> or <js>"$SA{contentType,key,defaultValue}"</js>. + * * <p> * This variable resolver requires that a {@link RestRequest} object be set as a context object on the resolver or a - * session object on the resolver session. + * session object on the resolver session. + * * <p> * Since this is a {@link SimpleVar}, any variables contained in the result will be recursively resolved. * Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/vars/ServletInitParamVar.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/ServletInitParamVar.java b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/ServletInitParamVar.java index 017d69a..c1b8c8e 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/ServletInitParamVar.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/ServletInitParamVar.java @@ -17,13 +17,17 @@ import org.apache.juneau.svl.*; /** * Servlet init parameter variable resolver. + * * <p> * The format for this var is <js>"$I{key}"</js> or <js>"$I{key,defaultValue}"</js>. + * * <p> * This variable resolver requires that a {@link RestRequest} object be set as a context object on the resolver or a * session object on the resolver session. + * * <p> * Values are pulled from the {@link RestServlet#getInitParameter(String)} method. + * * <p> * Since this is a {@link SimpleVar}, any variables contained in the result will be recursively resolved. * Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlEncodeVar.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlEncodeVar.java b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlEncodeVar.java index 13cc05b..698a955 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlEncodeVar.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlEncodeVar.java @@ -19,11 +19,14 @@ import org.apache.juneau.svl.*; /** * URL-encoding variable resolver. + * * <p> * The format for this var is <js>"$UE{innerValue}"</js>. + * * <p> * This variable takes the contents inside the variable and replaces it with a value returned by calling * {@link StringUtils#urlEncode(String)}). + * * <p> * Since this is a {@link SimpleVar}, any variables contained in the result will be recursively resolved. * Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlVar.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlVar.java b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlVar.java index 5e3692d..843180d 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlVar.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlVar.java @@ -19,9 +19,11 @@ import org.apache.juneau.svl.*; /** * Resolver for resolving URL variables <js>"$U{name}"</js>. + * * <p> * The advantage of using this variable is that you can resolve URLs with special protocols such as * <js>"servlet:/xxx"</js>. + * * <p> * See {@link UriResolver} for the kinds of URIs that can be resolved. * <ul> @@ -29,6 +31,7 @@ import org.apache.juneau.svl.*; * <li>{@link RestMethod#widgets() @RestMethod.widgets()} * <li>{@link RestConfig#addWidget(Class)} * </ul> + * * <p> * Uses the URI resolver returned by {@link RestRequest#getUriResolver(UriResolution, UriRelativity)} with resolution * {@link UriResolution#ROOT_RELATIVE} and relativity {@link UriRelativity#RESOURCE}. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/vars/WidgetVar.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/WidgetVar.java b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/WidgetVar.java index 96b16d8..670811a 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/WidgetVar.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/WidgetVar.java @@ -19,8 +19,10 @@ import org.apache.juneau.svl.*; /** * Resolver for resolving widget variables <js>"$W{name}"</js>. + * * <p> * Widgets are simple class that produce some sort of string based on a passed-in HTTP request. + * * <p> * They're registered via the following mechanisms: * <ul> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksColumnWidget.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksColumnWidget.java b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksColumnWidget.java index 1440d80..7ef4982 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksColumnWidget.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksColumnWidget.java @@ -24,6 +24,7 @@ import org.apache.juneau.rest.*; /** * Widget that returns back a list of hyperlinks for rendering the contents of a page in a variety of content types. + * * <p> * The variable it resolves is <js>"$W{contentTypeLinksColumn}"</js>. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksRowWidget.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksRowWidget.java b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksRowWidget.java index d6cbde9..d395028 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksRowWidget.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksRowWidget.java @@ -24,6 +24,7 @@ import org.apache.juneau.rest.*; /** * Widget that returns back a list of hyperlinks for rendering the contents of a page in a variety of content types. + * * <p> * The variable it resolves is <js>"$W{contentTypeLinksRow}"</js>. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByApacheWidget.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByApacheWidget.java b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByApacheWidget.java index 205dae3..e322439 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByApacheWidget.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByApacheWidget.java @@ -16,6 +16,7 @@ import org.apache.juneau.rest.*; /** * Widget that places a powered-by-Apache message on the page. + * * <p> * The variable it resolves is <js>"$W{poweredByApache}"</js>. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByJuneauWidget.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByJuneauWidget.java b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByJuneauWidget.java index 4ae2898..f42f0c5 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByJuneauWidget.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByJuneauWidget.java @@ -16,6 +16,7 @@ import org.apache.juneau.rest.*; /** * Widget that places a powered-by-Juneau message on the page. + * * <p> * The variable it resolves is <js>"$W{poweredByJuneau}"</js>. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/widget/QueryWidget.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/QueryWidget.java b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/QueryWidget.java index fcfba72..c0efeb2 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/QueryWidget.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/QueryWidget.java @@ -18,6 +18,7 @@ import org.apache.juneau.rest.converters.*; /** * Adds a <code>QUERY</code> link to the page that allows you to perform search/view/sort/paging on the page data. + * * <p> * A typical usage of the query widget is to include it as a navigation link as shown in the example below * pulled from the <code>PetStoreResource</code> example: @@ -31,20 +32,23 @@ import org.apache.juneau.rest.converters.*; * ) * ) * </p> + * * <p> * In the above example, this adds a <code>QUERY</code> that displays a search popup that can be used for filtering the * page results... - * <p> * <img class='bordered' src='doc-files/PetStore_Query.png'> + * * <p> * Tooltips are provided by hovering over the field names. - * <p> * <img class='bordered' src='doc-files/PetStore_Query_tooltip.png'> + * * <p> * When submitted, the form submits a GET request against the current URI with special GET search API query parameters. * (e.g. <js>"?s=column1=Foo*&v=column1,column2&o=column1,column2-&p=100&l=100"</js>). + * * <p> * The search arguments can be retrieved programmatically using {@link RequestQuery#getSearchArgs()}. + * * <p> * Typically, the search functionality is implemented by applying the predefined {@link Queryable} converter on the * method that's returning a 2-dimensional table of POJOs that you wish to filter: @@ -56,6 +60,7 @@ import org.apache.juneau.rest.converters.*; * ) * <jk>public</jk> Collection<Pet> getPets() { * </p> + * * <p> * The following shows various search arguments and their results on the page: * <table style='width:auto'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/widget/Widget.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/Widget.java b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/Widget.java index 281636a..9ef5fb6 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/Widget.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/Widget.java @@ -17,6 +17,7 @@ import org.apache.juneau.rest.annotation.*; /** * Defines an interface for defining resolvers for <js>"$W{...}"</js> string variables. + * * <p> * Widgets are associated with resources through the following * <ul> @@ -30,8 +31,9 @@ public abstract class Widget { /** * The widget key (i.e. The contents of the <js>"$W{...}"</js> variable). * - * @return The widget key. - * Must not be <jk>null</jk>. + * @return + * The widget key. + * Must not be <jk>null</jk>. */ public abstract String getName(); http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 8206b49..e5f9e96 100644 --- a/pom.xml +++ b/pom.xml @@ -177,7 +177,7 @@ <overview>${basedir}/juneau-core/src/main/javadoc/overview.html</overview> <stylesheetfile>${basedir}/juneau-core/src/main/javadoc/javadoc.css</stylesheetfile> <use>false</use> - <additionalparam>-sourcetab 3 -notimestamp -Xdoclint:none</additionalparam> + <additionalparam>-sourcetab 3 -notimestamp -Xdoclint:none --allow-script-in-comments</additionalparam> <verbose>false</verbose> <excludePackageNames>*proto*:*samples*:*examples*:*test*</excludePackageNames> <linksource>true</linksource>
