You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2017/02/24 22:15:26 UTC
[3/9] incubator-juneau git commit: Clean up javadocs
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ef1ead8e/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java
----------------------------------------------------------------------
diff --git a/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java
index 5fbf663..b3c33a5 100644
--- a/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java
+++ b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java
@@ -36,9 +36,9 @@ import org.apache.juneau.utils.*;
/**
* Represents a connection to a remote REST resource.
* <p>
- * Instances of this class are created by the various {@code doX()} methods on the {@link RestClient} class.
+ * Instances of this class are created by the various {@code doX()} methods on the {@link RestClient} class.
* <p>
- * This class uses only Java standard APIs. Requests can be built up using a fluent interface with method chaining, like so...
+ * This class uses only Java standard APIs. Requests can be built up using a fluent interface with method chaining, like so...
*
* <p class='bcode'>
* RestClient client = <jk>new</jk> RestClient();
@@ -46,7 +46,7 @@ import org.apache.juneau.utils.*;
* MyBean b = c.getResponse(MyBean.<jk>class</jk>);
* </p>
* <p>
- * The actual connection and request/response transaction occurs when calling one of the <code>getResponseXXX()</code> methods.
+ * The actual connection and request/response transaction occurs when calling one of the <code>getResponseXXX()</code> methods.
*
* <h5 class='section'>Additional information:</h5>
* <ul>
@@ -93,13 +93,13 @@ public final class RestCall {
* Sets the input for this REST call.
*
* @param input The input to be sent to the REST resource (only valid for PUT and POST) requests. <br>
- * Can be of the following types:
- * <ul class='spaced-list'>
- * <li>{@link Reader} - Raw contents of {@code Reader} will be serialized to remote resource.
- * <li>{@link InputStream} - Raw contents of {@code InputStream} will be serialized to remote resource.
- * <li>{@link Object} - POJO to be converted to text using the {@link Serializer} registered with the {@link RestClient}.
- * <li>{@link HttpEntity} - Bypass Juneau serialization and pass HttpEntity directly to HttpClient.
- * </ul>
+ * Can be of the following types:
+ * <ul class='spaced-list'>
+ * <li>{@link Reader} - Raw contents of {@code Reader} will be serialized to remote resource.
+ * <li>{@link InputStream} - Raw contents of {@code InputStream} will be serialized to remote resource.
+ * <li>{@link Object} - POJO to be converted to text using the {@link Serializer} registered with the {@link RestClient}.
+ * <li>{@link HttpEntity} - Bypass Juneau serialization and pass HttpEntity directly to HttpClient.
+ * </ul>
* @return This object (for method chaining).
* @throws RestCallException If a retry was attempted, but the entity was not repeatable.
*/
@@ -133,7 +133,7 @@ public final class RestCall {
* @param retries The number of retries to attempt.
* @param interval The time in milliseconds between attempts.
* @param retryOn Optional object used for determining whether a retry should be attempted.
- * If <jk>null</jk>, uses {@link RetryOn#DEFAULT}.
+ * If <jk>null</jk>, uses {@link RetryOn#DEFAULT}.
* @return This object (for method chaining).
* @throws RestCallException If current entity is not repeatable.
*/
@@ -485,10 +485,10 @@ public final class RestCall {
/**
* Connects to the REST resource.
* <p>
- * If this is a <code>PUT</code> or <code>POST</code>, also sends the input to the remote resource.<br>
+ * If this is a <code>PUT</code> or <code>POST</code>, also sends the input to the remote resource.<br>
* <p>
- * Typically, you would only call this method if you're not interested in retrieving the body of the HTTP response.
- * Otherwise, you're better off just calling one of the {@link #getReader()}/{@link #getResponse(Class)}/{@link #pipeTo(Writer)}
+ * Typically, you would only call this method if you're not interested in retrieving the body of the HTTP response.
+ * Otherwise, you're better off just calling one of the {@link #getReader()}/{@link #getResponse(Class)}/{@link #pipeTo(Writer)}
* methods directly which automatically call this method already.
*
* @return This object (for method chaining).
@@ -578,12 +578,12 @@ public final class RestCall {
/**
* Connects to the remote resource (if <code>connect()</code> hasn't already been called) and returns the HTTP response message body as a reader.
* <p>
- * If an {@link Encoder} has been registered with the {@link RestClient}, then the underlying input stream
- * will be wrapped in the encoded stream (e.g. a <code>GZIPInputStream</code>).
+ * If an {@link Encoder} has been registered with the {@link RestClient}, then the underlying input stream
+ * will be wrapped in the encoded stream (e.g. a <code>GZIPInputStream</code>).
* <p>
- * If present, automatically handles the <code>charset</code> value in the <code>Content-Type</code> response header.
+ * If present, automatically handles the <code>charset</code> value in the <code>Content-Type</code> response header.
* <p>
- * <b>IMPORTANT:</b> It is your responsibility to close this reader once you have finished with it.
+ * <b>IMPORTANT:</b> It is your responsibility to close this reader once you have finished with it.
*
* @return The HTTP response message body reader. <jk>null</jk> if response was successful but didn't contain a body (e.g. HTTP 204).
* @throws IOException If an exception occurred while streaming was already occurring.
@@ -681,10 +681,10 @@ public final class RestCall {
/**
* Connects to the remote resource (if <code>connect()</code> hasn't already been called) and returns the HTTP response message body as an input stream.
* <p>
- * If an {@link Encoder} has been registered with the {@link RestClient}, then the underlying input stream
- * will be wrapped in the encoded stream (e.g. a <code>GZIPInputStream</code>).
+ * If an {@link Encoder} has been registered with the {@link RestClient}, then the underlying input stream
+ * will be wrapped in the encoded stream (e.g. a <code>GZIPInputStream</code>).
* <p>
- * <b>IMPORTANT:</b> It is your responsibility to close this reader once you have finished with it.
+ * <b>IMPORTANT:</b> It is your responsibility to close this reader once you have finished with it.
*
* @return The HTTP response message body input stream. <jk>null</jk> if response was successful but didn't contain a body (e.g. HTTP 204).
* @throws IOException If an exception occurred while streaming was already occurring.
@@ -749,21 +749,21 @@ public final class RestCall {
* Same as {@link #getResponse(Class)}, but useful for parsing into maps and collections of specific types.
*
* @param type The class to resolve.
- * Can be any of the following:
- * <ul>
- * <li>{@link ClassMeta}
- * <li>{@link Class}
- * <li>{@link ParameterizedType}
- * <li>{@link GenericArrayType}
- * </ul>
+ * Can be any of the following:
+ * <ul>
+ * <li>{@link ClassMeta}
+ * <li>{@link Class}
+ * <li>{@link ParameterizedType}
+ * <li>{@link GenericArrayType}
+ * </ul>
* @param args The type arguments of the class if it's a collection or map.
- * Can be any of the following:
- * <ul>
- * <li>{@link ClassMeta}
- * <li>{@link Class}
- * <li>{@link ParameterizedType}
- * <li>{@link GenericArrayType}
- * </ul>
+ * Can be any of the following:
+ * <ul>
+ * <li>{@link ClassMeta}
+ * <li>{@link Class}
+ * <li>{@link ParameterizedType}
+ * <li>{@link GenericArrayType}
+ * </ul>
* @param <T> The class to convert the input to.
* @return The parsed output.
* @throws IOException If a connection error occurred.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ef1ead8e/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
----------------------------------------------------------------------
diff --git a/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
index 6041d6d..de99eb0 100644
--- a/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
+++ b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
@@ -224,11 +224,9 @@ public class RestClient extends CoreApi {
* Creates an instance of an {@link HttpClientBuilder} to be used to create
* the {@link HttpClient}.
* <p>
- * Subclasses can override this method to provide their own client builder.
- * </p>
+ * Subclasses can override this method to provide their own client builder.
* <p>
- * The predefined method returns an {@link HttpClientBuilder} with the following settings:
- * </p>
+ * The predefined method returns an {@link HttpClientBuilder} with the following settings:
* <ul>
* <li>Lax redirect strategy.
* <li>The connection manager returned by {@link #createConnectionManager()}.
@@ -245,11 +243,9 @@ public class RestClient extends CoreApi {
/**
* Creates the {@link HttpClientConnectionManager} returned by {@link #createConnectionManager()}.
* <p>
- * Subclasses can override this method to provide their own connection manager.
- * </p>
+ * Subclasses can override this method to provide their own connection manager.
* <p>
- * The default implementation returns an instance of a {@link PoolingHttpClientConnectionManager}.
- * </p>
+ * The default implementation returns an instance of a {@link PoolingHttpClientConnectionManager}.
*
* @return The HTTP client builder to use to create the HTTP client.
*/
@@ -493,7 +489,7 @@ public class RestClient extends CoreApi {
/**
* Sets the value for the <code>Accept</code> request header.
* <p>
- * This overrides the media type specified on the parser, but is overridden by calling <code>setHeader(<js>"Accept"</js>, newvalue);</code>
+ * This overrides the media type specified on the parser, but is overridden by calling <code>setHeader(<js>"Accept"</js>, newvalue);</code>
*
* @param accept The new header value.
* @return This object (for method chaining).
@@ -506,7 +502,7 @@ public class RestClient extends CoreApi {
/**
* Sets the value for the <code>Content-Type</code> request header.
* <p>
- * This overrides the media type specified on the serializer, but is overridden by calling <code>setHeader(<js>"Content-Type"</js>, newvalue);</code>
+ * This overrides the media type specified on the serializer, but is overridden by calling <code>setHeader(<js>"Content-Type"</js>, newvalue);</code>
*
* @param contentType The new header value.
* @return This object (for method chaining).
@@ -520,7 +516,7 @@ public class RestClient extends CoreApi {
* Sets the URI of the remoteable services REST servlet for invoking remoteable services.
*
* @param remoteableServletUri The URI of the REST resource implementing a remoteable services servlet.
- * (typically an instance of <code>RemoteableServlet</code>).
+ * (typically an instance of <code>RemoteableServlet</code>).
* @return This object (for method chaining).
*/
public RestClient setRemoteableServletUri(String remoteableServletUri) {
@@ -549,7 +545,7 @@ public class RestClient extends CoreApi {
* Enable SSL support on this client.
*
* @param opts The SSL configuration options. See {@link SSLOpts} for details.
- * This method is a no-op if <code>sslConfig</code> is <jk>null</jk>.
+ * This method is a no-op if <code>sslConfig</code> is <jk>null</jk>.
* @return This object (for method chaining).
* @throws KeyStoreException
* @throws NoSuchAlgorithmException
@@ -589,13 +585,13 @@ public class RestClient extends CoreApi {
*
* @param url The URL of the remote REST resource. Can be any of the following: {@link String}, {@link URI}, {@link URL}.
* @param o The object to serialize and transmit to the URL as the body of the request.
- * Can be of the following types:
- * <ul class='spaced-list'>
- * <li>{@link Reader} - Raw contents of {@code Reader} will be serialized to remote resource.
- * <li>{@link InputStream} - Raw contents of {@code InputStream} will be serialized to remote resource.
- * <li>{@link Object} - POJO to be converted to text using the {@link Serializer} registered with the {@link RestClient}.
- * <li>{@link HttpEntity} - Bypass Juneau serialization and pass HttpEntity directly to HttpClient.
- * </ul>
+ * Can be of the following types:
+ * <ul class='spaced-list'>
+ * <li>{@link Reader} - Raw contents of {@code Reader} will be serialized to remote resource.
+ * <li>{@link InputStream} - Raw contents of {@code InputStream} will be serialized to remote resource.
+ * <li>{@link Object} - POJO to be converted to text using the {@link Serializer} registered with the {@link RestClient}.
+ * <li>{@link HttpEntity} - Bypass Juneau serialization and pass HttpEntity directly to HttpClient.
+ * </ul>
* @return A {@link RestCall} object that can be further tailored before executing the request
* and getting the response as a parsed object.
* @throws RestCallException If any authentication errors occurred.
@@ -609,13 +605,13 @@ public class RestClient extends CoreApi {
*
* @param url The URL of the remote REST resource. Can be any of the following: {@link String}, {@link URI}, {@link URL}.
* @param o The object to serialize and transmit to the URL as the body of the request.
- * Can be of the following types:
- * <ul class='spaced-list'>
- * <li>{@link Reader} - Raw contents of {@code Reader} will be serialized to remote resource.
- * <li>{@link InputStream} - Raw contents of {@code InputStream} will be serialized to remote resource.
- * <li>{@link Object} - POJO to be converted to text using the {@link Serializer} registered with the {@link RestClient}.
- * <li>{@link HttpEntity} - Bypass Juneau serialization and pass HttpEntity directly to HttpClient.
- * </ul>
+ * Can be of the following types:
+ * <ul class='spaced-list'>
+ * <li>{@link Reader} - Raw contents of {@code Reader} will be serialized to remote resource.
+ * <li>{@link InputStream} - Raw contents of {@code InputStream} will be serialized to remote resource.
+ * <li>{@link Object} - POJO to be converted to text using the {@link Serializer} registered with the {@link RestClient}.
+ * <li>{@link HttpEntity} - Bypass Juneau serialization and pass HttpEntity directly to HttpClient.
+ * </ul>
* @return A {@link RestCall} object that can be further tailored before executing the request
* and getting the response as a parsed object.
* @throws RestCallException If any authentication errors occurred.
@@ -736,14 +732,14 @@ public class RestClient extends CoreApi {
* @param method The HTTP method.
* @param url The URL of the remote REST resource. Can be any of the following: {@link String}, {@link URI}, {@link URL}.
* @param content The HTTP body content.
- * Can be of the following types:
- * <ul class='spaced-list'>
- * <li>{@link Reader} - Raw contents of {@code Reader} will be serialized to remote resource.
- * <li>{@link InputStream} - Raw contents of {@code InputStream} will be serialized to remote resource.
- * <li>{@link Object} - POJO to be converted to text using the {@link Serializer} registered with the {@link RestClient}.
- * <li>{@link HttpEntity} - Bypass Juneau serialization and pass HttpEntity directly to HttpClient.
- * </ul>
- * This parameter is IGNORED if {@link HttpMethod#hasContent()} is <jk>false</jk>.
+ * Can be of the following types:
+ * <ul class='spaced-list'>
+ * <li>{@link Reader} - Raw contents of {@code Reader} will be serialized to remote resource.
+ * <li>{@link InputStream} - Raw contents of {@code InputStream} will be serialized to remote resource.
+ * <li>{@link Object} - POJO to be converted to text using the {@link Serializer} registered with the {@link RestClient}.
+ * <li>{@link HttpEntity} - Bypass Juneau serialization and pass HttpEntity directly to HttpClient.
+ * </ul>
+ * This parameter is IGNORED if {@link HttpMethod#hasContent()} is <jk>false</jk>.
* @return A {@link RestCall} object that can be further tailored before executing the request
* and getting the response as a parsed object.
* @throws RestCallException If any authentication errors occurred.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ef1ead8e/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/SSLOpts.java
----------------------------------------------------------------------
diff --git a/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/SSLOpts.java b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/SSLOpts.java
index 444ad19..52f5766 100644
--- a/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/SSLOpts.java
+++ b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/SSLOpts.java
@@ -42,7 +42,7 @@ public class SSLOpts {
* Constructor.
*
* @param protocols A comma-delimited list of supported SSL protocols.
- * If <jk>null</jk>, uses the value returned by {@link #getDefaultProtocols()}.
+ * If <jk>null</jk>, uses the value returned by {@link #getDefaultProtocols()}.
* @param certValidate Certificate validation setting.
* @param hostVerify Host verification setting.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ef1ead8e/juneau-rest-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/JuneauProvider.java
----------------------------------------------------------------------
diff --git a/juneau-rest-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/JuneauProvider.java b/juneau-rest-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/JuneauProvider.java
index bbca603..6ded12d 100644
--- a/juneau-rest-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/JuneauProvider.java
+++ b/juneau-rest-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/JuneauProvider.java
@@ -31,7 +31,7 @@ import org.apache.juneau.xml.*;
*
* <h5 class='section'>Description:</h5>
* <p>
- * Used to associate serializers, parsers, filters, and properties with instances of {@link BaseProvider}.
+ * Used to associate serializers, parsers, filters, and properties with instances of {@link BaseProvider}.
*/
@Documented
@Target(TYPE)
@@ -42,28 +42,28 @@ public @interface JuneauProvider {
/**
* Provider-level bean filters.
* <p>
- * These filters are applied to all serializers and parsers being used by the provider.
+ * These filters are applied to all serializers and parsers being used by the provider.
* <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.
+ * 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.
*/
Class<?>[] beanFilters() default {};
/**
* Provider-level POJO swaps.
* <p>
- * These POJO swaps are applied to all serializers and parsers being used by the provider.
+ * These POJO swaps are applied to all serializers and parsers being used by the provider.
* <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}.
+ * If the specified class is an instance of {@link PojoSwap}, then that swap is added.
+ * Any other classes are wrapped in a {@link SurrogateSwap}.
*/
Class<?>[] pojoSwaps() default {};
/**
* Provider-level properties.
* <p>
- * Any of the following property names can be specified:
+ * Any of the following property names can be specified:
* <ul>
* <li>{@link RestServletContext}
* <li>{@link BeanContext}
@@ -74,23 +74,23 @@ public @interface JuneauProvider {
* <li>{@link XmlParserContext}
* </ul>
* <p>
- * Property values will be converted to the appropriate type.
+ * Property values will be converted to the appropriate type.
* <p>
- * These properties can be augmented/overridden through the {@link RestMethod#properties()} annotation on the REST method.
+ * These properties can be augmented/overridden through the {@link RestMethod#properties()} annotation on the REST method.
*/
Property[] properties() default {};
/**
* Specifies a list of {@link Serializer} classes to add to the list of serializers available for this provider.
* <p>
- * This annotation can only be used on {@link Serializer} classes that have no-arg constructors.
+ * This annotation can only be used on {@link Serializer} classes that have no-arg constructors.
*/
Class<? extends Serializer>[] serializers() default {};
/**
* Specifies a list of {@link Parser} classes to add to the list of parsers available for this provider.
* <p>
- * This annotation can only be used on {@link Parser} classes that have no-arg constructors.
+ * This annotation can only be used on {@link Parser} classes that have no-arg constructors.
*/
Class<? extends Parser>[] parsers() default {};
}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ef1ead8e/juneau-rest-test/src/test/java/org/apache/juneau/rest/test/TestMicroservice.java
----------------------------------------------------------------------
diff --git a/juneau-rest-test/src/test/java/org/apache/juneau/rest/test/TestMicroservice.java b/juneau-rest-test/src/test/java/org/apache/juneau/rest/test/TestMicroservice.java
index 8c5300f..d7d45d9 100644
--- a/juneau-rest-test/src/test/java/org/apache/juneau/rest/test/TestMicroservice.java
+++ b/juneau-rest-test/src/test/java/org/apache/juneau/rest/test/TestMicroservice.java
@@ -26,7 +26,7 @@ public class TestMicroservice {
/**
* Starts the microservice.
* @return <jk>true</jk> if the service started, <jk>false</jk> if it's already started.
- * If this returns <jk>false</jk> then don't call stopMicroservice()!.
+ * If this returns <jk>false</jk> then don't call stopMicroservice()!.
*/
public static boolean startMicroservice() {
if (microservice != null)
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ef1ead8e/juneau-rest/src/main/java/org/apache/juneau/rest/RestConverter.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestConverter.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestConverter.java
index cc401ec..2d668d3 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestConverter.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestConverter.java
@@ -20,10 +20,10 @@ import org.apache.juneau.serializer.*;
/**
* REST method response converter.
* <p>
- * Implements a filter mechanism for REST method calls that allows response objects to be
+ * Implements a filter mechanism for REST method calls that allows response objects to be
* converted to some other POJO after invocation of the REST method.
* <p>
- * Converters are associated with REST methods through the {@link RestMethod#converters()} annotation.
+ * Converters are associated with REST methods through the {@link RestMethod#converters()} annotation.
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
* <jk>public class</jk> RequestEchoResource <jk>extends</jk> RestServlet {
@@ -37,20 +37,20 @@ import org.apache.juneau.serializer.*;
* }
* </p>
* <p>
- * Converters can also be associated at the servlet level using the {@link RestResource#converters()} annotation.
- * Applying converters at the resource level is equivalent to applying converters to each resource method individually.
+ * Converters can also be associated at the servlet level using the {@link RestResource#converters()} annotation.
+ * Applying converters at the resource level is equivalent to applying converters to each resource method individually.
*
* <h6 class='topic'>How to implement</h6>
* <p>
- * Implementers should simply implement the {@link #convert(RestRequest, Object, ClassMeta)} and
+ * Implementers should simply implement the {@link #convert(RestRequest, Object, ClassMeta)} and
* return back a 'converted' object.
- * It's up to the implementer to decide what this means.
+ * It's up to the implementer to decide what this means.
* <p>
- * Converters must implement a no-args constructor.
+ * Converters must implement a no-args constructor.
*
* <h6 class='topic'>Predefined converters</h6>
* <p>
- * The following converters are available by default.
+ * The following converters are available by default.
* <ul class='spaced-list'>
* <li>{@link Traversable} - Allows URL additional path info to address individual elements in a POJO tree.
* <li>{@link Queryable} - Allows query/view/sort functions to be performed on POJOs.
@@ -65,7 +65,7 @@ public interface RestConverter {
* @param req The servlet request.
* @param res The response object set by the REST method through the {@link RestResponse#setOutput(Object)} method.
* @param cm The {@link ClassMeta} on the object from the bean context of the servlet.
- * Can be used to check if the object has any filters.
+ * Can be used to check if the object has any filters.
* @return The converted object.
* @throws RestException Thrown if any errors occur during conversion.
* @throws SerializeException
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ef1ead8e/juneau-rest/src/main/java/org/apache/juneau/rest/RestException.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestException.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestException.java
index 4ad7fd1..5fd3d2c 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestException.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestException.java
@@ -17,7 +17,7 @@ import java.text.*;
/**
* Exception thrown to trigger an error HTTP status.
* <p>
- * REST methods on subclasses of {@link RestServlet} can throw
+ * REST methods on subclasses of {@link RestServlet} can throw
* this exception to trigger an HTTP status other than the automatically-generated
* <code>404</code>, <code>405</code>, and <code>500</code> statuses.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ef1ead8e/juneau-rest/src/main/java/org/apache/juneau/rest/RestGuard.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestGuard.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestGuard.java
index 6b406ca..7848bb2 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestGuard.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestGuard.java
@@ -21,23 +21,23 @@ import org.apache.juneau.rest.annotation.*;
*
* <h5 class='section'>Description:</h5>
* <p>
- * Implements a guard mechanism for REST method calls that allows requests to be
- * rejected before invocation of the REST method.
- * For example, guards can be used to ensure that only administrators can call certain methods.
+ * Implements a guard mechanism for REST method calls that allows requests to be
+ * rejected before invocation of the REST method.
+ * For example, guards can be used to ensure that only administrators can call certain methods.
* <p>
- * Guards are applied to REST methods declaratively through the {@link RestResource#guards()} or {@link RestMethod#guards()} annotations.
+ * Guards are applied to REST methods declaratively through the {@link RestResource#guards()} or {@link RestMethod#guards()} annotations.
* <p>
- * If multiple guards are specified, ALL guards must pass in order for the request to proceed.
+ * If multiple guards are specified, ALL guards must pass in order for the request to proceed.
*
* <h6 class='topic'>How to implement</h6>
* <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.
* <p>
- * Implementers should simply throw a {@link RestException} from the {@link #guard(RestRequest, RestResponse)}
- * method to abort processing on the current request.
+ * Implementers should simply throw a {@link RestException} from the {@link #guard(RestRequest, RestResponse)}
+ * method to abort processing on the current request.
* <p>
- * Guards must implement a no-args constructor.
+ * Guards must implement a no-args constructor.
*
* <h6 class='topic'>Example usage:</h6>
* <p class='bcode'>
@@ -67,17 +67,17 @@ public abstract class RestGuard {
* Checks the current HTTP request and throws a {@link RestException} if the guard
* does not permit the request.
* <p>
- * By default, throws an <jsf>SC_FORBIDDEN</jsf> exception if {@link #isRequestAllowed(RestRequest)}
+ * By default, throws an <jsf>SC_FORBIDDEN</jsf> exception if {@link #isRequestAllowed(RestRequest)}
* returns <jk>false</jk>.
* <p>
- * Subclasses are free to override this method to tailor the behavior of how to handle unauthorized
+ * Subclasses are free to override this method to tailor the behavior of how to handle unauthorized
* requests.
*
* @param req The servlet request.
* @param res The servlet response.
* @throws RestException Thrown to abort processing on current request.
* @return <jk>true</jk> if request can proceed.
- * Specify <jk>false</jk> if you're doing something like a redirection to a login page.
+ * Specify <jk>false</jk> if you're doing something like a redirection to a login page.
*/
public boolean guard(RestRequest req, RestResponse res) throws RestException {
if (! isRequestAllowed(req))
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ef1ead8e/juneau-rest/src/main/java/org/apache/juneau/rest/RestMatcherReflecting.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestMatcherReflecting.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestMatcherReflecting.java
index f40e14b..4a2619d 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestMatcherReflecting.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestMatcherReflecting.java
@@ -17,7 +17,7 @@ import java.lang.reflect.*;
/**
* Subclass of {@link RestMatcher} that gives access to the servlet and Java method it's applied to.
* <p>
- * Essentially the same as {@link RestMatcher} except has a constructor where the
+ * Essentially the same as {@link RestMatcher} except has a constructor where the
* Java method is passed in so that you can access annotations defined on it to tailor
* the behavior of the matcher.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ef1ead8e/juneau-rest/src/main/java/org/apache/juneau/rest/RestRequest.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestRequest.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestRequest.java
index 64a5a2a..5682f24 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestRequest.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestRequest.java
@@ -874,10 +874,10 @@ public final class RestRequest extends HttpServletRequestWrapper {
* <h5 class='section'>Examples:</h5>
* <p class='bcode'>
* <jc>// Parse into a linked-list of strings.</jc>
- * Listt<String> myparam = req.getFormDataParameter(<js>"myparam"</js>, LinkedList.<jk>class</jk>, String.<jk>class</jk>);
+ * List<String> myparam = req.getFormDataParameter(<js>"myparam"</js>, LinkedList.<jk>class</jk>, String.<jk>class</jk>);
*
* <jc>// Parse into a linked-list of linked-lists of strings.</jc>
- * Listt<List<String>> myparam = req.getFormDataParameter(<js>"myparam"</js>, LinkedList.<jk>class</jk>, LinkedList.<jk>class</jk>, String.<jk>class</jk>);
+ * List<List<String>> myparam = req.getFormDataParameter(<js>"myparam"</js>, LinkedList.<jk>class</jk>, LinkedList.<jk>class</jk>, String.<jk>class</jk>);
*
* <jc>// Parse into a map of string keys/values.</jc>
* Map<String,String> myparam = req.getFormDataParameter(<js>"myparam"</js>, TreeMap.<jk>class</jk>, String.<jk>class</jk>, String.<jk>class</jk>);
@@ -1047,10 +1047,10 @@ public final class RestRequest extends HttpServletRequestWrapper {
* <h5 class='section'>Examples:</h5>
* <p class='bcode'>
* <jc>// Parse into a linked-list of strings.</jc>
- * Listt<String> myparam = req.getPathParameter(<js>"myparam"</js>, LinkedList.<jk>class</jk>, String.<jk>class</jk>);
+ * List<String> myparam = req.getPathParameter(<js>"myparam"</js>, LinkedList.<jk>class</jk>, String.<jk>class</jk>);
*
* <jc>// Parse into a linked-list of linked-lists of strings.</jc>
- * Listt<List<String>> myparam = req.getPathParameter(<js>"myparam"</js>, LinkedList.<jk>class</jk>, LinkedList.<jk>class</jk>, String.<jk>class</jk>);
+ * List<List<String>> myparam = req.getPathParameter(<js>"myparam"</js>, LinkedList.<jk>class</jk>, LinkedList.<jk>class</jk>, String.<jk>class</jk>);
*
* <jc>// Parse into a map of string keys/values.</jc>
* Map<String,String> myparam = req.getPathParameter(<js>"myparam"</js>, TreeMap.<jk>class</jk>, String.<jk>class</jk>, String.<jk>class</jk>);
@@ -1120,8 +1120,8 @@ public final class RestRequest extends HttpServletRequestWrapper {
* <td><code>123</code></td>
* <td><code><xt><number></xt>123<xt></number></xt></code><br><code><xt><x</xt> <xa>type</xa>=<xs>'number'</xs><xt>></xt>...<xt></x></xt></code></td>
* <td>{@link Number}</td>
- * </tr>
- * <tr>
+ * </tr>
+ * <tr>
* <td>boolean</td>
* <td><jk>true</jk></td>
* <td><code><xt><boolean></xt>true<xt></boolean></xt></code><br><code><xt><x</xt> <xa>type</xa>=<xs>'boolean'</xs><xt>></xt>...<xt></x></xt></code></td>
@@ -1171,10 +1171,10 @@ public final class RestRequest extends HttpServletRequestWrapper {
* <h5 class='section'>Examples:</h5>
* <p class='bcode'>
* <jc>// Parse into a linked-list of strings.</jc>
- * Listt<String> body = req.getBody(LinkedList.<jk>class</jk>, String.<jk>class</jk>);
+ * List<String> body = req.getBody(LinkedList.<jk>class</jk>, String.<jk>class</jk>);
*
* <jc>// Parse into a linked-list of linked-lists of strings.</jc>
- * Listt<List<String>> body = req.getBody(LinkedList.<jk>class</jk>, LinkedList.<jk>class</jk>, String.<jk>class</jk>);
+ * List<List<String>> body = req.getBody(LinkedList.<jk>class</jk>, LinkedList.<jk>class</jk>, String.<jk>class</jk>);
*
* <jc>// Parse into a map of string keys/values.</jc>
* Map<String,String> body = req.getBody(TreeMap.<jk>class</jk>, String.<jk>class</jk>, String.<jk>class</jk>);
@@ -1637,7 +1637,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
*
* @return The parser matching the request <code>Content-Type</code> header, or <jk>null</jk>
* if no matching parser was found.
- * Includes the matching media type.
+ * Includes the matching media type.
*/
public ParserMatch getParserMatch() {
MediaType mediaType = getMediaType();
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ef1ead8e/juneau-rest/src/main/java/org/apache/juneau/rest/RestResponse.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestResponse.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestResponse.java
index 0318f59..d4fbd50 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestResponse.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestResponse.java
@@ -31,11 +31,9 @@ import org.apache.juneau.xml.*;
* <p>
* Essentially an extended {@link HttpServletResponse} with some special convenience methods
* that allow you to easily output POJOs as responses.
- * </p>
* <p>
* Since this class extends {@link HttpServletResponse}, developers are free to use these
* convenience methods, or revert to using lower level methods like any other servlet response.
- * </p>
*
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
@@ -46,8 +44,7 @@ import org.apache.juneau.xml.*;
* }
* </p>
* <p>
- * Refer to <a class="doclink" href="package-summary.html#TOC">REST Servlet API</a> for information about using this class.
- * </p>
+ * Refer to <a class="doclink" href="package-summary.html#TOC">REST Servlet API</a> for information about using this class.
*/
public final class RestResponse extends HttpServletResponseWrapper {
@@ -147,16 +144,16 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Sets the HTTP output on the response.
* <p>
- * Calling this method is functionally equivalent to returning the object in the REST Java method.
+ * Calling this method is functionally equivalent to returning the object in the REST Java method.
* <p>
- * Can be of any of the following types:
- * <ul>
- * <li> {@link InputStream}
- * <li> {@link Reader}
- * <li> Any serializable type defined in <a class="doclink" href="../../../../overview-summary.html#Core.PojoCategories">POJO Categories</a>
- * </ul>
+ * Can be of any of the following types:
+ * <ul>
+ * <li> {@link InputStream}
+ * <li> {@link Reader}
+ * <li> Any serializable type defined in <a class="doclink" href="../../../../overview-summary.html#Core.PojoCategories">POJO Categories</a>
+ * </ul>
* <p>
- * If it's an {@link InputStream} or {@link Reader}, you must also specify the <code>Content-Type</code> using the {@link #setContentType(String)} method.
+ * If it's an {@link InputStream} or {@link Reader}, you must also specify the <code>Content-Type</code> using the {@link #setContentType(String)} method.
*
* @param output The output to serialize to the connection.
* @return This object (for method chaining).
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ef1ead8e/juneau-rest/src/main/java/org/apache/juneau/rest/RestServlet.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestServlet.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestServlet.java
index 9ffb83b..b7ce3a7 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestServlet.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestServlet.java
@@ -59,8 +59,7 @@ import org.apache.juneau.utils.*;
/**
* Servlet implementation of a REST resource.
* <p>
- * Refer to <a class="doclink" href="package-summary.html#TOC">REST Servlet API</a> for information about using this class.
- * </p>
+ * Refer to <a class="doclink" href="package-summary.html#TOC">REST Servlet API</a> for information about using this class.
*/
@SuppressWarnings({"rawtypes","hiding"})
public abstract class RestServlet extends HttpServlet {
@@ -295,16 +294,14 @@ public abstract class RestServlet extends HttpServlet {
/**
* Creates the child resources of this resource.
* <p>
- * Default implementation calls {@link #createChildren()} and uses the {@link RestResource#path() @RestResource.path()} annotation
- * on each child to identify the subpath for the resource which become the keys in this map.
- * It then calls the {@link #setParent(RestServlet)} method on the child resource.
- * </p>
+ * Default implementation calls {@link #createChildren()} and uses the {@link RestResource#path() @RestResource.path()} annotation
+ * on each child to identify the subpath for the resource which become the keys in this map.
+ * It then calls the {@link #setParent(RestServlet)} method on the child resource.
* <p>
- * Subclasses can override this method to programatically create child resources
- * without using the {@link RestResource#children() @RestResource.children()} annotation.
- * When overridding this method, you are responsible for calling {@link #setParent(RestServlet)} on the
- * child resources.
- * </p>
+ * Subclasses can override this method to programatically create child resources
+ * without using the {@link RestResource#children() @RestResource.children()} annotation.
+ * When overridding this method, you are responsible for calling {@link #setParent(RestServlet)} on the
+ * child resources.
*
* @return The new mutable list of child resource instances.
* @throws Exception If an error occurred during servlet instantiation.
@@ -324,13 +321,11 @@ public abstract class RestServlet extends HttpServlet {
/**
* Creates instances of child resources for this servlet.
* <p>
- * Default implementation uses the {@link RestResource#children() @RestResource.children()} annotation to identify and
- * instantiate children.
- * </p>
+ * Default implementation uses the {@link RestResource#children() @RestResource.children()} annotation to identify and
+ * instantiate children.
* <p>
- * Subclasses can override this method to programatically create child resources
- * without using the {@link RestResource#children() @RestResource.children()} annotation.
- * </p>
+ * Subclasses can override this method to programatically create child resources
+ * without using the {@link RestResource#children() @RestResource.children()} annotation.
*
* @return The new mutable list of child resource instances.
* @throws Exception If an error occurred during servlet instantiation.
@@ -349,12 +344,10 @@ public abstract class RestServlet extends HttpServlet {
/**
* Programmatic equivalent to the {@link RestResource#children() @RestResource.children()} annotation.
* <p>
- * Subclasses can override this method to provide customized list of child resources.
- * (e.g. different children based on values specified in the config file).
- * </p>
+ * Subclasses can override this method to provide customized list of child resources.
+ * (e.g. different children based on values specified in the config file).
* <p>
- * Default implementation simply returns the value from the {@link RestResource#children() @RestResource.children()} annotation.
- * </p>
+ * Default implementation simply returns the value from the {@link RestResource#children() @RestResource.children()} annotation.
*
* @return The new mutable list of child resource instances.
* @throws Exception If an error occurred during servlet instantiation.
@@ -370,13 +363,12 @@ public abstract class RestServlet extends HttpServlet {
/**
* Creates the class-level properties associated with this servlet.
* <p>
- * Subclasses can override this method to provide their own class-level properties for this servlet, typically
- * by calling <code><jk>super</jk>.createProperties()</code> and appending to the map.
- * However, in most cases, the existing set of properties can be added to by overridding {@link #getProperties()}
- * and appending to the map returned by <code><jk>super</jk>.getProperties()</code>
- * </p>
+ * Subclasses can override this method to provide their own class-level properties for this servlet, typically
+ * by calling <code><jk>super</jk>.createProperties()</code> and appending to the map.
+ * However, in most cases, the existing set of properties can be added to by overridding {@link #getProperties()}
+ * and appending to the map returned by <code><jk>super</jk>.getProperties()</code>
* <p>
- * By default, the map returned by this method contains the following:
+ * By default, the map returned by this method contains the following:
* </p>
* <ul class='spaced-list'>
* <li>Servlet-init parameters.
@@ -877,8 +869,7 @@ public abstract class RestServlet extends HttpServlet {
/**
* Creates a {@link RestRequest} object based on the specified incoming {@link HttpServletRequest} object.
* <p>
- * Subclasses may choose to override this method to provide a specialized request object.
- * </p>
+ * Subclasses may choose to override this method to provide a specialized request object.
*
* @param req The request object from the {@link #service(HttpServletRequest, HttpServletResponse)} method.
* @return The wrapped request object.
@@ -890,10 +881,9 @@ public abstract class RestServlet extends HttpServlet {
/**
* Creates a {@link RestResponse} object based on the specified incoming {@link HttpServletResponse} object
- * and the request returned by {@link #createRequest(HttpServletRequest)}.
+ * and the request returned by {@link #createRequest(HttpServletRequest)}.
* <p>
- * Subclasses may choose to override this method to provide a specialized response object.
- * </p>
+ * Subclasses may choose to override this method to provide a specialized response object.
*
* @param req The request object returned by {@link #createRequest(HttpServletRequest)}.
* @param res The response object from the {@link #service(HttpServletRequest, HttpServletResponse)} method.
@@ -907,11 +897,9 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns whether this resource class can provide an OPTIONS page.
* <p>
- * By default, returns <jk>false</jk>.
- * </p>
+ * By default, returns <jk>false</jk>.
* <p>
- * Subclasses can override this method to cause the <code>options</code> link to show up in the HTML serialized output.
- * </p>
+ * Subclasses can override this method to cause the <code>options</code> link to show up in the HTML serialized output.
*
* @return <jk>true</jk> if this resource has implemented a {@code getOptions()} method.
*/
@@ -922,8 +910,7 @@ public abstract class RestServlet extends HttpServlet {
/**
* Specify a class-level property.
* <p>
- * Typically, properties in {@link RestServletContext} can be set in the {@link Servlet#init(ServletConfig)} method.
- * </p>
+ * Typically, properties in {@link RestServletContext} can be set in the {@link Servlet#init(ServletConfig)} method.
*
* @param key The property name.
* @param value The property value.
@@ -937,8 +924,7 @@ public abstract class RestServlet extends HttpServlet {
/**
* The main service method.
* <p>
- * Subclasses can optionally override this method if they want to tailor the behavior of requests.
- * </p>
+ * Subclasses can optionally override this method if they want to tailor the behavior of requests.
*/
@Override /* Servlet */
public void service(HttpServletRequest r1, HttpServletResponse r2) throws ServletException, IOException {
@@ -1042,9 +1028,8 @@ public abstract class RestServlet extends HttpServlet {
/**
* Handle the case where a matching method was not found.
* <p>
- * Subclasses can override this method to provide a 2nd-chance for specifying a response.
- * The default implementation will simply throw an exception with an appropriate message.
- * </p>
+ * Subclasses can override this method to provide a 2nd-chance for specifying a response.
+ * The default implementation will simply throw an exception with an appropriate message.
*
* @param rc The HTTP response code.
* @param req The HTTP request.
@@ -1084,12 +1069,10 @@ public abstract class RestServlet extends HttpServlet {
/**
* Method for rendering response errors.
* <p>
- * The default implementation renders a plain text English message, optionally with a stack trace
- * if {@link RestServletContext#REST_renderResponseStackTraces} is enabled.
- * </p>
+ * The default implementation renders a plain text English message, optionally with a stack trace
+ * if {@link RestServletContext#REST_renderResponseStackTraces} is enabled.
* <p>
- * Subclasses can override this method to provide their own custom error response handling.
- * </p>
+ * Subclasses can override this method to provide their own custom error response handling.
*
* @param req The servlet request.
* @param res The servlet response.
@@ -1122,13 +1105,11 @@ public abstract class RestServlet extends HttpServlet {
/**
* Callback method for logging errors during HTTP requests.
* <p>
- * Typically, subclasses will override this method and log errors themselves.
- * </p>
+ * ypically, subclasses will override this method and log errors themselves.
* <p>
- * The default implementation simply logs errors to the <code>RestServlet</code> logger.
- * </p>
+ * The default implementation simply logs errors to the <code>RestServlet</code> logger.
* <p>
- * Here's a typical implementation showing how stack trace hashing can be used to reduce log file sizes...
+ * Here's a typical implementation showing how stack trace hashing can be used to reduce log file sizes...
* </p>
* <p class='bcode'>
* <jk>protected void</jk> onError(HttpServletRequest req, HttpServletResponse res, RestException e, <jk>boolean</jk> noTrace) {
@@ -1174,11 +1155,9 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns <jk>true</jk> if the specified exception should be logged.
* <p>
- * Subclasses can override this method to provide their own logic for determining when exceptions are logged.
- * </p>
+ * Subclasses can override this method to provide their own logic for determining when exceptions are logged.
* <p>
- * The default implementation will return <jk>false</jk> if <js>"noTrace=true"</js> is passed in the query string.
- * </p>
+ * The default implementation will return <jk>false</jk> if <js>"noTrace=true"</js> is passed in the query string.
*
* @param req The HTTP request.
* @param res The HTTP response.
@@ -1193,11 +1172,10 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns <jk>true</jk> if a stack trace should be logged for this exception.
* <p>
- * Subclasses can override this method to provide their own logic for determining when stack traces are logged.
- * </p>
+ * Subclasses can override this method to provide their own logic for determining when stack traces are logged.
* <p>
- * The default implementation will only log a stack trace if {@link RestException#getOccurrence()} returns <code>1</code>
- * and the exception is not one of the following:
+ * The default implementation will only log a stack trace if {@link RestException#getOccurrence()} returns <code>1</code>
+ * and the exception is not one of the following:
* </p>
* <ul>
* <li>{@link HttpServletResponse#SC_UNAUTHORIZED}
@@ -1225,8 +1203,7 @@ public abstract class RestServlet extends HttpServlet {
/**
* Log a message.
* <p>
- * Equivalent to calling <code>log(level, <jk>null</jk>, msg, args);</code>
- * </p>
+ * Equivalent to calling <code>log(level, <jk>null</jk>, msg, args);</code>
*
* @param level The log level.
* @param msg The message to log.
@@ -1238,11 +1215,10 @@ public abstract class RestServlet extends HttpServlet {
/**
* Same as {@link #log(Level, String, Object...)} excepts runs the
- * arguments through {@link JsonSerializer#DEFAULT_LAX_READABLE}.
+ * arguments through {@link JsonSerializer#DEFAULT_LAX_READABLE}.
* <p>
- * Serialization of arguments do not occur if message is not logged, so
- * it's safe to use this method from within debug log statements.
- * </p>
+ * Serialization of arguments do not occur if message is not logged, so
+ * it's safe to use this method from within debug log statements.
*
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
@@ -1262,9 +1238,8 @@ public abstract class RestServlet extends HttpServlet {
/**
* Log a message to the logger returned by {@link #getLogger()}.
* <p>
- * Subclasses can override this method if they wish to log messages using a library other than
- * Java Logging (e.g. Apache Commons Logging).
- * </p>
+ * Subclasses can override this method if they wish to log messages using a library other than
+ * Java Logging (e.g. Apache Commons Logging).
*
* @param level The log level.
* @param cause The cause.
@@ -1281,11 +1256,9 @@ public abstract class RestServlet extends HttpServlet {
/**
* Callback method for listening for successful completion of requests.
* <p>
- * Subclasses can override this method for gathering performance statistics.
- * </p>
+ * Subclasses can override this method for gathering performance statistics.
* <p>
- * The default implementation does nothing.
- * </p>
+ * The default implementation does nothing.
*
* @param req The HTTP request.
* @param res The HTTP response.
@@ -1296,9 +1269,8 @@ public abstract class RestServlet extends HttpServlet {
/**
* Callback method that gets invoked right before the REST Java method is invoked.
* <p>
- * Subclasses can override this method to override request headers or set request-duration properties
- * before the Java method is invoked.
- * </p>
+ * Subclasses can override this method to override request headers or set request-duration properties
+ * before the Java method is invoked.
*
* @param req The HTTP servlet request object.
* @throws RestException If any error occurs.
@@ -1309,9 +1281,8 @@ public abstract class RestServlet extends HttpServlet {
* Callback method that gets invoked right after the REST Java method is invoked, but before
* the serializer is invoked.
* <p>
- * Subclasses can override this method to override request and response headers, or
- * set/override properties used by the serializer.
- * </p>
+ * Subclasses can override this method to override request and response headers, or
+ * set/override properties used by the serializer.
*
* @param req The HTTP servlet request object.
* @param res The HTTP servlet response object.
@@ -1322,9 +1293,8 @@ public abstract class RestServlet extends HttpServlet {
/**
* The main method for serializing POJOs passed in through the {@link RestResponse#setOutput(Object)} method.
* <p>
- * Subclasses may override this method if they wish to modify the way the output is rendered, or support
+ * Subclasses may override this method if they wish to modify the way the output is rendered, or support
* other output formats.
- * </p>
*
* @param req The HTTP request.
* @param res The HTTP response.
@@ -1355,8 +1325,7 @@ public abstract class RestServlet extends HttpServlet {
/**
* Resolve a static resource file.
* <p>
- * Subclasses can override this method to provide their own way to resolve files.
- * </p>
+ * Subclasses can override this method to provide their own way to resolve files.
*
* @param pathInfo The unencoded path info.
* @return The resource, or <jk>null</jk> if the resource could not be resolved.
@@ -1395,15 +1364,12 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns a list of valid {@code Accept} content types for this resource.
* <p>
- * Typically used by subclasses during {@code OPTIONS} requests.
- * </p>
+ * Typically used by subclasses during {@code OPTIONS} requests.
* <p>
- * The default implementation resturns the list from {@link ParserGroup#getSupportedMediaTypes()}
- * from the parser group returned by {@link #getParsers()}.
- * </p>
+ * The default implementation resturns the list from {@link ParserGroup#getSupportedMediaTypes()}
+ * from the parser group returned by {@link #getParsers()}.
* <p>
- * Subclasses can override or expand this list as they see fit.
- * </p>
+ * Subclasses can override or expand this list as they see fit.
*
* @return The list of valid {@code Accept} content types for this resource.
* @throws RestServletException
@@ -1415,15 +1381,12 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns a list of valid {@code Content-Types} for input for this resource.
* <p>
- * Typically used by subclasses during {@code OPTIONS} requests.
- * </p>
+ * Typically used by subclasses during {@code OPTIONS} requests.
* <p>
- * The default implementation resturns the list from {@link SerializerGroup#getSupportedMediaTypes()}
- * from the parser group returned by {@link #getSerializers()}.
- * </p>
+ * The default implementation resturns the list from {@link SerializerGroup#getSupportedMediaTypes()}
+ * from the parser group returned by {@link #getSerializers()}.
* <p>
- * Subclasses can override or expand this list as they see fit.
- * </p>
+ * Subclasses can override or expand this list as they see fit.
*
* @return The list of valid {@code Content-Type} header values for this resource.
* @throws RestServletException
@@ -1435,10 +1398,9 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns the localized summary of the specified java method on this servlet.
* <p>
- * Subclasses can override this method to provide their own summary.
- * </p>
+ * Subclasses can override this method to provide their own summary.
* <p>
- * The default implementation returns the summary from the following locations (whichever matches first):
+ * The default implementation returns the summary from the following locations (whichever matches first):
* </p>
* <ol>
* <li>{@link RestMethod#summary() @RestMethod.summary()} annotation on the method.
@@ -1462,10 +1424,9 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns the localized description of the specified java method on this servlet.
* <p>
- * Subclasses can override this method to provide their own description.
- * </p>
+ * Subclasses can override this method to provide their own description.
* <p>
- * The default implementation returns the description from the following locations (whichever matches first):
+ * The default implementation returns the description from the following locations (whichever matches first):
* </p>
* <ol>
* <li>{@link RestMethod#description() @RestMethod.description()} annotation on the method.
@@ -1489,9 +1450,9 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns the localized title of this REST resource.
* <p>
- * Subclasses can override this method to provide their own title.
+ * Subclasses can override this method to provide their own title.
* <p>
- * The default implementation returns the description from the following locations (whichever matches first):
+ * The default implementation returns the description from the following locations (whichever matches first):
* <p>
* <ol>
* <li>{@link RestResource#title() @RestResourcel.title()} annotation on this class, and then any parent classes.
@@ -1521,9 +1482,9 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns the localized description of this REST resource.
* <p>
- * Subclasses can override this method to provide their own description.
+ * Subclasses can override this method to provide their own description.
* <p>
- * The default implementation returns the description from the following locations (whichever matches first):
+ * The default implementation returns the description from the following locations (whichever matches first):
* <ol>
* <li>{@link RestResource#description() @RestResource.description()} annotation on this class, and then any parent classes.
* <li><ck>[ClassName].description</ck> property in resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
@@ -1552,9 +1513,9 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns the localized contact information of this REST resource.
* <p>
- * Subclasses can override this method to provide their own contact information.
+ * Subclasses can override this method to provide their own contact information.
* <p>
- * The default implementation returns the contact information from the following locations (whichever matches first):
+ * The default implementation returns the contact information from the following locations (whichever matches first):
* <ol>
* <li>{@link RestResource#contact() @RestResource.contact()} annotation on this class, and then any parent classes.
* <li><ck>[ClassName].contact</ck> property in resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
@@ -1588,9 +1549,9 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns the localized license information of this REST resource.
* <p>
- * Subclasses can override this method to provide their own license information.
+ * Subclasses can override this method to provide their own license information.
* <p>
- * The default implementation returns the license information from the following locations (whichever matches first):
+ * The default implementation returns the license information from the following locations (whichever matches first):
* <ol>
* <li>{@link RestResource#license() @RestResource.license()} annotation on this class, and then any parent classes.
* <li><ck>[ClassName].license</ck> property in resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
@@ -1624,9 +1585,9 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns the terms-of-service information of this REST resource.
* <p>
- * Subclasses can override this method to provide their own terms-of-service information.
+ * Subclasses can override this method to provide their own terms-of-service information.
* <p>
- * The default implementation returns the terms-of-service information from the following locations (whichever matches first):
+ * The default implementation returns the terms-of-service information from the following locations (whichever matches first):
* <ol>
* <li>{@link RestResource#termsOfService() @RestResource.termsOfService()} annotation on this class, and then any parent classes.
* <li><ck>[ClassName].termsOfService</ck> property in resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
@@ -1655,9 +1616,9 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns the version information of this REST resource.
* <p>
- * Subclasses can override this method to provide their own version information.
+ * Subclasses can override this method to provide their own version information.
* <p>
- * The default implementation returns the version information from the following locations (whichever matches first):
+ * The default implementation returns the version information from the following locations (whichever matches first):
* <ol>
* <li>{@link RestResource#version() @RestResource.version()} annotation on this class, and then any parent classes.
* <li><ck>[ClassName].version</ck> property in resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
@@ -1686,9 +1647,9 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns the version information of this REST resource.
* <p>
- * Subclasses can override this method to provide their own version information.
+ * Subclasses can override this method to provide their own version information.
* <p>
- * The default implementation returns the version information from the following locations (whichever matches first):
+ * The default implementation returns the version information from the following locations (whichever matches first):
* <ol>
* <li>{@link RestResource#version() @RestResource.version()} annotation on this class, and then any parent classes.
* <li><ck>[ClassName].version</ck> property in resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
@@ -1722,9 +1683,9 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns the version information of this REST resource.
* <p>
- * Subclasses can override this method to provide their own version information.
+ * Subclasses can override this method to provide their own version information.
* <p>
- * The default implementation returns the version information from the following locations (whichever matches first):
+ * The default implementation returns the version information from the following locations (whichever matches first):
* <ol>
* <li>{@link RestResource#version() @RestResource.version()} annotation on this class, and then any parent classes.
* <li><ck>[ClassName].version</ck> property in resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
@@ -1777,12 +1738,10 @@ public abstract class RestServlet extends HttpServlet {
/**
* Gets a localized message from the resource bundle identified by the {@link RestResource#messages() @RestResource.messages()} annotation.
* <p>
- * If resource bundle location was not specified, or the resource bundle was not found,
+ * If resource bundle location was not specified, or the resource bundle was not found,
* returns the string <js>"{!!key}"</js>.
- * </p>
* <p>
- * If message was not found in the resource bundle, returns the string <js>"{!key}"</js>.
- * </p>
+ * If message was not found in the resource bundle, returns the string <js>"{!key}"</js>.
*
* @param locale The client locale.
* @param key The resource bundle key.
@@ -1796,16 +1755,14 @@ public abstract class RestServlet extends HttpServlet {
/**
* Programmatically adds the specified resource as a child to this resource.
* <p>
- * This method can be used in a resources {@link #init()} method to define child resources
+ * This method can be used in a resources {@link #init()} method to define child resources
* accessible through a child URL.
- * </p>
* <p>
- * Typically, child methods are defined via {@link RestResource#children() @RestResource.children()}. However, this
+ * Typically, child methods are defined via {@link RestResource#children() @RestResource.children()}. However, this
* method is provided to handle child resources determined at runtime.
- * </p>
*
* @param name The sub-URL under which this resource is accessible.<br>
- * For example, if the parent resource URL is <js>"/foo"</js>, and this name is <js>"bar"</js>, then
+ * For example, if the parent resource URL is <js>"/foo"</js>, and this name is <js>"bar"</js>, then
* the child resource will be accessible via the URL <js>"/foo/bar"</js>.
* @param resource The child resource.
* @throws ServletException Thrown by the child init() method.
@@ -1819,7 +1776,7 @@ public abstract class RestServlet extends HttpServlet {
* Returns the child resources associated with this servlet.
*
* @return An unmodifiable map of child resources.
- * Keys are the {@link RestResource#path() @RestResource.path()} annotation defined on the child resource.
+ * Keys are the {@link RestResource#path() @RestResource.path()} annotation defined on the child resource.
*/
public Map<String,RestServlet> getChildResources() {
return Collections.unmodifiableMap(childResources);
@@ -1829,11 +1786,9 @@ public abstract class RestServlet extends HttpServlet {
* Returns the path for this servlet as defined by the {@link RestResource#path()} annotation
* on this class concatenated with those on all parent classes.
* <p>
- * If path is not specified, returns <js>"/"</js>.
- * </p>
+ * If path is not specified, returns <js>"/"</js>.
* <p>
- * Path always starts with <js>"/"</js>.
- * </p>
+ * Path always starts with <js>"/"</js>.
*
* @return The servlet path.
*/
@@ -1871,12 +1826,10 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns the config file for this servlet.
* <p>
- * Subclasses can override this method to provide their own config file.
- * </p>
+ * Subclasses can override this method to provide their own config file.
* <p>
- * The default implementation uses the path defined by the {@link RestResource#config() @RestResource.config()} property resolved
- * by {@link ConfigMgr#DEFAULT}.
- * </p>
+ * The default implementation uses the path defined by the {@link RestResource#config() @RestResource.config()} property resolved
+ * by {@link ConfigMgr#DEFAULT}.
*
* @return The config file for this servlet.
* @throws IOException
@@ -1891,16 +1844,13 @@ public abstract class RestServlet extends HttpServlet {
/**
* Creates the stylesheet for this servlet.
* <p>
- * The stylesheet is made available on the path <js>"/servlet-path/style.css"</js>.
- * </p>
+ * The stylesheet is made available on the path <js>"/servlet-path/style.css"</js>.
* <p>
- * Subclasses can override this method to provide their own stylesheet.
- * </p>
+ * Subclasses can override this method to provide their own stylesheet.
* <p>
- * The default implementation uses the {@link RestResource#stylesheet() @RestResource.stylesheet()} annotation
- * to determine the stylesheet name and then searches the classpath then working directory
- * for that stylesheet.
- * </p>
+ * The default implementation uses the {@link RestResource#stylesheet() @RestResource.stylesheet()} annotation
+ * to determine the stylesheet name and then searches the classpath then working directory
+ * for that stylesheet.
*
* @return The stylesheet to use for this servlet, or <jk>null</jk> if the stylesheet could not be found.
* @throws IOException If stylesheet could not be loaded.
@@ -1925,16 +1875,13 @@ public abstract class RestServlet extends HttpServlet {
/**
* Creates the favicon for this servlet.
* <p>
- * The favicon is made available on the path <js>"/servlet-path/favicon.ico"</js>.
- * </p>
+ * The favicon is made available on the path <js>"/servlet-path/favicon.ico"</js>.
* <p>
- * Subclasses can override this method to provide their own favorites icon.
- * </p>
+ * Subclasses can override this method to provide their own favorites icon.
* <p>
- * The default implementation uses the {@link RestResource#favicon() @RestResource.favicon()} annotation
- * to determine the file name and then searches the classpath then working directory
- * for that file.
- * </p>
+ * The default implementation uses the {@link RestResource#favicon() @RestResource.favicon()} annotation
+ * to determine the file name and then searches the classpath then working directory
+ * for that file.
*
* @return The icon file to use for this servlet.
* @throws IOException If icon file could not be loaded.
@@ -1959,17 +1906,14 @@ public abstract class RestServlet extends HttpServlet {
/**
* Creates the static files map for this servlet.
* <p>
- * This map defines static files that can be served up through subpaths on this servlet.
- * The map keys are subpaths (e.g. <js>"htdocs"</js>) and the values are locations to look in
- * the classpath and working directory for those files.
- * </p>
+ * This map defines static files that can be served up through subpaths on this servlet.
+ * The map keys are subpaths (e.g. <js>"htdocs"</js>) and the values are locations to look in
+ * the classpath and working directory for those files.
* <p>
- * Subclasses can override this method to provide their own mappings.
- * </p>
+ * Subclasses can override this method to provide their own mappings.
* <p>
- * The default implementation uses the {@link RestResource#staticFiles() @RestResource.staticFiles()} annotation
- * to determine the mappings.
- * </p>
+ * The default implementation uses the {@link RestResource#staticFiles() @RestResource.staticFiles()} annotation
+ * to determine the mappings.
*
* @return The list of static file mappings.
* @throws ParseException
@@ -1986,9 +1930,8 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns the config manager used to create the config file in {@link #createConfigFile()}.
* <p>
- * The default implementation return {@link ConfigMgr#DEFAULT}, but subclasses can override
- * this if they want to provide their own customized config manager.
- * </p>
+ * The default implementation return {@link ConfigMgr#DEFAULT}, but subclasses can override
+ * this if they want to provide their own customized config manager.
*
* @return The config file manager.
*/
@@ -1999,12 +1942,10 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns the logger associated with this servlet.
* <p>
- * Subclasses can override this method to provide their own Java Logging logger.
- * </p>
+ * Subclasses can override this method to provide their own Java Logging logger.
* <p>
- * Subclasses that use other logging libraries such as Apache Commons Logging should
- * override the {@link #log(Level, Throwable, String, Object...)} method instead.
- * </p>
+ * Subclasses that use other logging libraries such as Apache Commons Logging should
+ * override the {@link #log(Level, Throwable, String, Object...)} method instead.
*
* @return The logger associated with this servlet.
*/
@@ -2845,7 +2786,7 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns the variable resolver for this servlet created by the {@link #createVarResolver()} method.
* <p>
- * Variable resolvers are used to replace variables in property values.
+ * Variable resolvers are used to replace variables in property values.
* </p>
* <h6 class='figure'>Example:</h6>
* <p class='bcode'>
@@ -2863,7 +2804,7 @@ public abstract class RestServlet extends HttpServlet {
* <jk>public class</jk> MyRestResource <jk>extends</jk> RestServletDefault {
* </p>
* <p>
- * A typical usage pattern is using variables for resolving URL links when rendering HTML:
+ * A typical usage pattern is using variables for resolving URL links when rendering HTML:
* </p>
* <p class='bcode'>
* <ja>@RestMethod</ja>(
@@ -2878,8 +2819,7 @@ public abstract class RestServlet extends HttpServlet {
* <jk>public</jk> LoggerEntry getLogger(RestRequest req, <ja>@Path</ja> String name) <jk>throws</jk> Exception {
* </p>
* <p>
- * Calls to <code>req.getProperties().getString(<js>"key"</js>)</code> returns strings with variables resolved.
- * </p>
+ * Calls to <code>req.getProperties().getString(<js>"key"</js>)</code> returns strings with variables resolved.
*
* @return The var resolver created by {@link #createVarResolver()}.
*/
@@ -2904,8 +2844,8 @@ public abstract class RestServlet extends HttpServlet {
/**
* Creates the reusable variable resolver for this servlet.
* <p>
- * Subclasses can override this method to provide their own or augment the existing
- * variable provider.
+ * Subclasses can override this method to provide their own or augment the existing
+ * variable provider.
* </p>
* <ul class='spaced-list'>
* <li><code>$C{...}</code> - Values from the config file returned by {@link #getConfig()}.
@@ -2914,19 +2854,15 @@ public abstract class RestServlet extends HttpServlet {
* <li><code>$I{...}</code> - Servlet initialization parameters.
* </ul>
* <p>
- * All variables can provide a 2nd parameter as a default value.
- * </p>
+ * All variables can provide a 2nd parameter as a default value.
* <p>
- * Example: <js>$S{myBooleanProperty,true}"</js>.
- * </p>
+ * Example: <js>$S{myBooleanProperty,true}"</js>.
* <p>
- * Like all other variables, keys and default values can themselves be arbitrarily nested.
- * </p>
+ * Like all other variables, keys and default values can themselves be arbitrarily nested.
* <p>
- * Example: <js>$S{$E{BOOLEAN_PROPERTY_NAME},$E{BOOLEAN_DEFAULT}}"</js>.
- * </p>
+ * Example: <js>$S{$E{BOOLEAN_PROPERTY_NAME},$E{BOOLEAN_DEFAULT}}"</js>.
* <p>
- * Subclasses can augment this list by adding their own variables.
+ * Subclasses can augment this list by adding their own variables.
* </p>
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
@@ -2964,7 +2900,7 @@ public abstract class RestServlet extends HttpServlet {
/**
* Creates a properties map for the specified request.
* <p>
- * This map will automatically resolve any <js>"$X{...}"</js> variables using the {@link VarResolver}
+ * This map will automatically resolve any <js>"$X{...}"</js> variables using the {@link VarResolver}
* returned by {@link #getVarResolver()}.
*
* @param methodProperties The method-level properties.
@@ -3283,11 +3219,11 @@ public abstract class RestServlet extends HttpServlet {
* Same as {@link Class#getResourceAsStream(String)} except if it doesn't find the resource
* on this class, searches up the parent hierarchy chain.
* <p>
- * If the resource cannot be found in the classpath, then an attempt is made to look in the
- * JVM working directory.
+ * If the resource cannot be found in the classpath, then an attempt is made to look in the
+ * JVM working directory.
* <p>
- * If the <code>locale</code> is specified, then we look for resources whose name matches that locale.
- * For example, if looking for the resource <js>"MyResource.txt"</js> for the Japanese locale, we will
+ * If the <code>locale</code> is specified, then we look for resources whose name matches that locale.
+ * For example, if looking for the resource <js>"MyResource.txt"</js> for the Japanese locale, we will
* look for files in the following order:
* <ol>
* <li><js>"MyResource_ja_JP.txt"</js>
@@ -3348,8 +3284,7 @@ public abstract class RestServlet extends HttpServlet {
* Reads the input stream from {@link #getResource(String, Locale)} and parses it into a POJO
* using the parser matched by the specified media type.
* <p>
- * Useful if you want to load predefined POJOs from JSON files in your classpath.
- * </p>
+ * Useful if you want to load predefined POJOs from JSON files in your classpath.
*
* @param c The class type of the POJO to create.
* @param mediaType The media type of the data in the stream (e.g. <js>"text/json"</js>)