blob: 3e9be7c10db56cc70f32bd6c85c62cd0a1b52731 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>FormData (Apache Juneau 9.0.0)</title>
<link rel="stylesheet" type="text/css" href="../../../../../javadoc.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="FormData (Apache Juneau 9.0.0)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/juneau/http/annotation/FormatType.html" title="class in org.apache.juneau.http.annotation"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/juneau/http/annotation/FormDataAnnotation.html" title="class in org.apache.juneau.http.annotation"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/juneau/http/annotation/FormData.html" target="_top">Frames</a></li>
<li><a href="FormData.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Required&nbsp;|&nbsp;</li>
<li><a href="#annotation.type.optional.element.summary">Optional</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#annotation.type.element.detail">Element</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.juneau.http.annotation</div>
<h2 title="Annotation Type FormData" class="title">Annotation Type FormData</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Documented.html?is-external=true" title="class or interface in java.lang.annotation">@Documented</a>
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Target.html?is-external=true" title="class or interface in java.lang.annotation">@Target</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Target.html?is-external=true#value--" title="class or interface in java.lang.annotation">value</a>={<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/ElementType.html?is-external=true#PARAMETER" title="class or interface in java.lang.annotation">PARAMETER</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/ElementType.html?is-external=true#METHOD" title="class or interface in java.lang.annotation">METHOD</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/ElementType.html?is-external=true#TYPE" title="class or interface in java.lang.annotation">TYPE</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/ElementType.html?is-external=true#FIELD" title="class or interface in java.lang.annotation">FIELD</a>})
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Retention.html?is-external=true" title="class or interface in java.lang.annotation">@Retention</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Retention.html?is-external=true#value--" title="class or interface in java.lang.annotation">value</a>=<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/RetentionPolicy.html?is-external=true#RUNTIME" title="class or interface in java.lang.annotation">RUNTIME</a>)
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Inherited.html?is-external=true" title="class or interface in java.lang.annotation">@Inherited</a>
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Repeatable.html?is-external=true" title="class or interface in java.lang.annotation">@Repeatable</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Repeatable.html?is-external=true#value--" title="class or interface in java.lang.annotation">value</a>=<a href="../../../../../org/apache/juneau/http/annotation/FormDataAnnotation.Array.html" title="annotation in org.apache.juneau.http.annotation">FormDataAnnotation.Array.class</a>)
<a href="../../../../../org/apache/juneau/annotation/ContextApply.html" title="annotation in org.apache.juneau.annotation">@ContextApply</a>(<a href="../../../../../org/apache/juneau/annotation/ContextApply.html#value--">value</a>=<a href="../../../../../org/apache/juneau/http/annotation/FormDataAnnotation.Applier.html" title="class in org.apache.juneau.http.annotation">FormDataAnnotation.Applier.class</a>)
public @interface <a href="../../../../../src-html/org/apache/juneau/http/annotation/FormData.html#line.123">FormData</a></pre>
<div class="block">REST request form-data annotation.
<p>
Identifies a POJO to be used as a form-data entry on an HTTP request.
<p>
Can be used in the following locations:
<ul>
<li>Arguments and argument-types of server-side <ja>@RestOp</ja>-annotated methods.
<li>Arguments and argument-types of client-side <ja>@RemoteResource</ja>-annotated interfaces.
<li>Methods and return types of server-side and client-side <ja>@Request</ja>-annotated interfaces.
</ul>
<h5 class='topic'>Arguments and argument-types of server-side @RestOp-annotated methods</h5>
<p>
Annotation that can be applied to a parameter of a <ja>@RestOp</ja>-annotated method to identify it as a form-data parameter.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<ja>@RestPost</ja>
<jk>public void</jk> doPost(
<ja>@FormData</ja>(<js>"p1"</js>) <jk>int</jk> <jv>p1</jv>,
<ja>@FormData</ja>(<js>"p2"</js>) String <jv>p2</jv>,
<ja>@FormData</ja>(<js>"p3"</js>) UUID <jv>p3</jv>
) {...}
</p>
<p>
This is functionally equivalent to the following code...
<p class='bjava'>
<ja>@RestPost</ja>
<jk>public void</jk> doPost(RestRequest <jv>req</jv>) {
<jk>int</jk> <jv>p1</jv> = <jv>req</jv>.getFormParam(<js>"p1"</js>).as(<jk>int</jk>.<jk>class</jk>).orElse(0);
String <jv>p2</jv> = <jv>req</jv>.getFormParam(<js>"p2"</js>).asString().orElse(<jk>null</jk>);
UUID <jv>p3</jv> = <jv>req</jv>.getFormParam(<js>"p3"</js>).as(UUID.<jk>class</jk>).orElse(<jk>null</jk>);
...
}
</p>
<ul class='seealso'>
<li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-rest-server.jrs.Swagger'>Overview &gt; juneau-rest-server &gt; Swagger</a>
<li class='extlink'><a class='doclink' href='https://swagger.io/specification/v2#parameterObject'>Swagger Parameter Object</a>
</ul>
<h5 class='topic'>Important note concerning FORM posts</h5>
<p>
This annotation should not be combined with the <a href="../../../../../org/apache/juneau/http/annotation/Content.html" title="annotation in org.apache.juneau.http.annotation"><code>@Content</code></a> annotation or <c>RestRequest.getContent()</c> method
for <c>application/x-www-form-urlencoded POST</c> posts, since it will trigger the underlying servlet
API to parse the body content as key-value pairs resulting in empty content.
<p>
The <a href="../../../../../org/apache/juneau/http/annotation/Query.html" title="annotation in org.apache.juneau.http.annotation"><code>@Query</code></a> annotation can be used to retrieve a URL parameter in the URL string without triggering the
servlet to drain the body content.
<h5 class='topic'>Arguments and argument-types of client-side @RemoteResource-annotated interfaces</h5>
<p>
Annotation applied to Java method arguments of interface proxies to denote that they are FORM post parameters on the
request.
<ul class='seealso'>
<li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-rest-client.jrc.Proxies.jrc.FormData'>Overview &gt; juneau-rest-client &gt; REST Proxies &gt; @FormData</a>
<li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-rest-client.jrc.Proxies.jrc.Request'>Overview &gt; juneau-rest-client &gt; REST Proxies &gt; @Request</a>
</ul>
<h5 class='topic'>Methods and return types of server-side and client-side @Request-annotated interfaces</h5>
<p>
<ul class='seealso'>
<li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-rest-client.jrc.Proxies.jrc.Request'>Overview &gt; juneau-rest-client &gt; REST Proxies &gt; @Request</a>
</ul>
<div class='warn'>
This annotation should not be combined with the <a href="../../../../../org/apache/juneau/http/annotation/Content.html" title="annotation in org.apache.juneau.http.annotation"><code>@Content</code></a> annotation or <c>RestRequest#getContent()</c> method
for <c>application/x-www-form-urlencoded POST</c> posts, since it will trigger the underlying servlet
API to parse the body content as key-value pairs resulting in empty content.
<br>The <a href="../../../../../org/apache/juneau/http/annotation/Query.html" title="annotation in org.apache.juneau.http.annotation"><code>@Query</code></a> annotation can be used to retrieve a URL parameter in the URL string without triggering the
servlet to drain the body content.
</div>
<div class='warn'>
If using this annotation on a Spring bean, note that you are likely to encounter issues when using on parameterized
types such as <code>List&lt;MyBean&gt;</code>. This is due to the fact that Spring uses CGLIB to recompile classes
at runtime, and CGLIB was written before generics were introduced into Java and is a virtually-unsupported library.
Therefore, parameterized types will often be stripped from class definitions and replaced with unparameterized types
(e.g. <code>List</code>). Under these circumstances, you are likely to get <code>ClassCastExceptions</code>
when trying to access generalized <code>JsonMaps</code> as beans. The best solution to this issue is to either
specify the parameter as a bean array (e.g. <code>MyBean[]</code>) or declare the method as final so that CGLIB
will not try to recompile it.
</div>
<ul class='seealso'>
<li class='extlink'><a class='doclink' target='_blank' href='https://github.com/apache/juneau/blob/master/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/http/annotation/FormData.java'>Source</a>
</ul></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="annotation.type.optional.element.summary">
<!-- -->
</a>
<h3>Optional Element Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation">
<caption><span>Optional Elements</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Optional Element and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/FormData.html#def--">def</a></span></code>
<div class="block">Default value for this parameter.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/FormData.html#name--">name</a></span></code>
<div class="block">FORM parameter name.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/FormData.html#on--">on</a></span></code>
<div class="block">Dynamically apply this annotation to the specified classes.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/FormData.html#onClass--">onClass</a></span></code>
<div class="block">Dynamically apply this annotation to the specified classes.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../../org/apache/juneau/httppart/HttpPartParser.html" title="interface in org.apache.juneau.httppart">HttpPartParser</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/FormData.html#parser--">parser</a></span></code>
<div class="block">Specifies the <a href="../../../../../org/apache/juneau/httppart/HttpPartParser.html" title="interface in org.apache.juneau.httppart"><code>HttpPartParser</code></a> class used for parsing strings to values.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/juneau/annotation/Schema.html" title="annotation in org.apache.juneau.annotation">Schema</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/FormData.html#schema--">schema</a></span></code>
<div class="block"><mk>schema</mk> field of the <a class='doclink' href='https://swagger.io/specification/v2#parameterObject'>Swagger Parameter Object</a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/FormData.html#serializer--">serializer</a></span></code>
<div class="block">Specifies the <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart"><code>HttpPartSerializer</code></a> class used for serializing values to strings.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/FormData.html#value--">value</a></span></code>
<div class="block">A synonym for <a href="../../../../../org/apache/juneau/http/annotation/FormData.html#name--"><code>name()</code></a>.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="annotation.type.element.detail">
<!-- -->
</a>
<h3>Element Detail</h3>
<a name="def--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>def</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/juneau/http/annotation/FormData.html#line.130">def</a></pre>
<div class="block">Default value for this parameter.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The annotation value.</dd>
</dl>
<dl>
<dt>Default:</dt>
<dd>""</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="name--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>name</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/juneau/http/annotation/FormData.html#line.196">name</a></pre>
<div class="block">FORM parameter name.
<p>
The name of the parameter (required).
<p>
The value should be either a valid form parameter name, or <js>"*"</js> to represent multiple name/value pairs
<p>
A blank value (the default) has the following behavior:
<ul class='spaced-list'>
<li>
If the data type is <c>NameValuePairs</c>, <c>Map</c>, or a bean,
then it's the equivalent to <js>"*"</js> which will cause the value to be serialized as name/value pairs.
<h5 class='figure'>Examples:</h5>
<p class='bjava'>
<jc>// When used on a REST method</jc>
<ja>@RestPost</ja>(<js>"/addPet"</js>)
<jk>public void</jk> addPet(<ja>@FormData</ja> JsonMap <jv>allFormDataParameters</jv>) {...}
</p>
<p class='bjava'>
<jc>// When used on a remote method parameter</jc>
<ja>@RemoteResource</ja>(path=<js>"/myproxy"</js>)
<jk>public interface</jk> MyProxy {
<jc>// Equivalent to @FormData("*")</jc>
<ja>@RemotePost</ja>(<js>"/mymethod"</js>)
String myProxyMethod1(<ja>@FormData</ja> Map&lt;String,Object&gt; <jv>allFormDataParameters</jv>);
}
</p>
<p class='bjava'>
<jc>// When used on a request bean method</jc>
<jk>public interface</jk> MyRequest {
<jc>// Equivalent to @FormData("*")</jc>
<ja>@FormData</ja>
Map&lt;String,Object&gt; getFoo();
}
</p>
</li>
<li>
If used on a request bean method, uses the bean property name.
<h5 class='figure'>Example:</h5>
<p class='bjava'>
<jk>public interface</jk> MyRequest {
<jc>// Equivalent to @FormData("foo")</jc>
<ja>@FormData</ja>
String getFoo();
}
</p>
</li>
</ul>
<ul class='notes'>
<li class='note'>
The format is plain-text.
</ul></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The annotation value.</dd>
</dl>
<dl>
<dt>Default:</dt>
<dd>""</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="on--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>on</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;<a href="../../../../../src-html/org/apache/juneau/http/annotation/FormData.html#line.207">on</a></pre>
<div class="block">Dynamically apply this annotation to the specified classes.
<ul class='seealso'>
<li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.jm.DynamicallyAppliedAnnotations'>Overview &gt; juneau-marshall &gt; Dynamically Applied Annotations</a>
</ul></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The annotation value.</dd>
</dl>
<dl>
<dt>Default:</dt>
<dd>{}</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="onClass--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onClass</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;[]&nbsp;<a href="../../../../../src-html/org/apache/juneau/http/annotation/FormData.html#line.221">onClass</a></pre>
<div class="block">Dynamically apply this annotation to the specified classes.
<p>
Identical to <a href="../../../../../org/apache/juneau/http/annotation/FormData.html#on--"><code>on()</code></a> except allows you to specify class objects instead of a strings.
<ul class='seealso'>
<li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.jm.DynamicallyAppliedAnnotations'>Overview &gt; juneau-marshall &gt; Dynamically Applied Annotations</a>
</ul></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The annotation value.</dd>
</dl>
<dl>
<dt>Default:</dt>
<dd>{}</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="parser--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parser</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../../org/apache/juneau/httppart/HttpPartParser.html" title="interface in org.apache.juneau.httppart">HttpPartParser</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/juneau/http/annotation/FormData.html#line.231">parser</a></pre>
<div class="block">Specifies the <a href="../../../../../org/apache/juneau/httppart/HttpPartParser.html" title="interface in org.apache.juneau.httppart"><code>HttpPartParser</code></a> class used for parsing strings to values.
<p>
Overrides for this part the part parser defined on the REST resource which by default is <a href="../../../../../org/apache/juneau/oapi/OpenApiParser.html" title="class in org.apache.juneau.oapi"><code>OpenApiParser</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The annotation value.</dd>
</dl>
<dl>
<dt>Default:</dt>
<dd>org.apache.juneau.httppart.HttpPartParser.Void.class</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="schema--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>schema</h4>
<pre>public abstract&nbsp;<a href="../../../../../org/apache/juneau/annotation/Schema.html" title="annotation in org.apache.juneau.annotation">Schema</a>&nbsp;<a href="../../../../../src-html/org/apache/juneau/http/annotation/FormData.html#line.256">schema</a></pre>
<div class="block"><mk>schema</mk> field of the <a class='doclink' href='https://swagger.io/specification/v2#parameterObject'>Swagger Parameter Object</a>.
<p>
The schema defining the type used for parameter.
<p>
The <a href="../../../../../org/apache/juneau/annotation/Schema.html" title="annotation in org.apache.juneau.annotation"><code>@Schema</code></a> annotation can also be used standalone on the parameter or type.
Values specified on this field override values specified on the type, and values specified on child types override values
specified on parent types.
<h5 class='section'>Used for:</h5>
<ul class='spaced-list'>
<li>
Server-side schema-based parsing and parsing validation.
<li>
Server-side generated Swagger documentation.
<li>
Client-side schema-based serializing and serializing validation.
</ul></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The annotation value.</dd>
</dl>
<dl>
<dt>Default:</dt>
<dd>@org.apache.juneau.annotation.Schema</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="serializer--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>serializer</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/juneau/http/annotation/FormData.html#line.266">serializer</a></pre>
<div class="block">Specifies the <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart"><code>HttpPartSerializer</code></a> class used for serializing values to strings.
<p>
Overrides for this part the part serializer defined on the REST client which by default is <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The annotation value.</dd>
</dl>
<dl>
<dt>Default:</dt>
<dd>org.apache.juneau.httppart.HttpPartSerializer.Void.class</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="value--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>value</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/juneau/http/annotation/FormData.html#line.285">value</a></pre>
<div class="block">A synonym for <a href="../../../../../org/apache/juneau/http/annotation/FormData.html#name--"><code>name()</code></a>.
<p>
Allows you to use shortened notation if you're only specifying the name.
<p>
The following are completely equivalent ways of defining a form post entry:
<p class='bjava'>
<jk>public</jk> Order placeOrder(<ja>@FormData</ja>(name=<js>"petId"</js>) <jk>long</jk> <jv>petId</jv>) {...}
</p>
<p class='bjava'>
<jk>public</jk> Order placeOrder(<ja>@FormData</ja>(<js>"petId"</js>) <jk>long</jk> <jv>petId</jv>) {...}
</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The annotation value.</dd>
</dl>
<dl>
<dt>Default:</dt>
<dd>""</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/juneau/http/annotation/FormatType.html" title="class in org.apache.juneau.http.annotation"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/juneau/http/annotation/FormDataAnnotation.html" title="class in org.apache.juneau.http.annotation"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/juneau/http/annotation/FormData.html" target="_top">Frames</a></li>
<li><a href="FormData.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Required&nbsp;|&nbsp;</li>
<li><a href="#annotation.type.optional.element.summary">Optional</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#annotation.type.element.detail">Element</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2016&#x2013;2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>