http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletDefault.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletDefault.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletDefault.java index fe3450c..d5348e9 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletDefault.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletDefault.java @@ -92,11 +92,6 @@ import org.apache.juneau.xml.*; * <td class='code'>text/plain</td> * <td>{@link PlainTextSerializer}</td> * </tr> - * <tr> - * <td class='code'>application/x-java-serialized-object</td> - * <td class='code'>application/x-java-serialized-object</td> - * <td>{@link JsoSerializer}</td> - * </tr> * </table> * <p> * Supports the following request <code>Content-Type</code> header values: @@ -132,25 +127,33 @@ import org.apache.juneau.xml.*; * </tr> * </table> * <p> - * It should be noted that we do NOT add {@link JsoParser} to the list of parsers since this could - * cause security issues. Use caution when using this particular parser as it could inadvertantly cause - * code execution security holes. + * It should be noted that we do NOT add {@link JsoParser} to the list of parsers since this could cause security + * issues. + * Use caution when using this particular parser as it could inadvertently cause code execution security holes. * <p> - * The list of serializers and parsers can be appended to using the {@link RestResource#serializers() @RestResource.serializers()} - * and {@link RestResource#parsers() @RestResource.parsers()} annotations on subclasses. + * The list of serializers and parsers can be appended to using the + * {@link RestResource#serializers() @RestResource.serializers()} and + * {@link RestResource#parsers() @RestResource.parsers()} annotations on subclasses. * <p> - * This subclass also provides a default OPTIONS page by implementing a {@link #getOptions(RestRequest)} that returns a POJO consisting - * of beans describing the class. + * This subclass also provides a default OPTIONS page by implementing a {@link #getOptions(RestRequest)} that returns a + * POJO consisting of beans describing the class. * <img class='bordered' src='doc-files/OptionsPage.png'> * <p> * The OPTIONS page can be modified or augmented by overriding this method and providing your own data. * * <h6 class='topic'>Other Notes</h6> * <ul class='spaced-list'> - * <li>Provides a default HTML stylesheet by setting {@link RestResource#stylesheet() @RestResource.stylesheet()} to <js>"styles/juneau.css"</js>. - * <li>Provides a default favicon by setting {@link RestResource#favicon() @RestResource.favicon()} to <js>"juneau.ico"</js>. - * <li>Provides a default classpath entry "htdocs" by setting {@link RestResource#staticFiles() @RestResource.staticFiles()} to <js>"{htdocs:'htdocs'}"</js>. - * This allows files inside the <code>[servletPackage].htdocs</code> package to be served up under the URL <code>/servletPath/htdocs</code>. + * <li> + * Provides a default HTML stylesheet by setting {@link RestResource#stylesheet() @RestResource.stylesheet()} + * to <js>"styles/juneau.css"</js>. + * <li> + * Provides a default favicon by setting {@link RestResource#favicon() @RestResource.favicon()} to + * <js>"juneau.ico"</js>. + * <li> + * Provides a default classpath entry "htdocs" by setting + * {@link RestResource#staticFiles() @RestResource.staticFiles()} to <js>"{htdocs:'htdocs'}"</js>. + * This allows files inside the <code>[servletPackage].htdocs</code> package to be served up under the URL + * <code>/servletPath/htdocs</code>. * </ul> */ @RestResource(
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-rest/src/main/java/org/apache/juneau/rest/RestUtils.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestUtils.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestUtils.java index f39a2ff..0d3dddb 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestUtils.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestUtils.java @@ -76,7 +76,7 @@ public final class RestUtils { * Identical to {@link HttpServletRequest#getPathInfo()} but doesn't decode encoded characters. * * @param req The HTTP request - * @return The undecoded path info. + * @return The un-decoded path info. */ public static String getPathInfoUndecoded(HttpServletRequest req) { String requestURI = req.getRequestURI(); http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-rest/src/main/java/org/apache/juneau/rest/StreamResource.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/StreamResource.java b/juneau-rest/src/main/java/org/apache/juneau/rest/StreamResource.java index 525055d..ebfa1be 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/StreamResource.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/StreamResource.java @@ -25,8 +25,8 @@ import org.apache.juneau.rest.response.*; /** * Represents the contents of a byte stream file with convenience methods for adding HTTP response headers. * <p> - * The purpose of this class is to maintain an in-memory reusable byte array of a streamed resource for - * the fastest possible streaming. + * The purpose of this class is to maintain an in-memory reusable byte array of a streamed resource for the fastest + * possible streaming. * Therefore, this object is designed to be reused and thread-safe. * <p> * This class is handled special by the {@link StreamableHandler} class. @@ -40,6 +40,7 @@ public class StreamResource implements Streamable { /** * Constructor. + * * @param mediaType The resource media type. * @param contents The resource contents. * <br>If multiple contents are specified, the results will be concatenated. @@ -59,6 +60,7 @@ public class StreamResource implements Streamable { /** * Constructor. + * * @param mediaType The resource media type. * @param headers The HTTP response headers for this streamed resource. * @param contents The resource contents. @@ -113,6 +115,7 @@ public class StreamResource implements Streamable { /** * Specifies the resource media type string. + * * @param mediaType The resource media type string. * @return This object (for method chaining). */ @@ -123,6 +126,7 @@ public class StreamResource implements Streamable { /** * Specifies the resource media type string. + * * @param mediaType The resource media type string. * @return This object (for method chaining). */ @@ -190,6 +194,7 @@ public class StreamResource implements Streamable { /** * Get the HTTP response headers. + * * @return The HTTP response headers. An unmodifiable map. Never <jk>null</jk>. */ public Map<String,String> getHeaders() { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-rest/src/main/java/org/apache/juneau/rest/UrlPathPattern.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/UrlPathPattern.java b/juneau-rest/src/main/java/org/apache/juneau/rest/UrlPathPattern.java index 1d97933..41bc08d 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/UrlPathPattern.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/UrlPathPattern.java @@ -77,9 +77,8 @@ public final class UrlPathPattern implements Comparable<UrlPathPattern> { * Returns a non-<jk>null</jk> value if the specified path matches this pattern. * * @param path The path to match against. - * @return An array of values matched against <js>"{var}"</js> variable in the pattern, - * or an empty array if the pattern matched but no vars were present, or <jk>null</jk> - * if the specified path didn't match the pattern. + * @return An array of values matched against <js>"{var}"</js> variable in the pattern, or an empty array if the + * pattern matched but no vars were present, or <jk>null</jk> if the specified path didn't match the pattern. */ protected String[] match(String path) { @@ -172,6 +171,7 @@ public final class UrlPathPattern implements Comparable<UrlPathPattern> { /** * Bean property getter: <property>vars</property>. + * * @return The value of the <property>vars</property> property on this bean, or <jk>null</jk> if it is not set. */ public String[] getVars() { @@ -180,6 +180,7 @@ public final class UrlPathPattern implements Comparable<UrlPathPattern> { /** * Bean property getter: <property>patternString</property>. + * * @return The value of the <property>patternString</property> property on this bean, or <jk>null</jk> if it is not set. */ public String getPatternString() { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Body.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Body.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Body.java index 8641e60..2022bf6 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Body.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Body.java @@ -19,8 +19,8 @@ import java.io.*; import java.lang.annotation.*; /** - * Annotation that can be applied to a parameter of a {@link RestMethod} annotated method - * to identify it as the HTTP request body converted to a POJO. + * Annotation that can be applied to a parameter of a {@link RestMethod} annotated method to identify it as the HTTP + * request body converted to a POJO. * * <h5 class='section'>Example:</h5> * <p class='bcode'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/FormData.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/FormData.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/FormData.java index 56187b0..1cfa491 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/FormData.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/FormData.java @@ -20,8 +20,8 @@ import java.lang.annotation.*; import org.apache.juneau.rest.*; /** - * Annotation that can be applied to a parameter of a {@link RestMethod} annotated method - * to identify it as a form post entry converted to a POJO. + * Annotation that can be applied to a parameter of a {@link RestMethod} annotated method to identify it as a form post + * entry converted to a POJO. * * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -47,11 +47,11 @@ import org.apache.juneau.rest.*; * <h6 class='topic'>Important note concerning FORM posts</h6> * <p> * This annotation should not be combined with the {@link Body @Body} annotation or {@link RestRequest#getBody()} method - * for <code>application/x-www-form-urlencoded POST</code> posts, since it will trigger the underlying servlet - * API to parse the body content as key-value pairs resulting in empty content. + * for <code>application/x-www-form-urlencoded POST</code> posts, since it will trigger the underlying servlet + * API to parse the body content as key-value pairs resulting in empty content. * <p> - * The {@link Query @Query} annotation can be used to retrieve a URL parameter - * in the URL string without triggering the servlet to drain the body content. + * The {@link Query @Query} annotation can be used to retrieve a URL parameter in the URL string without triggering the + * servlet to drain the body content. */ @Documented @Target(PARAMETER) @@ -88,12 +88,16 @@ public @interface FormData { * <p> * Possible values: * <ul class='spaced-list'> - * <li><js>"UON"</js> - URL-Encoded Object Notation.<br> - * This notation allows for request parameters to contain arbitrarily complex POJOs. - * <li><js>"PLAIN"</js> - Plain text.<br> - * This treats request parameters as plain text.<br> - * Only POJOs directly convertable from <l>Strings</l> can be represented in parameters when using this mode. - * <li><js>"INHERIT"</js> (default) - Inherit from the {@link RestContext#REST_paramFormat} property on the servlet method or class. + * <li> + * <js>"UON"</js> - URL-Encoded Object Notation. + * <br>This notation allows for request parameters to contain arbitrarily complex POJOs. + * <li> + * <js>"PLAIN"</js> - Plain text. + * <br>This treats request parameters as plain text. + * <br>Only POJOs directly convertible from <l>Strings</l> can be represented in parameters when using this mode. + * <li> + * <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 http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasFormData.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasFormData.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasFormData.java index a68030a..150c2fb 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasFormData.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasFormData.java @@ -20,8 +20,8 @@ import java.lang.annotation.*; import org.apache.juneau.rest.*; /** - * Annotation that can be applied to a parameter of a {@link RestMethod} annotated method - * to identify whether or not the request has the specified multipart form POST parameter. + * Annotation that can be applied to a parameter of a {@link RestMethod} annotated method to identify whether or not + * the request has the specified multipart form POST parameter. * <p> * Note that this can be used to detect the existence of a parameter when it's not set to a particular value. * @@ -75,11 +75,11 @@ import org.apache.juneau.rest.*; * <h6 class='topic'>Important note concerning FORM posts</h6> * <p> * This annotation should not be combined with the {@link Body @Body} annotation or {@link RestRequest#getBody()} method - * for <code>application/x-www-form-urlencoded POST</code> posts, since it will trigger the underlying servlet API to parse the body - * content as key-value pairs, resulting in empty content. + * for <code>application/x-www-form-urlencoded POST</code> posts, since it will trigger the underlying servlet API to + * parse the body content as key-value pairs, resulting in empty content. * <p> - * The {@link HasQuery @HasQuery} annotation can be used to check for the existing of a URL parameter - * in the URL string without triggering the servlet to drain the body content. + * The {@link HasQuery @HasQuery} annotation can be used to check for the existing of a URL parameter in the URL string + * without triggering the servlet to drain the body content. */ @Documented @Target(PARAMETER) http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasQuery.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasQuery.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasQuery.java index f1bf5ee..d874a95 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasQuery.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasQuery.java @@ -20,13 +20,13 @@ import java.lang.annotation.*; import org.apache.juneau.rest.*; /** - * Identical to {@link HasFormData @HasFormData}, but only checks the existing of the parameter in the - * URL string, not URL-encoded form posts. + * Identical to {@link HasFormData @HasFormData}, but only checks the existing of the parameter in the URL string, not + * URL-encoded form posts. * <p> * Unlike {@link HasFormData @HasFormData}, using this annotation does not result in the servlet reading the contents - * of URL-encoded form posts. - * Therefore, this annotation can be used in conjunction with the {@link Body @Body} annotation - * or {@link RestRequest#getBody()} method for <code>application/x-www-form-urlencoded POST</code> calls. + * of URL-encoded form posts. + * Therefore, this annotation can be used in conjunction with the {@link Body @Body} annotation or + * {@link RestRequest#getBody()} method for <code>application/x-www-form-urlencoded POST</code> calls. * * <h5 class='section'>Example:</h5> * <p class='bcode'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Header.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Header.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Header.java index 8f98d50..6f0ee4f 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Header.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Header.java @@ -18,8 +18,8 @@ import static java.lang.annotation.RetentionPolicy.*; import java.lang.annotation.*; /** - * Annotation that can be applied to a parameter of a {@link RestMethod} annotated method - * to identify it as a HTTP request header converted to a POJO. + * Annotation that can be applied to a parameter of a {@link RestMethod} annotated method to identify it as a HTTP + * request header converted to a POJO. * * <h5 class='section'>Example:</h5> * <p class='bcode'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java index 5402a3a..ec2fe87 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java @@ -19,11 +19,11 @@ import org.apache.juneau.rest.*; /** * Contains all the configurable annotations for the {@link HtmlDocSerializer}. * <p> - * Used with {@link RestResource#htmldoc()} and {@link RestMethod#htmldoc()} to customize the HTML view of - * serialized POJOs. + * Used with {@link RestResource#htmldoc()} and {@link RestMethod#htmldoc()} to customize the HTML view of serialized + * POJOs. * <p> * All annotations specified here have no effect on any serializers other than {@link HtmlDocSerializer} and is - * provided as a shorthand method of for specifying configuration properties. + * provided as a shorthand method of for specifying configuration properties. * <p> * For example, the following two methods for defining the HTML document title are considered equivalent: * <p class='bcode'> @@ -41,7 +41,7 @@ import org.apache.juneau.rest.*; * </p> * <p> * The purpose of these annotation is to populate the HTML document view which by default consists of the following - * structure: + * structure: * <p class='bcode'> * <xt><html> * <head> @@ -79,7 +79,7 @@ public @interface HtmlDoc { * The format of this value is HTML (phrasing content only). * <p> * It gets wrapped in a <code><xt><h3> <xa>class</xa>=<xs>'title'</xs>></xt></code> element and then added - * to the <code><xt><header></code> section on the page. + * to the <code><xt><header></code> section on the page. * <p> * If not specified, the page title is pulled from one of the following locations: * <ol> @@ -105,7 +105,8 @@ public @interface HtmlDoc { * This annotation is ignored when the {@link #header()} annotation is specified. * </ul> * <p> - * The programmatic equivalent to this annotation are the {@link RestConfig#setHtmlTitle(String)}/{@link RestResponse#setHtmlTitle(Object)} methods. + * The programmatic equivalent to this annotation are the + * {@link RestConfig#setHtmlTitle(String)}/{@link RestResponse#setHtmlTitle(Object)} methods. */ String title() default ""; @@ -115,7 +116,7 @@ public @interface HtmlDoc { * The format of this value is HTML (phrasing content only). * <p> * It gets wrapped in a <code><xt><h5> <xa>class</xa>=<xs>'description'</xs>></xt></code> element and then - * added to the <code><xt><header></code> section on the page. + * added to the <code><xt><header></code> section on the page. * <p> * If not specified, the page title is pulled from one of the following locations: * <ol> @@ -143,7 +144,8 @@ public @interface HtmlDoc { * This annotation is ignored when the {@link #header()} annotation is specified. * </ul> * <p> - * The programmatic equivalent to this annotation are the {@link RestConfig#setHtmlDescription(String)}/{@link RestResponse#setHtmlDescription(Object)} methods. + * The programmatic equivalent to this annotation are the + * {@link RestConfig#setHtmlDescription(String)}/{@link RestResponse#setHtmlDescription(Object)} methods. */ String description() default ""; @@ -158,7 +160,8 @@ public @interface HtmlDoc { * <p> * A value of <js>"NONE"</js> can be used to force no value. * <p> - * The programmatic equivalent to this annotation are the {@link RestConfig#setHtmlBranding(String)}/{@link RestResponse#setHtmlBranding(Object)} methods. + * The programmatic equivalent to this annotation are the + * {@link RestConfig#setHtmlBranding(String)}/{@link RestResponse#setHtmlBranding(Object)} methods. */ String branding() default ""; @@ -168,8 +171,8 @@ public @interface HtmlDoc { * The format of this value is HTML. * <p> * The page header normally contains the title and description, but this value can be used to override the contents - * to be whatever you want. - * <p> + * to be whatever you want. + * * <h5 class='section'>Example:</h5> * <p class='bcode'> * <ja>@RestResource</ja>( @@ -185,7 +188,8 @@ public @interface HtmlDoc { * <p> * This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>). * <p> - * The programmatic equivalent to this annotation are the {@link RestConfig#setHtmlHeader(String)}/{@link RestResponse#setHtmlHeader(Object)} methods. + * The programmatic equivalent to this annotation are the + * {@link RestConfig#setHtmlHeader(String)}/{@link RestResponse#setHtmlHeader(Object)} methods. */ String header() default ""; @@ -193,10 +197,10 @@ public @interface HtmlDoc { * Sets the links in the HTML nav section. * <p> * The format of this value is a lax-JSON map of key/value pairs where the keys are the link text and the values are - * relative (to the servlet) or absolute URLs. + * relative (to the servlet) or absolute URLs. * <p> * The page links are positioned immediately under the title and text. - * <p> + * * <h5 class='section'>Example:</h5> * <p class='bcode'> * <ja>@RestResource</ja>( @@ -212,7 +216,8 @@ public @interface HtmlDoc { * <p> * This field can also use URIs of any support type in {@link UriResolver}. * <p> - * The programmatic equivalent to this annotation are the {@link RestConfig#setHtmlLinks(String)}/{@link RestResponse#setHtmlLinks(Object)} methods. + * The programmatic equivalent to this annotation are the + * {@link RestConfig#setHtmlLinks(String)}/{@link RestResponse#setHtmlLinks(Object)} methods. */ String links() default ""; @@ -224,7 +229,7 @@ public @interface HtmlDoc { * The nav section of the page contains the links. * <p> * The format of this value is HTML. - * <p> + * * <h5 class='section'>Example:</h5> * <p class='bcode'> * <ja>@RestResource</ja>( @@ -240,7 +245,8 @@ public @interface HtmlDoc { * <p> * A value of <js>"NONE"</js> can be used to force no value. * <p> - * The programmatic equivalent to this annotation are the {@link RestConfig#setHtmlNav(String)}/{@link RestResponse#setHtmlNav(Object)} methods. + * The programmatic equivalent to this annotation are the + * {@link RestConfig#setHtmlNav(String)}/{@link RestResponse#setHtmlNav(Object)} methods. */ String nav() default ""; @@ -250,7 +256,7 @@ public @interface HtmlDoc { * The format of this value is HTML. * <p> * The aside section typically floats on the right side of the page. - * <p> + * * <h5 class='section'>Example:</h5> * <p class='bcode'> * <ja>@RestResource</ja>( @@ -264,7 +270,8 @@ public @interface HtmlDoc { * <p> * A value of <js>"NONE"</js> can be used to force no value. * <p> - * The programmatic equivalent to this annotation are the {@link RestConfig#setHtmlAside(String)}/{@link RestResponse#setHtmlAside(Object)} methods. + * The programmatic equivalent to this annotation are the + * {@link RestConfig#setHtmlAside(String)}/{@link RestResponse#setHtmlAside(Object)} methods. */ String aside() default ""; @@ -274,7 +281,7 @@ public @interface HtmlDoc { * The format of this value is HTML. * <p> * The footer section typically floats on the bottom of the page. - * <p> + * * <h5 class='section'>Example:</h5> * <p class='bcode'> * <ja>@RestResource</ja>( @@ -288,7 +295,8 @@ public @interface HtmlDoc { * <p> * A value of <js>"NONE"</js> can be used to force no value. * <p> - * The programmatic equivalent to this annotation are the {@link RestConfig#setHtmlFooter(String)}/{@link RestResponse#setHtmlFooter(Object)} methods. + * The programmatic equivalent to this annotation are the + * {@link RestConfig#setHtmlFooter(String)}/{@link RestResponse#setHtmlFooter(Object)} methods. */ String footer() default ""; @@ -296,7 +304,7 @@ public @interface HtmlDoc { * Sets the HTML CSS style section contents. * <p> * The format of this value is CSS. - * <p> + * * <h5 class='section'>Example:</h5> * <p class='bcode'> * <ja>@RestResource</ja>( @@ -310,7 +318,8 @@ public @interface HtmlDoc { * <p> * A value of <js>"NONE"</js> can be used to force no value. * <p> - * The programmatic equivalent to this annotation are the {@link RestConfig#setHtmlCss(String)}/{@link RestResponse#setHtmlCss(Object)} methods. + * The programmatic equivalent to this annotation are the + * {@link RestConfig#setHtmlCss(String)}/{@link RestResponse#setHtmlCss(Object)} methods. */ String css() default ""; @@ -322,7 +331,7 @@ public @interface HtmlDoc { * Specifies the URL to the stylesheet to add as a link in the style tag in the header. * <p> * The format of this value is CSS. - * <p> + * * <h5 class='section'>Example:</h5> * <p class='bcode'> * <ja>@RestResource</ja>( @@ -333,9 +342,10 @@ public @interface HtmlDoc { * </p> * <p> * This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>) and can use URL protocols defined - * by {@link UriResolver}. + * by {@link UriResolver}. * <p> - * The programmatic equivalent to this annotation are the {@link RestConfig#setHtmlCssUrl(String)}/{@link RestResponse#setHtmlCssUrl(Object)} methods. + * The programmatic equivalent to this annotation are the + * {@link RestConfig#setHtmlCssUrl(String)}/{@link RestResponse#setHtmlCssUrl(Object)} methods. */ String cssUrl() default "servlet:/style.css"; @@ -354,11 +364,11 @@ public @interface HtmlDoc { /** * Specifies the template class to use for rendering the HTML page. * <p> - * By default, uses {@link HtmlDocTemplateBasic} to render the contents, although you can provide - * your own custom renderer or subclasses from the basic class to have full control over how the page is - * rendered. + * By default, uses {@link HtmlDocTemplateBasic} to render the contents, although you can provide your own custom + * renderer or subclasses from the basic class to have full control over how the page is rendered. * <p> - * The programmatic equivalent to this annotation are the {@link RestConfig#setHtmlTemplate(Class)}/{@link RestResponse#setHtmlTemplate(Class)} methods. + * The programmatic equivalent to this annotation are the + * {@link RestConfig#setHtmlTemplate(Class)}/{@link RestResponse#setHtmlTemplate(Class)} methods. */ Class<? extends HtmlDocTemplate> template() default HtmlDocTemplate.class; } http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Inherit.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Inherit.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Inherit.java index 7d49865..0a1f546 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Inherit.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Inherit.java @@ -14,7 +14,7 @@ package org.apache.juneau.rest.annotation; /** * Inheritance values for the {@link RestMethod#serializersInherit()} and {@link RestMethod#parsersInherit()} - * annotations. + * annotations. */ public enum Inherit { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Messages.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Messages.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Messages.java index 4cf84f3..30e014a 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Messages.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Messages.java @@ -21,8 +21,8 @@ import java.util.*; import org.apache.juneau.utils.*; /** - * Annotation that can be applied to a parameter of a {@link RestMethod} annotated method - * to identify it as the resource bundle for the request locale. + * Annotation that can be applied to a parameter of a {@link RestMethod} annotated method to identify it as the + * resource bundle for the request locale. * <p> * Parameter type must be either {@link ResourceBundle} or {@link MessageBundle}. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Method.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Method.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Method.java index aab6843..327a70c 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Method.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Method.java @@ -18,8 +18,8 @@ import static java.lang.annotation.RetentionPolicy.*; import java.lang.annotation.*; /** - * Annotation that can be applied to a parameter of a {@link RestMethod} annotated method - * to identify it as the HTTP method. + * Annotation that can be applied to a parameter of a {@link RestMethod} annotated method to identify it as the HTTP + * method. * <p> * Typically used for HTTP method handlers of type <js>"*"</js> (i.e. handle all requests). * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/MethodSwagger.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/MethodSwagger.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/MethodSwagger.java index c7cb743..b63fd8b 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/MethodSwagger.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/MethodSwagger.java @@ -30,8 +30,10 @@ public @interface MethodSwagger { * } * </p> * <p> - * The default value pulls the description from the <code>(className.?)[javaMethodName].externalDocs</code> entry in the servlet resource bundle. - * (e.g. <js>"MyClass.myMethod.externalDocs = {url:'http://juneau.apache.org'}"</js> or <js>"myMethod.externalDocs = {url:'http://juneau.apache.org'}"</js>). + * The default value pulls the description from the <code>(className.?)[javaMethodName].externalDocs</code> entry in + * the servlet resource bundle. + * (e.g. <js>"MyClass.myMethod.externalDocs = {url:'http://juneau.apache.org'}"</js> or + * <js>"myMethod.externalDocs = {url:'http://juneau.apache.org'}"</js>). * * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -56,8 +58,9 @@ public @interface MethodSwagger { * A comma-delimited list of tags for API documentation control. * Tags can be used for logical grouping of operations by resources or any other qualifier. * <p> - * The default value pulls the description from the <code>(className.?)[javaMethodName].tags</code> entry in the servlet resource bundle. - * (e.g. <js>"MyClass.myMethod.tags = foo,bar"</js> or <js>"myMethod.tags = foo,bar"</js>). + * The default value pulls the description from the <code>(className.?)[javaMethodName].tags</code> entry in the + * servlet resource bundle. + * (e.g. <js>"MyClass.myMethod.tags = foo,bar"</js> or <js>"myMethod.tags = foo,bar"</js>). * * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -79,8 +82,9 @@ public @interface MethodSwagger { * <p> * Used to populate the Swagger deprecated field. * <p> - * The default value pulls the description from the <code>(className.?)[javaMethodName].deprecated</code> entry in the servlet resource bundle. - * (e.g. <js>"MyClass.myMethod.deprecated = true"</js> or <js>"myMethod.deprecated = foo,bar"</js>). + * The default value pulls the description from the <code>(className.?)[javaMethodName].deprecated</code> entry in + * the servlet resource bundle. + * (e.g. <js>"MyClass.myMethod.deprecated = true"</js> or <js>"myMethod.deprecated = foo,bar"</js>). * * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -100,8 +104,8 @@ public @interface MethodSwagger { /** * Optional parameter descriptions. * <p> - * This annotation is provided for documentation purposes and is used to populate the method <js>"parameters"</js> column - * on the Swagger page. + * This annotation is provided for documentation purposes and is used to populate the method <js>"parameters"</js> + * column on the Swagger page. * * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -118,8 +122,8 @@ public @interface MethodSwagger { * ) * ) * </p> - * This is functionally equivalent to specifying the following keys in the resource bundle for the class, except in this case - * the strings are internationalized. + * This is functionally equivalent to specifying the following keys in the resource bundle for the class, except in + * this case the strings are internationalized. * <p class='bcode'> * <jk>MyClass.myMethod.description</jk> = <js>This is my method.</js> * <jk>MyClass.myMethod.req.path.a.description</jk> = <js>The 'a' attribute</js> @@ -127,8 +131,8 @@ public @interface MethodSwagger { * <jk>MyClass.myMethod.req.body.description</jk> = <js>The HTTP content</js> * <jk>MyClass.myMethod.req.header.d.description</jk> = <js>The 'D' header</js> * <p> - * As a general rule, use annotations when you don't care about internationalization (i.e. you only want to support English), - * and use resource bundles if you need to support localization. + * As a general rule, use annotations when you don't care about internationalization (i.e. you only want to support + * English), and use resource bundles if you need to support localization. * <p> * These annotations can contain variables (e.g. "$L{my.localized.variable}"). * <p> @@ -139,8 +143,8 @@ public @interface MethodSwagger { /** * Optional output description. * <p> - * This annotation is provided for documentation purposes and is used to populate the method <js>"responses"</js> column - * on the Swagger page. + * This annotation is provided for documentation purposes and is used to populate the method <js>"responses"</js> + * column on the Swagger page. * * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -160,18 +164,17 @@ public @interface MethodSwagger { * ) * ) * </p> - * This is functionally equivalent to specifying the following keys in the resource bundle for the class, except in this case - * the strings are internationalized. + * This is functionally equivalent to specifying the following keys in the resource bundle for the class, except in + * this case the strings are internationalized. * <p class='bcode'> * <jk>MyClass.myMethod.res.200.description</jk> = <js>OK</js> * <jk>MyClass.myMethod.res.302.description</jk> = <js>Thing wasn't found here</js> * <jk>MyClass.myMethod.res.302.header.Location.description</jk> = <js>The place to find the thing</js> * <p> - * As a general rule, use annotations when you don't care about internationalization (i.e. you only want to support English), - * and use resource bundles if you need to support localization. + * As a general rule, use annotations when you don't care about internationalization (i.e. you only want to support + * English), and use resource bundles if you need to support localization. * <p> * These annotations can contain variables (e.g. "$L{my.localized.variable}"). */ Response[] responses() default {}; - } http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Parameter.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Parameter.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Parameter.java index a5d10c8..3c1d935 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Parameter.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Parameter.java @@ -19,7 +19,7 @@ import java.lang.annotation.*; /** * Annotation used in conjunction with {@link MethodSwagger#parameters()} to identify content and header descriptions - * on specific method requests. + * on specific method requests. * * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -60,9 +60,11 @@ public @interface Parameter { * The name of the parameter (e.g. <js>"Content-Range"</js>). * <p> * Parameter names are case sensitive. - * If <code>in</code> is <js>"path"</js>, the name field MUST correspond to the associated path segment from the <code>path</code> field in - * the <a class="doclink" href="http://swagger.io/specification/#pathsObject">Paths Object</a>. - * See <a class="doclink" href="http://swagger.io/specification/#pathTemplating">Path Templating</a> for further information. + * If <code>in</code> is <js>"path"</js>, the name field MUST correspond to the associated path segment from the + * <code>path</code> field in the <a class="doclink" + * href="http://swagger.io/specification/#pathsObject">Paths Object</a>. + * See <a class="doclink" href="http://swagger.io/specification/#pathTemplating">Path Templating</a> for further + * information. * For all other cases, the name corresponds to the parameter name used based on the <code>in</code> property. */ String name() default ""; @@ -72,10 +74,12 @@ public @interface Parameter { * <p> * A brief description of the parameter. * This could contain examples of use. - * <a class="doclink" href="https://help.github.com/articles/github-flavored-markdown">GFM syntax</a> can be used for rich text representation. + * <a class="doclink" href="https://help.github.com/articles/github-flavored-markdown">GFM syntax</a> can be used + * for rich text representation. * <p> * The default value pulls the description from the <code>description</code> entry in the servlet resource bundle. - * (e.g. <js>"myMethod.res.[code].[category].[name] = foo"</js> or <js>"MyServlet.myMethod.res.[code].[category].[name] = foo"</js>). + * (e.g. <js>"myMethod.res.[code].[category].[name] = foo"</js> or + * <js>"MyServlet.myMethod.res.[code].[category].[name] = foo"</js>). */ String description() default ""; @@ -92,7 +96,8 @@ public @interface Parameter { * <p> * Only applicable for <code>in</code> of type <js>"body"</js>. * <p> - * The schema is a JSON object specified <a class="doclink" href="http://swagger.io/specification/#schemaObject">here</a>. + * The schema is a JSON object specified <a class="doclink" + * href="http://swagger.io/specification/#schemaObject">here</a>. * * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -112,22 +117,26 @@ public @interface Parameter { /** * The type of the parameter. * <p> - * The value MUST be one of <js>"string"</js>, <js>"number"</js>, <js>"integer"</js>, <js>"boolean"</js>, <js>"array"</js> or <js>"file"</js>. - * If type is <js>"file"</js>, the consumes MUST be either <js>"multipart/form-data"</js>, <js>"application/x-www-form-urlencoded"</js> or both and the parameter MUST be in <js>"formData"</js>. + * The value MUST be one of <js>"string"</js>, <js>"number"</js>, <js>"integer"</js>, <js>"boolean"</js>, + * <js>"array"</js> or <js>"file"</js>. + * If type is <js>"file"</js>, the consumes MUST be either <js>"multipart/form-data"</js>, + * <js>"application/x-www-form-urlencoded"</js> or both and the parameter MUST be in <js>"formData"</js>. */ String type() default "string"; /** * The extending format for the previously mentioned <code>type</code>. * <p> - * See <a class="doclink" href="http://swagger.io/specification/#dataTypeFormat">Data Type Formats</a> for further details. + * See <a class="doclink" href="http://swagger.io/specification/#dataTypeFormat">Data Type Formats</a> for further + * details. */ String format() default ""; /** * Sets the ability to pass empty-valued parameters. * <p> - * This is valid only for either <code>query</code> or <code>formData</code> parameters and allows you to send a parameter with a name only or an empty value. + * This is valid only for either <code>query</code> or <code>formData</code> parameters and allows you to send a + * parameter with a name only or an empty value. * Default value is <jk>false</jk>. */ boolean allowEmptyValue() default false; @@ -164,7 +173,8 @@ public @interface Parameter { * <li><js>"ssv"</js> - space separated values <js>"foo bar"</js>. * <li><js>"tsv"</js> - tab separated values <js>"foo\tbar"</js>. * <li><js>"pipes"</js> - pipe separated values <js>"foo|bar"</js>. - * <li><js>"multi"</js> - corresponds to multiple parameter instances instead of multiple values for a single instance <js>"foo=bar&foo=baz"</js>. + * <li><js>"multi"</js> - corresponds to multiple parameter instances instead of multiple values for a single + * instance <js>"foo=bar&foo=baz"</js>. * This is valid only for parameters <code>in</code> <js>"query"</js> or <js>"formData"</js>. * </ul> * Default value is <js>"csv"</js>. @@ -174,9 +184,11 @@ public @interface Parameter { /** * Declares the value of the parameter that the server will use if none is provided. * <p> - * For example a "count" to control the number of results per page might default to 100 if not supplied by the client in the request. + * For example a "count" to control the number of results per page might default to 100 if not supplied by the + * client in the request. * (Note: "default" has no meaning for required parameters.) - * See <a class="doclink" href="http://json-schema.org/latest/json-schema-validation.html#anchor101">http://json-schema.org/latest/json-schema-validation.html#anchor101</a>. + * See <a class="doclink" href="http://json-schema.org/latest/json-schema-validation.html#anchor101"> + * http://json-schema.org/latest/json-schema-validation.html#anchor101</a>. * Unlike JSON Schema this value MUST conform to the defined <code>type</code> for this parameter. */ String _default() default ""; http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Path.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Path.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Path.java index 5385109..9a09497 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Path.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Path.java @@ -18,8 +18,8 @@ import static java.lang.annotation.RetentionPolicy.*; import java.lang.annotation.*; /** - * Annotation that can be applied to a parameter of a {@link RestMethod} annotated method - * to identify it as a variable in a URL path pattern converted to a POJO. + * Annotation that can be applied to a parameter of a {@link RestMethod} annotated method to identify it as a variable + * in a URL path pattern converted to a POJO. * * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -30,9 +30,9 @@ import java.lang.annotation.*; * } * </p> * <p> - * The <ja>@Path</ja> annotation is optional if the parameters are specified immediately - * following the <code>RestRequest</code> and <code>RestResponse</code> parameters, - * and are specified in the same order as the variables in the URL path pattern. + * The <ja>@Path</ja> annotation is optional if the parameters are specified immediately following the + * <code>RestRequest</code> and <code>RestResponse</code> parameters, and are specified in the same order as the + * variables in the URL path pattern. * The following example is equivalent to the previous example. * </p> * <p class='bcode'> @@ -43,11 +43,10 @@ import java.lang.annotation.*; * } * </p> * <p> - * If the order of parameters is not the default order shown above, the - * attribute names must be specified (since parameter names are lost during compilation). - * The following example is equivalent to the previous example, except - * the parameter order has been switched, requiring the use of the <ja>@Path</ja> - * annotations. + * If the order of parameters is not the default order shown above, the attribute names must be specified (since + * parameter names are lost during compilation). + * The following example is equivalent to the previous example, except the parameter order has been switched, requiring + * the use of the <ja>@Path</ja> annotations. * <p> * <p class='bcode'> * <ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/myurl/{foo}/{bar}/{baz}/*"</js>) http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/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 95f7f51..4287407 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 @@ -18,8 +18,8 @@ import static java.lang.annotation.RetentionPolicy.*; import java.lang.annotation.*; /** - * Annotation that can be applied to a parameter of a {@link RestMethod} annotated method - * to identify it as the URL parameter remainder after a path pattern match. + * Annotation that can be applied to a parameter of a {@link RestMethod} annotated method to identify it as the URL + * parameter remainder after a path pattern match. * * <h5 class='section'>Example:</h5> * <p class='bcode'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/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 a41a24c..b1ab9e0 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 @@ -20,8 +20,8 @@ import java.lang.annotation.*; import org.apache.juneau.*; /** - * Annotation that can be applied to a parameter of a {@link RestMethod} annotated method - * to identify the request-duration properties object for the current request. + * Annotation that can be applied to a parameter of a {@link RestMethod} annotated method to identify the + * request-duration properties object for the current request. * * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -42,7 +42,7 @@ import org.apache.juneau.*; * } * </p> * <p> - * ...or this... + * ...or this... * <p class='bcode'> * <ja>@RestMethod</ja>(name=<js>"GET"</js>) * <jk>public Person</jk> doGetPerson(RestResponse res) { @@ -52,10 +52,10 @@ import org.apache.juneau.*; * </p> * <p> * The parameter type can be one of the following: - * <ul> - * <li>{@link ObjectMap} - * <li><code>Map<String,Object></code> - * </ul> + * <ul> + * <li>{@link ObjectMap} + * <li><code>Map<String,Object></code> + * </ul> */ @Documented @Target(PARAMETER) http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/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 7e59b41..e48228a 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 @@ -40,8 +40,8 @@ import org.apache.juneau.xml.*; * <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...). + * 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/0d913b38/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 cf952a6..298b312 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 @@ -20,13 +20,13 @@ import java.lang.annotation.*; import org.apache.juneau.rest.*; /** - * Identical to {@link FormData @FormData}, but only retrieves the parameter from the - * URL string, not URL-encoded form posts. + * 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. - * Therefore, this annotation can be used in conjunction with the {@link Body @Body} annotation - * or {@link RestRequest#getBody()} method for <code>application/x-www-form-urlencoded POST</code> calls. + * Unlike {@link FormData @FormData}, using this annotation does not result in the servlet reading the contents of + * URL-encoded form posts. + * Therefore, this annotation can be used in conjunction with the {@link Body @Body} annotation or + * {@link RestRequest#getBody()} method for <code>application/x-www-form-urlencoded POST</code> calls. * * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -70,10 +70,10 @@ 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>. + * 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>. + * (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. */ @@ -84,16 +84,20 @@ public @interface Query { * <p> * Possible values: * <ul class='spaced-list'> - * <li><js>"UON"</js> - URL-Encoded Object Notation.<br> - * This notation allows for request parameters to contain arbitrarily complex POJOs. - * <li><js>"PLAIN"</js> - Plain text.<br> - * This treats request parameters as plain text.<br> - * Only POJOs directly convertable from <l>Strings</l> can be represented in parameters when using this mode. - * <li><js>"INHERIT"</js> (default) - Inherit from the {@link RestContext#REST_paramFormat} property on the servlet method or class. + * <li> + * <js>"UON"</js> - URL-Encoded Object Notation. + * <br>This notation allows for request parameters to contain arbitrarily complex POJOs. + * <li> + * <js>"PLAIN"</js> - Plain text. + * <br>This treats request parameters as plain text. + * <br>Only POJOs directly convertible from <l>Strings</l> can be represented in parameters when using this mode. + * <li> + * <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. + * <js>"foo"</js> when using UON mode. */ String format() default "INHERIT"; http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/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 0ce1eca..05f6b69 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 @@ -24,13 +24,14 @@ public @interface ResourceSwagger { * It is used to populate the Swagger terms-of-service field. * <p> * The default value pulls the description from the <code>termsOfService</code> entry in the servlet resource bundle. - * (e.g. <js>"termsOfService = foo"</js> or <js>"MyServlet.termsOfService = foo"</js>). + * (e.g. <js>"termsOfService = foo"</js> or <js>"MyServlet.termsOfService = foo"</js>). * <p> * This field can contain variables (e.g. "$L{my.localized.variable}"). * <p> * Corresponds to the swagger field <code>/info/termsOfService</code>. * <p> - * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getTermsOfService(RestRequest)} method. + * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getTermsOfService(RestRequest)} + * method. */ String termsOfService() default ""; @@ -49,7 +50,8 @@ public @interface ResourceSwagger { * </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 <js>"MyServlet.contact = {name:'John Smith',email:'[email protected]'}"</js>). + * (e.g. <js>"contact = {name:'John Smith',email:'[email protected]'}"</js> or + * <js>"MyServlet.contact = {name:'John Smith',email:'[email protected]'}"</js>). * * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -82,7 +84,8 @@ public @interface ResourceSwagger { * </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 <js>"MyServlet.license = {name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'}"</js>). + * (e.g. <js>"license = {name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'}"</js> or + * <js>"MyServlet.license = {name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'}"</js>). * * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -107,7 +110,7 @@ public @interface ResourceSwagger { * 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>). + * (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> @@ -137,7 +140,8 @@ 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 <js>"MyServlet.tags = [{name:'Foo',description:'Foobar'}]"</js>). + * (e.g. <js>"tags = [{name:'Foo',description:'Foobar'}]"</js> or + * <js>"MyServlet.tags = [{name:'Foo',description:'Foobar'}]"</js>). * * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -170,7 +174,8 @@ public @interface ResourceSwagger { * </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 <js>"MyServlet.externalDocs = {url:'http://juneau.apache.org'}"</js>). + * (e.g. <js>"externalDocs = {url:'http://juneau.apache.org'}"</js> or + * <js>"MyServlet.externalDocs = {url:'http://juneau.apache.org'}"</js>). * * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -185,9 +190,8 @@ public @interface ResourceSwagger { * <p> * Corresponds to the swagger field <code>/tags</code>. * <p> - * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getExternalDocs(RestRequest)} method. + * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getExternalDocs(RestRequest)} + * method. */ String externalDocs() default ""; - - } http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/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 1c1bd39..68c2634 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 @@ -52,7 +52,8 @@ 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>). + * (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> @@ -65,7 +66,8 @@ public @interface Response { * <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. - * As an extension to the <a class="doclink" href="http://swagger.io/specification/#schemaObject">Schema Object</a>, its root type value may also be <js>"file"</js>. + * As an extension to the <a class="doclink" href="http://swagger.io/specification/#schemaObject">Schema Object</a>, + * its root type value may also be <js>"file"</js>. * This SHOULD be accompanied by a relevant produces mime-type. * * <h5 class='section'>Example:</h5> @@ -85,7 +87,8 @@ 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 <js>"MyServlet.myMethod.res.[code].[category].[name] = foo"</js>). + * (e.g. <js>"myMethod.res.[code].[category].[name] = foo"</js> or + * <js>"MyServlet.myMethod.res.[code].[category].[name] = foo"</js>). */ Parameter[] headers() default {}; } http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/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 97624d3..003dece 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 @@ -45,22 +45,33 @@ public @interface RestMethod { * <p> * Besides the standard HTTP method names, the following can also be specified: * <ul> - * <li><js>"*"</js> - Denotes any method. + * <li> + * <js>"*"</js> + * - Denotes any method. * <br>Use this if you want to capture any HTTP methods in a single Java method. - * <br>The {@link Method @Method} annotation and/or {@link RestRequest#getMethod()} method can be used - * to distinguish the actual HTTP method name. - * <li><js>""</js> - Auto-detect. + * <br>The {@link Method @Method} annotation and/or {@link RestRequest#getMethod()} method can be used to + * distinguish the actual HTTP method name. + * <li> + * <js>""</js> + * - Auto-detect. * <br>The method name is determined based on the Java method name. - * <br>For example, if the method is <code>doPost(...)</code>, then the method name is automatically detected as <js>"POST"</js>. + * <br>For example, if the method is <code>doPost(...)</code>, then the method name is automatically detected + * as <js>"POST"</js>. * <br>Otherwise, defaults to <js>"GET"</js>. - * <li><js>"PROXY"</js> - Remote-proxy interface. - * <br>This denotes a Java method that returns an object (usually an interface, often annotated with the {@link Remoteable @Remoteable} annotation) - * to be used as a remote proxy using <code>RestClient.getRemoteableProxy(Class<T> interfaceClass, String url)</code>. + * <li> + * <js>"PROXY"</js> + * - Remote-proxy interface. + * <br>This denotes a Java method that returns an object (usually an interface, often annotated with the + * {@link Remoteable @Remoteable} annotation) to be used as a remote proxy using + * <code>RestClient.getRemoteableProxy(Class<T> interfaceClass, String url)</code>. * <br>This allows you to construct client-side interface proxies using REST as a transport medium. - * <br>Conceptually, this is simply a fancy <code>POST</code> against the url <js>"/{path}/{javaMethodName}"</js> where the arguments - * are marshalled from the client to the server as an HTTP body containing an array of objects, - * passed to the method as arguments, and then the resulting object is marshalled back to the client. - * <li>Anything else - Overloaded non-HTTP-standard names that are passed in through a <code>&method=methodName</code> URL parameter. + * <br>Conceptually, this is simply a fancy <code>POST</code> against the url <js>"/{path}/{javaMethodName}"</js> + * where the arguments are marshalled from the client to the server as an HTTP body containing an array of + * objects, passed to the method as arguments, and then the resulting object is marshalled back to the client. + * <li> + * Anything else + * - Overloaded non-HTTP-standard names that are passed in through a <code>&method=methodName</code> URL + * parameter. * </ul> */ String name() default ""; @@ -68,9 +79,10 @@ 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 pattern is not found. + * 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 + * pattern is not found. * <p> * The path can contain variables that get resolved to {@link Path @Path} parameters: * <p class='bcode'> @@ -90,8 +102,7 @@ public @interface RestMethod { * <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. + * By default, it's <code>0</code>, which means it will use an internal heuristic to determine a best match. */ int priority() default 0; @@ -101,8 +112,8 @@ public @interface RestMethod { * 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. + * 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. */ Class<? extends RestGuard>[] guards() default {}; @@ -110,12 +121,13 @@ 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. + * 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. + * Default converters are available in the <a class='doclink' + * href='../converters/package-summary.html#TOC'>org.apache.juneau.rest.converters</a> package. */ Class<? extends RestConverter>[] converters() default {}; @@ -124,8 +136,8 @@ public @interface RestMethod { * <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. + * 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. */ @@ -134,9 +146,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. + * 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>. + * To append to the list of serializers assigned at the servlet level, use + * <code>serializersInherit=<jsf>SERIALIZERS</jsf></code>. * * <p class='bcode'> * <jk>public class</jk> MyResource <jk>extends</jk> RestServlet { @@ -156,7 +170,8 @@ public @interface RestMethod { Class<? extends Serializer>[] serializers() default {}; /** - * Used in conjunction with {@link #serializers()} to identify what class-level settings are inherited by the method serializer group. + * Used in conjunction with {@link #serializers()} to identify what class-level settings are inherited by the method + * serializer group. * <p> * Possible values: * <ul> @@ -180,9 +195,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. + * 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>. + * To append to the list of serializers assigned at the servlet level, use + * <code>serializersInherit=<jsf>SERIALIZERS</jsf></code>. * * <p class='bcode'> * <jk>public class</jk> MyResource <jk>extends</jk> RestServlet { @@ -202,7 +219,8 @@ public @interface RestMethod { Class<? extends Parser>[] parsers() default {}; /** - * Used in conjunction with {@link #parsers()} to identify what class-level settings are inherited by the method parser group. + * Used in conjunction with {@link #parsers()} to identify what class-level settings are inherited by the method + * parser group. * <p> * Possible values: * <ul> @@ -225,7 +243,8 @@ 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. + * 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. * @@ -243,7 +262,8 @@ 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>. + * 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>. */ Class<? extends Encoder>[] encoders() default {}; @@ -255,7 +275,8 @@ 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. + * This is equivalent to simply calling <code>res.addProperties()</code> in the Java method, but is provided for + * convenience. */ Property[] properties() default {}; @@ -280,10 +301,10 @@ 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. + * 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: + * and our detail view is a single bean where we want to expose different fields: * <p class='bcode'> * <jc>// Our bean</jc> * <jk>public class</jk> MyBean { @@ -306,9 +327,12 @@ public @interface RestMethod { * </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 ""; @@ -316,7 +340,7 @@ public @interface RestMethod { * 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. + * serialization. * <p> * In the example below, our 'summary' view is a list of beans where we want to exclude some properties: * <p class='bcode'> @@ -341,9 +365,12 @@ public @interface RestMethod { * </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 ""; @@ -354,8 +381,8 @@ public @interface RestMethod { * <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. + * 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> @@ -400,7 +427,8 @@ public @interface RestMethod { * <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. + * Affects values returned by {@link RestRequest#getFormData(String)} when the parameter is not present on the + * request. * * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -420,13 +448,16 @@ public @interface RestMethod { * <p> * This summary is used in the following locations: * <ul class='spaced-list'> - * <li>The value returned by {@link RestRequest#getMethodSummary()}. - * <li>The <js>"$R{methodSummary}"</js> variable. - * <li>The summary of the method in the Swagger page. + * <li> + * The value returned by {@link RestRequest#getMethodSummary()}. + * <li> + * The <js>"$R{methodSummary}"</js> variable. + * <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>). + * 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> @@ -439,13 +470,17 @@ public @interface RestMethod { * <p> * This description is used in the following locations: * <ul class='spaced-list'> - * <li>The value returned by {@link RestRequest#getMethodDescription()}. - * <li>The <js>"$R{methodDescription}"</js> variable. - * <li>The description of the method in the Swagger page. + * <li> + * The value returned by {@link RestRequest#getMethodDescription()}. + * <li> + * The <js>"$R{methodDescription}"</js> variable. + * <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>). + * 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> @@ -456,11 +491,11 @@ 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>. + * 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. + * 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> @@ -486,7 +521,8 @@ 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. + * It's common to combine the client version with transforms that will convert new POJOs into older POJOs for + * backwards compatibility. * <p class='bcode'> * <jc>// Call this method if X-Client-Version is at least 2.0.</jc> * <ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/foobar"</js>, clientVersion=<js>"2.0"</js>) @@ -500,7 +536,8 @@ public @interface RestMethod { * <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. + * Note that in the previous example, we're returning the exact same POJO, but using a transform to convert it into + * an older form. * The old method could also just return back a completely different object. * The range can be any of the following: * <ul> @@ -513,7 +550,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. + * generate arbitrary replacement text. * <p> * Widgets are inherited from parent to child, but can be overridden by reusing the widget name. */
