| <!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>Contact (Apache Juneau 8.2.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="Contact (Apache Juneau 8.2.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/CollectionFormatType.html" title="class in org.apache.juneau.http.annotation"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/juneau/http/annotation/ContactAnnotation.html" title="class in org.apache.juneau.http.annotation"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/juneau/http/annotation/Contact.html" target="_top">Frames</a></li> |
| <li><a href="Contact.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All 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: </li> |
| <li>Field | </li> |
| <li>Required | </li> |
| <li><a href="#annotation.type.optional.element.summary">Optional</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </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 Contact" class="title">Annotation Type Contact</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/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>) |
| public @interface <a href="../../../../../src-html/org/apache/juneau/http/annotation/Contact.html#line.62">Contact</a></pre> |
| <div class="block">Swagger contact annotation. |
| |
| <p> |
| The contact information for the exposed API. |
| |
| <p> |
| Used to populate the auto-generated Swagger documentation and UI for server-side <ja>@Rest</ja>-annotated classes. |
| |
| <h5 class='section'>Examples:</h5> |
| <p class='bcode w800'> |
| <jc>// Normal</jc> |
| <ja>@Rest</ja>( |
| swagger=<ja>@ResourceSwagger</ja>( |
| contact=<ja>@Contact</ja>( |
| name=<js>"Juneau Development Team"</js>, |
| email=<js>"dev@juneau.apache.org"</js>, |
| url=<js>"http://juneau.apache.org"</js> |
| ) |
| ) |
| ) |
| </p> |
| <p class='bcode w800'> |
| <jc>// Free-form</jc> |
| <ja>@Rest</ja>( |
| swagger=<ja>@ResourceSwagger</ja>( |
| contact=<ja>@Contact</ja>({ |
| <js>"name:'Juneau Development Team',"</js>, |
| <js>"email:'dev@juneau.apache.org',"</js>, |
| <js>"url:'http://juneau.apache.org',"</js>, |
| <js>"x-extra:'extra field'"</js> |
| }) |
| ) |
| ) |
| </p> |
| |
| <ul class='seealso'> |
| <li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-rest-server.RestSwagger'>Overview > juneau-rest-server > Swagger</a> |
| <li class='extlink'><a class='doclink' href='https://swagger.io/specification/v2#contactObject'>Swagger Contact Object</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"> </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/Contact.html#email--">email</a></span></code> |
| <div class="block"><mk>email</mk> field of the <a class='doclink' href='https://swagger.io/specification/v2#contactObject'>Swagger Contact Object</a>.</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/Contact.html#name--">name</a></span></code> |
| <div class="block"><mk>name</mk> field of the <a class='doclink' href='https://swagger.io/specification/v2#contactObject'>Swagger Contact Object</a>.</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/Contact.html#url--">url</a></span></code> |
| <div class="block"><mk>url</mk> field of the <a class='doclink' href='https://swagger.io/specification/v2#contactObject'>Swagger Contact Object</a>.</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/Contact.html#value--">value</a></span></code> |
| <div class="block">Free-form value for the <a class='doclink' href='https://swagger.io/specification/v2#contactObject'>Swagger Contact Object</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="name--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>name</h4> |
| <pre>public abstract <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> <a href="../../../../../src-html/org/apache/juneau/http/annotation/Contact.html#line.78">name</a></pre> |
| <div class="block"><mk>name</mk> field of the <a class='doclink' href='https://swagger.io/specification/v2#contactObject'>Swagger Contact Object</a>. |
| |
| <p> |
| The identifying name of the contact person/organization. |
| |
| <ul class='notes'> |
| <li> |
| The format is a plain-text string. |
| <li> |
| Supports <a class='doclink' href='../../../../../overview-summary.html#juneau-rest-server.RestSvlVariables'>Overview > juneau-rest-server > SVL Variables</a> |
| (e.g. <js>"$L{my.localized.variable}"</js>). |
| </ul></div> |
| <dl> |
| <dt>Default:</dt> |
| <dd>""</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="url--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>url</h4> |
| <pre>public abstract <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> <a href="../../../../../src-html/org/apache/juneau/http/annotation/Contact.html#line.94">url</a></pre> |
| <div class="block"><mk>url</mk> field of the <a class='doclink' href='https://swagger.io/specification/v2#contactObject'>Swagger Contact Object</a>. |
| |
| <p> |
| The URL pointing to the contact information. MUST be in the format of a URL. |
| |
| <ul class='notes'> |
| <li> |
| The format is a URL string. |
| <li> |
| Supports <a class='doclink' href='../../../../../overview-summary.html#juneau-rest-server.RestSvlVariables'>Overview > juneau-rest-server > SVL Variables</a> |
| (e.g. <js>"$L{my.localized.variable}"</js>). |
| </ul></div> |
| <dl> |
| <dt>Default:</dt> |
| <dd>""</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="email--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>email</h4> |
| <pre>public abstract <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> <a href="../../../../../src-html/org/apache/juneau/http/annotation/Contact.html#line.110">email</a></pre> |
| <div class="block"><mk>email</mk> field of the <a class='doclink' href='https://swagger.io/specification/v2#contactObject'>Swagger Contact Object</a>. |
| |
| <p> |
| The email address of the contact person/organization. MUST be in the format of an email address. |
| |
| <ul class='notes'> |
| <li> |
| The format is an email string. |
| <li> |
| Supports <a class='doclink' href='../../../../../overview-summary.html#juneau-rest-server.RestSvlVariables'>Overview > juneau-rest-server > SVL Variables</a> |
| (e.g. <js>"$L{my.localized.variable}"</js>). |
| </ul></div> |
| <dl> |
| <dt>Default:</dt> |
| <dd>""</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 <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>[] <a href="../../../../../src-html/org/apache/juneau/http/annotation/Contact.html#line.184">value</a></pre> |
| <div class="block">Free-form value for the <a class='doclink' href='https://swagger.io/specification/v2#contactObject'>Swagger Contact Object</a>. |
| |
| <p> |
| This is a JSON object that makes up the swagger information for this field. |
| |
| <p> |
| The following are completely equivalent ways of defining the swagger description of the contact information: |
| <p class='bcode w800'> |
| <jc>// Normal</jc> |
| <ja>@Rest</ja>( |
| swagger=<ja>@ResourceSwagger</ja>( |
| contact=<ja>@Contact</ja>( |
| name=<js>"Juneau Development Team"</js>, |
| email=<js>"dev@juneau.apache.org"</js>, |
| url=<js>"http://juneau.apache.org"</js> |
| ) |
| ) |
| ) |
| </p> |
| <p class='bcode w800'> |
| <jc>// Free-form</jc> |
| <ja>@Rest</ja>( |
| swagger=<ja>@ResourceSwagger</ja>( |
| contact=<ja>@Contact</ja>({ |
| <js>"name: 'Juneau Development Team',"</js>, |
| <js>"email: 'dev@juneau.apache.org',"</js>, |
| <js>"url: 'http://juneau.apache.org'"</js>, |
| }) |
| ) |
| ) |
| </p> |
| <p class='bcode w800'> |
| <jc>// Free-form with variables</jc> |
| <ja>@Rest</ja>( |
| swagger=<ja>@ResourceSwagger</ja>( |
| contact=<ja>@Contact</ja>(<js>"$L{contactSwagger}"</js>) |
| ) |
| </p> |
| <p class='bcode w800'> |
| <mc>// Contents of MyResource.properties</mc> |
| <mk>contactSwagger</mk> = <mv>{ name: "Juneau Development Team", email: "dev@juneau.apache.org", url: "http://juneau.apache.org" }</mv> |
| </p> |
| |
| <p> |
| The reasons why you may want to use this field include: |
| <ul> |
| <li>You want to pull in the entire Swagger JSON definition for this field from an external source such as a properties file. |
| <li>You want to add extra fields to the Swagger documentation that are not officially part of the Swagger specification. |
| </ul> |
| |
| <ul class='notes'> |
| <li> |
| The format is a <a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.JsonDetails.SimplifiedJson'>Overview > juneau-marshall > JSON Details > Simplified JSON</a> object. |
| <li> |
| The leading/trailing <c>{ }</c> characters are optional. |
| <br>The following two example are considered equivalent: |
| <p class='bcode w800'> |
| <ja>@Contact</ja>(<js>"{name: 'Juneau Development Team'}"</js>) |
| </p> |
| <p class='bcode w800'> |
| <ja>@Contact</ja>(<js>"name: 'Juneau Development Team'"</js>) |
| </p> |
| <li> |
| Multiple lines are concatenated with newlines so that you can format the value to be readable. |
| <li> |
| Supports <a class='doclink' href='../../../../../overview-summary.html#juneau-rest-server.RestSvlVariables'>Overview > juneau-rest-server > SVL Variables</a> |
| (e.g. <js>"$L{my.localized.variable}"</js>). |
| <li> |
| Values defined in this field supersede values pulled from the Swagger JSON file and are superseded by individual values defined on this annotation. |
| </ul></div> |
| <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/CollectionFormatType.html" title="class in org.apache.juneau.http.annotation"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/juneau/http/annotation/ContactAnnotation.html" title="class in org.apache.juneau.http.annotation"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/juneau/http/annotation/Contact.html" target="_top">Frames</a></li> |
| <li><a href="Contact.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All 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: </li> |
| <li>Field | </li> |
| <li>Required | </li> |
| <li><a href="#annotation.type.optional.element.summary">Optional</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </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 © 2016–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |