This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new 62f61eb Javadocs.
62f61eb is described below
commit 62f61ebfb6c1709a781423f58b4f8e9d2e310912
Author: JamesBognar <[email protected]>
AuthorDate: Fri Jul 20 10:00:17 2018 -0400
Javadocs.
---
.../apache/juneau/http/annotation/RequestBean.java | 12 +++----
.../juneau/httppart/HttpPartSchemaBuilder.java | 2 +-
juneau-doc/src/main/javadoc/overview.html | 8 ++---
.../java/org/apache/juneau/rest/RestRequest.java | 41 +++++++++++++++++++++-
4 files changed, 50 insertions(+), 13 deletions(-)
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/http/annotation/RequestBean.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/http/annotation/RequestBean.java
index c94b4ee..739cd67 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/http/annotation/RequestBean.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/http/annotation/RequestBean.java
@@ -60,10 +60,10 @@ import org.apache.juneau.urlencoding.*;
* <ja>@BeanProperty</ja>(name=<js>"q2"</js>)
* String getQuery2();
*
- * <ja>@QueryIfNE</ja>(<js>"q3"</js>)
+ * <ja>@Query</ja>(name=<js>"q3"</js>, skipIfEmpty=<jk>true</jk>)
* String getQuery3();
*
- * <ja>@QueryIfNE</ja>
+ * <ja>@Query</ja>(skipIfEmpty=<jk>true</jk>)
* Map<String,Object> getExtraQueries();
*
* <ja>@FormData</ja>
@@ -73,10 +73,10 @@ import org.apache.juneau.urlencoding.*;
* <ja>@BeanProperty</ja>(name=<js>"f2"</js>)
* String getFormData2();
*
- * <ja>@FormDataIfNE</ja>(<js>"f3"</js>)
+ * <ja>@FormData</ja>(name=<js>"f3"</js>,skipIfEmpty=<jk>true</jk>)
* String getFormData3();
*
- * <ja>@FormDataIfNE</ja>
+ * <ja>@FormData</ja>(skipIfEmpty=<jk>true</jk>)
* Map<String,Object> getExtraFormData();
*
* <ja>@Header</ja>
@@ -86,10 +86,10 @@ import org.apache.juneau.urlencoding.*;
* <ja>@BeanProperty</ja>(name=<js>"H2"</js>)
* String getHeader2();
*
- * <ja>@HeaderIfNE</ja>(<js>"H3"</js>)
+ * <ja>@Header</ja>(name=<js>"H3"</js>,skipIfEmpty=<jk>true</jk>)
* String getHeader3();
*
- * <ja>@HeaderIfNE</ja>
+ * <ja>@Header</ja>(skipIfEmpty=<jk>true</jk>)
* Map<String,Object> getExtraHeaders();
* }
* </p>
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/HttpPartSchemaBuilder.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/HttpPartSchemaBuilder.java
index 83eac7c..d7c4a2c 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/HttpPartSchemaBuilder.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/HttpPartSchemaBuilder.java
@@ -491,7 +491,7 @@ public class HttpPartSchemaBuilder {
* Determines whether the parameter is mandatory.
*
* <p>
- * Same as {@Link #required(Boolean)} but takes in a boolean value as a
string.
+ * Same as {@link #required(Boolean)} but takes in a boolean value as a
string.
*
* @param value
* The new value for this property.
diff --git a/juneau-doc/src/main/javadoc/overview.html
b/juneau-doc/src/main/javadoc/overview.html
index 194f67d..c6d0530 100644
--- a/juneau-doc/src/main/javadoc/overview.html
+++ b/juneau-doc/src/main/javadoc/overview.html
@@ -12029,7 +12029,6 @@
<li><b>Annotated parameters:</b>
<ul>
<li class='ja'>{@link
org.apache.juneau.http.annotation.Path} - Variables in matched URL path
patterns.
- <li class='ja'>{@link
org.apache.juneau.http.annotation.PathRemainder} - The remainder value after
path pattern match.
<li class='ja'>{@link
org.apache.juneau.http.annotation.FormData} - Multipart form post parameter
values.
<li class='ja'>{@link
org.apache.juneau.http.annotation.HasFormData} - Denotes whether the form data
parameter exists.
<li class='ja'>{@link
org.apache.juneau.http.annotation.Query} - Query parameters. Using this
prevents the HTTP body from being processed as a URL-Encoded form post.
@@ -12037,6 +12036,7 @@
<li class='ja'>{@link
org.apache.juneau.http.annotation.Header} - A header value.
<li class='ja'>{@link
org.apache.juneau.http.annotation.Body} - The HTTP content parsed as a POJO.
<li class='ja'>{@link
org.apache.juneau.rest.annotation.Method} - The HTTP method name.
+ <li class='ja'>{@link
org.apache.juneau.http.annotation.RequestBean} - HTTP parts available through a
proxy bean interface.
</ul>
</ul>
<h5 class='figure'>Example:</h5>
@@ -12433,7 +12433,6 @@
<ul>
<li class='jf'>{@link
org.apache.juneau.rest.RestContext#REST_path}
<li class='ja'>{@link
org.apache.juneau.http.annotation.Path}
- <li class='ja'>{@link
org.apache.juneau.http.annotation.PathRemainder}
<li class='jc'>{@link
org.apache.juneau.rest.RequestPath}
</ul>
</div>
@@ -12480,7 +12479,6 @@
<h5 class='section'>See Also:</h5>
<ul>
<li class='ja'>{@link
org.apache.juneau.http.annotation.Path}
- <li class='ja'>{@link
org.apache.juneau.http.annotation.PathRemainder}
</ul>
</div>
@@ -24911,7 +24909,7 @@
<li>
New
<code><del>org.apache.juneau.remoteable.Path</del></code> annotation for
specifying path variables on remoteable interfaces.
<li>
- New {@link
org.apache.juneau.remoteable.RequestBean @RequestBean} annotation for
specifying beans with remoteable annotations
+ New <code><del>@RequestBean</del></code>
annotation for specifying beans with remoteable annotations
defined on properties.
<li>
The following annotations (and related methods
on RestCall) can now take <code>NameValuePairs</code> and beans as input
@@ -25196,7 +25194,7 @@
<li>{@link
org.apache.juneau.rest.client.RestCall#getResponseAsStringFuture()
getResponseAsStringFuture()}
<li>{@link
org.apache.juneau.rest.client.RestCall#serializer(Serializer)
serializer(Serializer)} - Override the serializer defined on the client for a
single call.
<li>{@link
org.apache.juneau.rest.client.RestCall#parser(Parser) parser(Parser)} -
Override the parser defined on the client for a single call.
- <li>{@link
org.apache.juneau.rest.client.RestCall#input(Object) input(Object)} - Now
accepts instances of {@link org.apache.juneau.rest.client.NameValuePairs}.
+
<li><code><del>input(Object)</del></code> - Now accepts instances of {@link
org.apache.juneau.rest.client.NameValuePairs}.
<li>{@link
org.apache.juneau.rest.client.RestCall#getResponse(Class) getResponse(Class)} -
Can now pass in any of the following:
<ul>
<li>{@link
org.apache.http.HttpResponse} - Returns the raw <code>HttpResponse</code>
returned by the inner <code>HttpClient</code>.
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java
index 3e2dfd9..2ca8558 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java
@@ -1409,7 +1409,46 @@ public final class RestRequest extends
HttpServletRequestWrapper {
}
/**
- * TODO
+ * Creates a proxy interface to retrieve HTTP parts of this request as
a proxy bean.
+ *
+ * <h5 class='section'>Examples:</h5>
+ * <p class='bcode w800'>
+ * <ja>@RestMethod</ja>(path=<js>"/mypath/{p1}/{p2}/*"</js>)
+ * <jk>public void</jk> myMethod(@RequestBean MyRequestBean rb)
{...}
+ *
+ * <jk>public interface</jk> MyRequestBean {
+ *
+ * <ja>@Path</ja> <jc>// Path variable name inferred from
getter.</jc>
+ * String getP1();
+ *
+ * <ja>@Path</ja>(<js>"p2"</js>)
+ * String getX();
+ *
+ * <ja>@Path</ja>(<js>"/*"</js>)
+ * String getRemainder();
+ *
+ * <ja>@Query</ja>
+ * String getQ1();
+ *
+ * <ja>@Query</ja>
+ * <ja>@BeanProperty</ja>(name=<js>"q2"</js>)
+ * String getQuery2();
+ *
+ * <jc>// Schema-based query parameter: Pipe-delimited
lists of comma-delimited lists of integers.</jc>
+ * <ja>@Query</ja>(
+ * collectionFormat=<js>"pipes"</js>
+ * items=<ja>@Items</ja>(
+ * items=<ja>@SubItems</ja>(
+ * collectionFormat=<js>"csv"</js>
+ * type=<js>"integer"</js>
+ * )
+ * )
+ * )
+ * <jk>int</jk>[][] getQ3();
+ *
+ * <ja>@Header</ja>(<js>"*"</js>)
+ * Map<String,Object> getHeaders();
+ * </p>
*
* @param c The request bean interface to instantiate.
* @return A new request bean proxy for this REST request.