Author: buildbot Date: Mon Aug 11 08:17:52 2014 New Revision: 919005 Log: Production update by buildbot for camel
Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/facebook.html websites/production/camel/content/swagger.html Modified: websites/production/camel/content/cache/main.pageCache ============================================================================== Binary files - no diff available. Modified: websites/production/camel/content/facebook.html ============================================================================== --- websites/production/camel/content/facebook.html (original) +++ websites/production/camel/content/facebook.html Mon Aug 11 08:17:52 2014 @@ -84,125 +84,29 @@ <tbody> <tr> <td valign="top" width="100%"> -<div class="wiki-content maincontent"><h2 id="Facebook-FacebookComponent">Facebook Component</h2> - -<p><strong>Available as of Camel 2.12</strong></p> - -<p>The Facebook component provides access to all of the Facebook APIs accessible using <a shape="rect" class="external-link" href="http://facebook4j.org/en/index.html" rel="nofollow">Facebook4J</a>. It allows producing messages to retrieve, add, and delete posts, likes, comments, photos, albums, videos, photos, checkins, locations, links, etc. It also supports APIs that allow polling for posts, users, checkins, groups, locations, etc. </p> - -<p>Facebook requires the use of OAuth for all client application authentication. In order to use camel-facebook with your account, you'll need to create a new application within Facebook at <a shape="rect" class="external-link" href="https://developers.facebook.com/apps" rel="nofollow">https://developers.facebook.com/apps</a> and grant the application access to your account. The Facebook application's id and secret will allow access to Facebook APIs which do not require a current user. A user access token is required for APIs that require a logged in user. More information on obtaining a user access token can be found at <a shape="rect" class="external-link" href="https://developers.facebook.com/docs/facebook-login/access-tokens/" rel="nofollow">https://developers.facebook.com/docs/facebook-login/access-tokens/</a>.</p> - -<p>Maven users will need to add the following dependency to their pom.xml for this component:</p> -<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> -<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ - <dependency> +<div class="wiki-content maincontent"><h2 id="Facebook-FacebookComponent">Facebook Component</h2><p><strong>Available as of Camel 2.12</strong></p><p>The Facebook component provides access to all of the Facebook APIs accessible using <a shape="rect" class="external-link" href="http://facebook4j.org/en/index.html" rel="nofollow">Facebook4J</a>. It allows producing messages to retrieve, add, and delete posts, likes, comments, photos, albums, videos, photos, checkins, locations, links, etc. It also supports APIs that allow polling for posts, users, checkins, groups, locations, etc.</p><p>Facebook requires the use of OAuth for all client application authentication. In order to use camel-facebook with your account, you'll need to create a new application within Facebook at <a shape="rect" class="external-link" href="https://developers.facebook.com/apps" rel="nofollow">https://developers.facebook.com/apps</a> and grant the application access to your account. The Facebook application's id and secret will allow access to Facebook APIs which do not require a current user. A user access token is required for APIs that require a logged in user. More information on obtaining a user access token can be found at <a shape="rect" class="external-link" href="https://developers.facebook.com/docs/facebook-login/access-tokens/" rel="nofollow">https://developers.facebook.com/docs/facebook-login/access-tokens/</a>.</p><p>Maven users will need to add the following dependency to their pom.xml for this component:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-facebook</artifactId> <version>${camel-version}</version> </dependency> ]]></script> -</div></div> - -<h3 id="Facebook-URIformat">URI format </h3> -<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> -<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ - facebook://[endpoint]?[options] +</div></div><h3 id="Facebook-URIformat">URI format</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ facebook://[endpoint]?[options] ]]></script> -</div></div> - -<h3 id="Facebook-FacebookComponent.1">FacebookComponent</h3> - -<p>The facebook component can be configured with the Facebook account settings below, which are mandatory. The values can be provided to the component using the bean property <strong>configuration</strong> of type <strong>org.apache.camel.component.facebook.config.FacebookConfiguration</strong>. The <strong>oAuthAccessToken</strong> option may be ommited but that will only allow access to application APIs. </p> - -<p>You can also configure these options directly in an endpoint URI. </p> - -<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Option </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> oAuthAppId </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The application Id </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> oAuthAppSecret </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The application Secret </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> oAuthAccessToken </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The user access token </p></td></tr></tbody></table></div> - - -<p>In addition to the above settings, non-mandatory options below can be used to configure the underlying Facebook4J runtime through either the component's <strong>configuration</strong> property or in an endpoint URI. </p> - -<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Option </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Default Value </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> oAuthAuthorizationURL </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> OAuth authorization URL </p></td><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" class="external-link" href="https://www.facebook.com/dialog/oauth" rel="nofollow">https://www.facebook.com/dialog/oauth</a> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> oAuthPermissions </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Default OAuth permissions. Comma separeted permission names. See </p> -<a shape="rect" class="external-link" href="https://developers.facebook.com/docs/reference/login/#permissions" rel="nofollow">https://developers.facebook.com/docs/reference/login/#permissions</a> -<p> for the detail </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> null </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> oAuthAccessTokenURL </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> OAuth access token URL </p></td><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" class="external-link" href="https://graph.facebook.com/oauth/access_token" rel="nofollow">https://graph.facebook.com/oauth/access_token</a> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> debugEnabled </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Enables deubg output. Effective only with the embedded logger </p></td><td colspan="1" rowspa n="1" class="confluenceTd"><p> false </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> gzipEnabled </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Use Facebook GZIP encoding </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> true </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> httpConnectionTimeout </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Http connection timeout in milliseconds </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 20000 </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd" ><p> httpDefaultMaxPerRoute </p></td><td colspan="1" rowspan="1" >class="confluenceTd"><p> HTTP maximum connections per route > > </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> >2 </p></td></tr><tr><td >colspan="1" rowspan="1" class="confluenceTd"><p> httpMaxTotalConnections ></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> HTTP maximum >total connections > </p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p> 20 > </p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p> httpProxyHost </p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p> HTTP proxy server host name > </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> null </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> httpProxyPassword </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> HTTP proxy server password </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> null </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> httpProxyPort </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> HTTP proxy server port </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> null </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> httpProxyUser </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> HTTP proxy server user name </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> null </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> httpReadTimeout </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Http read timeout in milliseconds </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 120000 </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> httpRetryCount </p></t d><td colspan="1" rowspan="1" class="confluenceTd"><p> Number of HTTP retries </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 0 </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> httpRetryIntervalSeconds </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> HTTP retry interval in seconds </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 5 </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> httpStreamingReadTimeout </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> HTTP streaming read timeout in milliseconds </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 40000 </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> jsonStoreEnabled </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> If set to true, raw JSON forms will be stored in DataObjectFactory </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> false </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> mbeanEnabled </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> If set to true, Facebook4J mbean will be registerd </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> false </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> prettyDebugEnabled </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> prettify JSON debug output if set to true </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> false </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> restBaseURL </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> API base URL </p></td><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" class="external-link" href="https://graph.facebook.com/" rel="nofollow">https://graph.facebook.com/</a> </td></tr><tr><td colspan="1" rowspan="1" class="co nfluenceTd"><p> useSSL </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Use SSL </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> true </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> videoBaseURL </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Video API base URL </p></td><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" class="external-link" href="https://graph-video.facebook.com/" rel="nofollow">https://graph-video.facebook.com/</a> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> clientURL </p></td><td colspan= "1" rowspan="1" class="confluenceTd"><p> Facebook4J API client URL </p></td><td colspan="1" rowspan="1" class="confluenceTd"> http://facebook4j.org/en/facebook4j-<version>.xml </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> clientVersion </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Facebook4J client API version </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 1.1.12 </p></td></tr></tbody></table></div> - - -<h3 id="Facebook-ProducerEndpoints:">Producer Endpoints: </h3> - -<p>Producer endpoints can use endpoint names and options from the table below. Endpoints can also use the short name without the <strong>get</strong> or <strong>search</strong> prefix, except <strong>checkin</strong> due to ambiguity between <strong>getCheckin</strong> and <strong>searchCheckin</strong>. Endpoint options that are not mandatory are denoted by []. </p> - -<p>Producer endpoints can also use a special option *<strong>inBody</strong>* that in turn should contain the name of the endpoint option whose value will be contained in the Camel Exchange In message. For example, the facebook endpoint in the following route retrieves activities for the user id value in the incoming message body.</p> - -<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> -<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ - from("direct:test").to("facebook://activities?inBody=userId")... +</div></div><h3 id="Facebook-FacebookComponent.1">FacebookComponent</h3><p>The facebook component can be configured with the Facebook account settings below, which are mandatory. The values can be provided to the component using the bean property <strong>configuration</strong> of type <strong>org.apache.camel.component.facebook.config.FacebookConfiguration</strong>. The <strong>oAuthAccessToken</strong> option may be ommited but that will only allow access to application APIs.</p><p>You can also configure these options directly in an endpoint URI.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>oAuthAppId</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The application Id</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>oAuthAppSecret< /p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The application Secret</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>oAuthAccessToken</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The user access token</p></td></tr></tbody></table></div><p>In addition to the above settings, non-mandatory options below can be used to configure the underlying Facebook4J runtime through either the component's <strong>configuration</strong> property or in an endpoint URI.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>oAuthAuthorizationURL</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>OAuth authorization URL</p></td><td colspan="1" rowspan="1" class=" confluenceTd"><a shape="rect" class="external-link" href="https://www.facebook.com/dialog/oauth" rel="nofollow">https://www.facebook.com/dialog/oauth</a></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>oAuthPermissions</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Default OAuth permissions. Comma separeted permission names. See</p><a shape="rect" class="external-link" href="https://developers.facebook.com/docs/reference/login/#permissions" rel="nofollow">https://developers.facebook.com/docs/reference/login/#permissions</a><p>for the detail</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>null</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>oAuthAccessTokenURL</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>OAuth access token URL</p></td><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" class="external-link" href="https://graph.facebook.com/oauth/access_token" rel="nofollow">https://graph.facebo ok.com/oauth/access_token</a></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>debugEnabled</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Enables deubg output. Effective only with the embedded logger</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>gzipEnabled</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Use Facebook GZIP encoding</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>true</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>httpConnectionTimeout</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Http connection timeout in milliseconds</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>20000</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>httpDefaultMaxPerRoute</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>HTTP maximum connections per route</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>2</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>httpMaxTotalConnections</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>HTTP maximum total connections</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>20</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>httpProxyHost</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>HTTP proxy server host name</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>null</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>httpProxyPassword</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>HTTP proxy server password</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>null</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>httpProxyPort</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>HTTP proxy server port</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>null</p></t d></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>httpProxyUser</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>HTTP proxy server user name</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>null</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>httpReadTimeout</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Http read timeout in milliseconds</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>120000</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>httpRetryCount</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Number of HTTP retries</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>httpRetryIntervalSeconds</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>HTTP retry interval in seconds</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>5</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>httpStreamingReadTimeout</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>HTTP streaming read timeout in milliseconds</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>40000</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>jsonStoreEnabled</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If set to true, raw JSON forms will be stored in DataObjectFactory</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>mbeanEnabled</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If set to true, Facebook4J mbean will be registerd</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>prettyDebugEnabled</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>prettify JSON debug output if set to true</p></td><td colspan="1" rowspan="1" class="conflue nceTd"><p>false</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>restBaseURL</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>API base URL</p></td><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" class="external-link" href="https://graph.facebook.com/" rel="nofollow">https://graph.facebook.com/</a></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>useSSL</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Use SSL</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>true</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>videoBaseURL</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Video API base URL</p></td><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" class="external-link" href="https://graph-video.facebook.com/" rel="nofollow">https://graph-video.facebook.com/</a></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>clientURL</p></td><td colspan= "1" rowspan="1" class="confluenceTd"><p>Facebook4J API client URL</p></td><td colspan="1" rowspan="1" class="confluenceTd">http://facebook4j.org/en/facebook4j-<version>.xml</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>clientVersion</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Facebook4J client API version</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>1.1.12</p></td></tr></tbody></table></div><h3 id="Facebook-ProducerEndpoints:">Producer Endpoints:</h3><p>Producer endpoints can use endpoint names and options from the table below. Endpoints can also use the short name without the <strong>get</strong> or <strong>search</strong> prefix, except <strong>checkin</strong> due to ambiguity between <strong>getCheckin</strong> and <strong>searchCheckin</strong>. Endpoint options that are not mandatory are denoted by [].</p><p>Producer endpoints can also use a special option *<strong>inBody</strong>* that in turn should contain the name of the endpoint option whose value will be contained in the Camel Exchange In message. For example, the facebook endpoint in the following route retrieves activities for the user id value in the incoming message body.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ from("direct:test").to("facebook://activities?inBody=userId")... ]]></script> -</div></div> - -<p>Any of the endpoint options can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format <strong>CamelFacebook.<a shape="rect" class="unresolved" href="#">option</a></strong>. For example, the <strong>userId</strong> option value in the previous route could alternately be provided in the message header <strong>CamelFacebook.userId</strong>. Note that the inBody option overrides message header, e.g. the endpoint option <strong>inBody=user</strong> would override a <strong>CamelFacebook.userId</strong> header. </p> - -<p>Endpoints that return a String return an Id for the created or modified entity, e.g. <strong>addAlbumPhoto</strong> returns the new album Id. Endpoints that return a boolean, return true for success and false otherwise. In case of Facebook API errors the endpoint will throw a RuntimeCamelException with a facebook4j.FacebookException cause. </p> - [... 71 lines stripped ...] Modified: websites/production/camel/content/swagger.html ============================================================================== --- websites/production/camel/content/swagger.html (original) +++ websites/production/camel/content/swagger.html Mon Aug 11 08:17:52 2014 @@ -40,8 +40,6 @@ <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css' rel='stylesheet' type='text/css' /> <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script> <script src='//camel.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script> - <script src='//camel.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script> - <script src='//camel.apache.org/styles/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script> <script type="text/javascript"> SyntaxHighlighter.defaults['toolbar'] = false; @@ -87,14 +85,60 @@ <tr> <td valign="top" width="100%"> <div class="wiki-content maincontent"><h2 id="Swagger-SwaggerComponent">Swagger Component</h2><p><strong>Available as of Camel 2.14</strong></p><p>The  <a shape="rect" href="rest-dsl.html">Rest DSL</a> can be integrated with the <code>camel-swagger</code> module which is used for exposing the REST services and their APIs using <a shape="rect" class="external-link" href="http://swagger.wordnik.com/" rel="nofollow">Swagger</a>.</p><p>Maven users will need to add the following dependency to their <code>pom.xml</code> for this component:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> -<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[<dependency> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-swagger</artifactId> <version>x.x.x</version> <!-- use the same version as your Camel core version --> </dependency> ]]></script> -</div></div><h3 id="Swagger-Using">Using</h3><p>To use this you need to configure the <code>org.apache.camel.component.swagger.RestSwaggerApiDeclarationServlet</code> in the <code>WEB-INF/web.xml</code> file as shown below:</p><div class="error"><span class="error">Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div><h3 id="Swagger-Options">Options</h3><p>The <code>org.apache.camel.component.swagger.RestSwaggerApiDeclarationServlet </code>supports the following options which can be configured as context-param in the web.xml file.</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">cors</td><td co lspan="1" rowspan="1" class="confluenceTd">Boolean</td><td colspan="1" rowspan="1" class="confluenceTd">Whether to enable CORS. Is default false.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">swagger.version</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">Swagger spec version. Is default 1.2.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">base.path<p> </p></td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Required</strong>: To setup the base path where the REST services is available</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">api.version</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">The version of the api. Is default 0.0.0.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">api.path</td><td colspan="1" rowspan="1" class ="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><span>To setup the path where the API is available (eg /api-docs)</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">api.title</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Required.</strong><span> The title of the application.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">api.description</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Required.</strong><span> A short description of the application.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">api.<span>termsOfServiceUrl</span></td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><span>A URL to the Terms of Service of the API.</span></td></tr><tr><td colspan="1" rowspan="1" class= "confluenceTd">api.contact</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><span>An email to be used for API-related correspondence.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">api.license</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><span>The license name used for the API.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">api.licenseUrl</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><span>A URL to the license used for the API.</span></td></tr></tbody></table></div></div><h3 id="Swagger-Examples">Examples</h3><p>TODO: rest example</p></div> +</div></div><h3 id="Swagger-Using">Using</h3><p>To use this you need to configure the <code>org.apache.camel.component.swagger.RestSwaggerApiDeclarationServlet</code> in the <code>WEB-INF/web.xml</code> file as shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ <!-- to setup Camel Swagger api servlet --> + <servlet> + <servlet-name>ApiDeclarationServlet</servlet-name> + <servlet-class>org.apache.camel.component.swagger.RestSwaggerApiDeclarationServlet</servlet-class> + <init-param> + <param-name>base.path</param-name> + <param-value>http://localhost:8080/rest</param-value> + </init-param> + <init-param> + <param-name>api.path</param-name> + <param-value>http://localhost:8080/api-docs</param-value> + </init-param> + <init-param> + <param-name>api.version</param-name> + <param-value>1.2.3</param-value> + </init-param> + <init-param> + <param-name>api.title</param-name> + <param-value>User Services</param-value> + </init-param> + <init-param> + <param-name>api.description</param-name> + <param-value>Camel Rest Example with Swagger that provides an User REST service</param-value> + </init-param> + <load-on-startup>2</load-on-startup> + </servlet> + + <!-- swagger api declaration --> + <servlet-mapping> + <servlet-name>ApiDeclarationServlet</servlet-name> + <url-pattern>/api-docs/*</url-pattern> + </servlet-mapping>]]></script> +</div></div><h3 id="Swagger-Options">Options</h3><p>The <code>org.apache.camel.component.swagger.RestSwaggerApiDeclarationServlet </code>supports the following options which can be configured as context-param in the web.xml file.</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">cors</td><td colspan="1" rowspan="1" class="confluenceTd">Boolean</td><td colspan="1" rowspan="1" class="confluenceTd">Whether to enable CORS. Notice this only enables CORS for the api browser, and not the actual access to the REST services. Is default false.<br clear="none">Instead of using this option is recommended to use the CorsFilte, see further below.</td></tr><tr><td colspan="1" ro wspan="1" class="confluenceTd">swagger.version</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">Swagger spec version. Is default 1.2.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">base.path<p> </p></td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Required</strong>: To setup the base path where the REST services is available</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">api.version</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">The version of the api. Is default 0.0.0.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">api.path</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><span>To setup the path where the API is available (eg /api-docs)</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">api.title</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Required.</strong><span> The title of the application.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">api.description</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Required.</strong><span> A short description of the application.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">api.<span>termsOfServiceUrl</span></td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><span>A URL to the Terms of Service of the API.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">api.contact</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><span>An email to be used for API-rel ated correspondence.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">api.license</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><span>The license name used for the API.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">api.licenseUrl</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><span>A URL to the license used for the API.</span></td></tr></tbody></table></div></div><h3 id="Swagger-CorsFilter">CorsFilter</h3><p>If you use the swagger ui to view the REST api then you likely need to enable support for CORS. This is needed if the swagger ui is hosted and running on another hostname/port than the actual REST apis. When doing this the swagger ui needs to be allowed to access the REST resources across the origin (CORS). The CorsFilter adds the necessary HTTP headers to enable CORS.</p><p>To use CORS adds the following filter <code>org.apache.camel.component.swagger.RestSwaggerCorsFilter</code> to your web.xml.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ <!-- enable CORS filter so people can use swagger ui to browse and test the apis --> + <filter> + <filter-name>RestSwaggerCorsFilter</filter-name> + <filter-class>org.apache.camel.component.swagger.RestSwaggerCorsFilter</filter-class> + </filter> + + + <filter-mapping> + <filter-name>RestSwaggerCorsFilter</filter-name> + <url-pattern>/api-docs/*</url-pattern> + <url-pattern>/rest/*</url-pattern> + </filter-mapping>]]></script> +</div></div><p>The CorsFilter sets the following headers for all requests</p><ul><li>Access-Control-Allow-Origin = *</li><li>Access-Control-Allow-Methods = GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT, PATCH</li><li>Access-Control-Max-Age = 3600</li><li>Access-Control-Allow-Headers = Origin, Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers</li></ul><p><span style="color: rgb(52,48,45);">Notice this is a very simple CORS filter. You may need to use a more sophisticated filter to set the header values differently for a given client. Or block certain clients etc.</span></p><h3 id="Swagger-Examples">Examples</h3><p>In the Apache Camel distribution we ship the <code>camel-example-servlet-rest-tomcat</code> which demonstrates using this Swagger component.</p></div> </td> <td valign="top"> <div class="navigation">