Added: websites/production/camel/content/googledrive.html ============================================================================== --- websites/production/camel/content/googledrive.html (added) +++ websites/production/camel/content/googledrive.html Thu Sep 11 10:19:20 2014 @@ -0,0 +1,166 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<html> +<head> + <link href="//camel.apache.org/styles/site.css" rel="stylesheet" type="text/css"> + <link href="//camel.apache.org/styles/type-settings.css" rel="stylesheet" type="text/css"> + <script src="//camel.apache.org/styles/prototype.js" type="text/javascript"></script> + <script src="//camel.apache.org/styles/rico.js" type="text/javascript"></script> + <script src="//camel.apache.org/styles/site.js" type="text/javascript"></script> + + <meta http-equiv="Content-type" content="text/html;charset=UTF-8"> + + <style type="text/css"> + .maincontent { overflow:hidden; } + </style> + <!--[if IE]> + <style type="text/css"> + .maincontent { width:100%; } + </style> + <![endif]--> + + + + <title> + Apache Camel: GoogleDrive + </title> +</head> +<body> +<div class="white_box"> +<div class="header"> + <div class="header_l"> + <div class="header_r"> + </div> + </div> +</div> +<div class="content"> + <div class="content_l"> + <div class="content_r"> + <div> + <!-- Banner --> +<div id="banner-content"><div id="asf_logo"> + <div id="activemq_logo" style="height:108px; background:transparent url(banner.data/apache-camel-7.png) no-repeat scroll left top;"> + <a shape="rect" style="float:left; width:310px;display:block;text-indent:-5000px;text-decoration:none;line-height:140px; margin-top:20px; margin-left:18px;" href="http://camel.apache.org/">Camel</a> + <a shape="rect" style="float:right; width:180px;display:block;text-indent:-5000px;text-decoration:none;line-height:80px; margin-top:45px; margin-right:10px;" href="http://www.apache.org">Apache</a> + </div> +</div></div> + <!-- Banner --> + <div class="top_red_bar"> + <div id="site-breadcrumbs"> + <!-- Breadcrumbs --> +<a href="index.html">Apache Camel</a> > <a href="site.html">Site</a> > <a href="includes.html">Includes</a> > <a href="component-list.html">Component List</a> > <a href="googledrive.html">GoogleDrive</a> + </div> + <!-- Quicklinks --> +<div id="site-quicklinks"><p><a shape="rect" href="download.html">Download</a> | <a shape="rect" href="javadoc.html">JavaDoc</a> | <a shape="rect" href="source.html">Source</a> | <a shape="rect" href="discussion-forums.html">Forums</a> | <a shape="rect" href="support.html">Support</a></p></div> + <!-- Quicklinks --> + </div> + + <table border="0"> + <tbody> + <tr> + <td valign="top" width="100%"> +<div class="wiki-content maincontent"><h2 id="GoogleDrive-GoogleDriveComponent">GoogleDrive Component</h2><p><strong>Available as of Camel 2.14</strong></p><p>The Google Drive component provides access to the <a shape="rect" class="external-link" href="http://drive.google.com" rel="nofollow">Google Drive file storage service</a> via the <a shape="rect" class="external-link" href="https://developers.google.com/drive/v2/reference" rel="nofollow">Google Drive Web APIs</a>.</p><p><span style="color: rgb(34,34,34);">Google Drive uses the </span><a shape="rect" class="external-link" href="https://developers.google.com/accounts/docs/OAuth2" rel="nofollow">OAuth 2.0 protocol</a><span style="color: rgb(34,34,34);"> for authenticating a Google account and authorizing access to user data. Before you can use this component, you will need to <a shape="rect" class="external-link" href="https://developers.google.com/drive/web/auth/web-server" rel="nofollow">create an account and generate OAuth credentials</a>. Credentials comprise of a clientId, clientSecret, and a refreshToken. A handy resource for generating a long-lived refreshToken is the <a shape="rect" class="external-link" href="https://developers.google.com/oauthplayground" rel="nofollow">OAuth playground</a>.</span></p><p>Maven users will need to add the following dependency to their pom.xml for this component:</p><pre> <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-google-drive</artifactId> + <version>2.14-SNAPSHOT</version> + </dependency> + </pre><h3 id="GoogleDrive-URIFormat">URI Format</h3><hr><p>The GoogleDrive Component uses the following URI format:</p><pre> google-drive://endpoint-prefix/endpoint?[options] + </pre><p>Endpoint prefix can be one of:</p><ul><li>drive-about</li><li>drive-apps</li><li>drive-changes</li><li>drive-channels</li><li>drive-children</li><li>drive-comments</li><li>drive-files</li><li>drive-parents</li><li>drive-permissions</li><li>drive-properties</li><li>drive-realtime</li><li>drive-replies</li><li>drive-revisions</li></ul><h3 id="GoogleDrive-GoogleDriveComponent.1">GoogleDriveComponent</h3><hr><p>The GoogleDrive Component can be configured with the options below. These options can be provided using the component's bean property <code>configuration</code> of type <code>org.apache.camel.component.google.drive.GoogleDriveConfiguration</code>.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Option</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th><th colspan="1" rowspan="1" class="confluenceTh">Description</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">accessToken</td ><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" >rowspan="1" class="confluenceTd">OAuth 2 access token. This typically expires >after an hour so refreshToken is recommended for long term >usage.</td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd">applicationName</td><td colspan="1" rowspan="1" >class="confluenceTd">String</td><td colspan="1" rowspan="1" >class="confluenceTd">Google drive application name. Example would be >"camel-google-drive/1.0"</td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd">clientId</td><td colspan="1" rowspan="1" >class="confluenceTd">String</td><td colspan="1" rowspan="1" >class="confluenceTd">Client ID of the drive application</td></tr><tr><td >colspan="1" rowspan="1" class="confluenceTd">clientSecret</td><td colspan="1" >rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" >class="confluenceTd">Client secret of the drive application</td></tr><tr><td >colspan="1" rowspan="1" class="confluenceTd">refr eshToken</td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd">OAuth 2 refresh token. Using this, the Google Drive component can obtain a new accessToken whenever the current one expires - a necessity if the application is long-lived.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">scopes</td><td colspan="1" rowspan="1" class="confluenceTd">List<String></td><td colspan="1" rowspan="1" class="confluenceTd">Specifies the level of permissions you want a drive application to have to a user account. See <a shape="rect" class="external-link" href="https://developers.google.com/drive/web/scopes" rel="nofollow">https://developers.google.com/drive/web/scopes</a> for more info.</td></tr></tbody></table></div><h3 id="GoogleDrive-ProducerEndpoints">Producer Endpoints</h3><hr><p>Producer endpoints can use endpoint prefixes followed by endpoint names and associated options described next. A shorthand alias can b e used for some endpoints. The endpoint URI MUST contain a prefix.</p><p>Endpoint options that are not mandatory are denoted by []. When there are no mandatory options for an endpoint, one of the set of [] options MUST be provided. Producer endpoints can also use a special option <strong><code>inBody</code></strong> that in turn should contain the name of the endpoint option whose value will be contained in the Camel Exchange In message.</p><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 <code>CamelGoogleDrive.<option></code>. Note that the <code>inBody</code> option overrides message header, i.e. the endpoint option <code>inBody=option</code> would override a <code>CamelGoogleDrive.option</code> header.</p><p>For more information on the endpoints and options see API documentation at: <a shape="rect" class="external-link" href="https://developers.google.com/drive/v 2/reference/" rel="nofollow">https://developers.google.com/drive/v2/reference/</a></p><p> </p><h3 id="GoogleDrive-1.EndpointPrefixdrive-about">1. Endpoint Prefix <em>drive-about</em></h3><hr><p>The following endpoints can be invoked with the prefix <code>drive-about</code> as follows:</p><pre> google-drive://drive-about/endpoint?[options] + </pre><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Endpoint</th><th colspan="1" rowspan="1" class="confluenceTh">Shorthand Alias</th><th colspan="1" rowspan="1" class="confluenceTh">Options</th><th colspan="1" rowspan="1" class="confluenceTh">Result Body Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">get</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.services.drive.model.About</td></tr></tbody></table></div><h4 id="GoogleDrive-URIOptionsfordrive-about">URI Options for <em>drive-about</em></h4><hr><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th></tr></tbody></table></div><h3 id="GoogleDrive-2.EndpointPrefixdrive-apps">2. Endpoint Prefix <em>drive-apps</em></h3><hr><p>The following endpoints can be invoked with the prefix <code>drive-apps</code> as follows:</p><pre> google-drive://drive-apps/endpoint?[options] + </pre><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Endpoint</th><th colspan="1" rowspan="1" class="confluenceTh">Shorthand Alias</th><th colspan="1" rowspan="1" class="confluenceTh">Options</th><th colspan="1" rowspan="1" class="confluenceTh">Result Body Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">get</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">appId</td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.services.drive.model.App</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">list</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.services.drive.model.AppList</td></tr></tbody></table></div><h4 id="GoogleDrive-URIOptionsfordrive-apps">URI Options for <em>drive -apps</em></h4><hr><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">appId</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr></tbody></table></div><h3 id="GoogleDrive-3.EndpointPrefixdrive-changes">3. Endpoint Prefix <em>drive-changes</em></h3><hr><p>The following endpoints can be invoked with the prefix <code>drive-changes</code> as follows:</p><pre> google-drive://drive-changes/endpoint?[options] + </pre><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Endpoint</th><th colspan="1" rowspan="1" class="confluenceTh">Shorthand Alias</th><th colspan="1" rowspan="1" class="confluenceTh">Options</th><th colspan="1" rowspan="1" class="confluenceTh">Result Body Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">get</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">changeId</td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.services.drive.model.Change</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">list</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.services.drive.model.ChangeList</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">watch</td><td colspan="1" rows pan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">contentChannel</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Channel</span></td></tr></tbody></table></div><p> </p><h4 id="GoogleDrive-URIOptionsfordrive-changes">URI Options for <em>drive-changes</em></h4><hr><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">changeId</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">contentChannel</td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.services.drive.model.Channel</td></tr></tbody></table></div><h3 id="GoogleDrive-4.EndpointPrefixdrive-channels">4. Endpoint Prefix <em>drive-channels</em></h3><hr><p>The following endpoints can be invoked with the prefix <code>drive-channels</code> as follows:</p><pre> google-drive://drive-channels/endpoint?[options] + </pre><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Endpoint</th><th colspan="1" rowspan="1" class="confluenceTh">Shorthand Alias</th><th colspan="1" rowspan="1" class="confluenceTh">Options</th><th colspan="1" rowspan="1" class="confluenceTh">Result Body Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">stop</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">contentChannel</td><td colspan="1" rowspan="1" class="confluenceTd"> </td></tr></tbody></table></div><h4 id="GoogleDrive-URIOptionsfordrive-channels">URI Options for <em>drive-channels</em></h4><hr><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">contentChannel</td><td colspan="1" rowsp an="1" class="confluenceTd">com.google.api.services.drive.model.Channel</td></tr></tbody></table></div><h3 id="GoogleDrive-5.EndpointPrefixdrive-children">5. Endpoint Prefix <em>drive-children</em></h3><hr><p>The following endpoints can be invoked with the prefix <code>drive-children</code> as follows:</p><pre> google-drive://drive-children/endpoint?[options] + </pre><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Endpoint</th><th colspan="1" rowspan="1" class="confluenceTh">Shorthand Alias</th><th colspan="1" rowspan="1" class="confluenceTh">Options</th><th colspan="1" rowspan="1" class="confluenceTh">Result Body Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">delete</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">childId, folderId</td><td colspan="1" rowspan="1" class="confluenceTd"> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">get</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">childId, folderId</td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.services.drive.model.ChildReference</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">insert</td><td colspan="1" rowspan="1" c lass="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">content, folderId</td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.services.drive.model.ChildReference</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">list</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">folderId</td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.services.drive.model.ChildList</td></tr></tbody></table></div><h4 id="GoogleDrive-URIOptionsfordrive-children">URI Options for <em>drive-children</em></h4><hr><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">childId</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">content</ td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.services.drive.model.ChildReference</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">folderId</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr></tbody></table></div><h3 id="GoogleDrive-6.EndpointPrefixdrive-comments">6. Endpoint Prefix <em>drive-comments</em></h3><hr><p>The following endpoints can be invoked with the prefix <code>drive-comments</code> as follows:</p><pre> google-drive://drive-comments/endpoint?[options] + </pre><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Endpoint</th><th colspan="1" rowspan="1" class="confluenceTh">Shorthand Alias</th><th colspan="1" rowspan="1" class="confluenceTh">Options</th><th colspan="1" rowspan="1" class="confluenceTh">Result Body Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">delete</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">commentId, fileId</td><td colspan="1" rowspan="1" class="confluenceTd"> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">get</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">commentId, fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Comment</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">insert</td><td colspan="1" rowspan ="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">content, fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Comment</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">list</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Comment</span>List</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">patch</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">commentId, content, fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Comment</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">update</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class ="confluenceTd">commentId, content, fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Comment</span></td></tr></tbody></table></div><h4 id="GoogleDrive-URIOptionsfordrive-comments">URI Options for <em>drive-comments</em></h4><hr><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">commentId</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">content</td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.services.drive.model.Comment</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr></tbody></table></div><h3 id="GoogleDrive-7.EndpointPrefixdrive-files">7. Endpoint Prefix <em>drive-f iles</em></h3><hr><p>The following endpoints can be invoked with the prefix <code>drive-files</code> as follows:</p><pre> google-drive://drive-files/endpoint?[options] + </pre><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Endpoint</th><th colspan="1" rowspan="1" class="confluenceTh">Shorthand Alias</th><th colspan="1" rowspan="1" class="confluenceTh">Options</th><th colspan="1" rowspan="1" class="confluenceTh">Result Body Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">copy</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">content, fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.File</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">delete</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd"> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">get</td><td colspan="1" rowspan="1" class="conflu enceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.File</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">insert</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">[mediaContent], content</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.File</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">list</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.FileList</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">patch</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">content, fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.File</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">touch</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.File</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">trash</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.File</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">untrash</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.File</span></td></tr>< tr><td colspan="1" rowspan="1" class="confluenceTd">update</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">[mediaContent], content, fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.File</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">watch</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">contentChannel, fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Channel</span></td></tr></tbody></table></div><h4 id="GoogleDrive-URIOptionsfordrive-files">URI Options for <em>drive-files</em></h4><hr><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">content</t d><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.services.drive.model.File</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">contentChannel</td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.services.drive.model.Channel</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">mediaContent</td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.client.http.AbstractInputStreamContent</td></tr></tbody></table></div><h3 id="GoogleDrive-8.EndpointPrefixdrive-parents">8. Endpoint Prefix <em>drive-parents</em></h3><hr><p>The following endpoints can be invoked with the prefix <code>drive-parents</code> as follows:</p><pre> google-drive://drive-parents/endpoint?[options] + </pre><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Endpoint</th><th colspan="1" rowspan="1" class="confluenceTh">Shorthand Alias</th><th colspan="1" rowspan="1" class="confluenceTh">Options</th><th colspan="1" rowspan="1" class="confluenceTh">Result Body Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">delete</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId, parentId</td><td colspan="1" rowspan="1" class="confluenceTd"> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">get</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId, parentId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.ParentReference</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">insert</td><td colspan="1" r owspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">content, fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.ParentReference</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">list</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.ParentList</span></td></tr></tbody></table></div><h4 id="GoogleDrive-URIOptionsfordrive-parents">URI Options for <em>drive-parents</em></h4><hr><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">content</td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.services.drive.model.ParentRe ference</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">parentId</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr></tbody></table></div><h3 id="GoogleDrive-9.EndpointPrefixdrive-permissions">9. Endpoint Prefix <em>drive-permissions</em></h3><hr><p>The following endpoints can be invoked with the prefix <code>drive-permissions</code> as follows:</p><pre> google-drive://drive-permissions/endpoint?[options] + </pre><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Endpoint</th><th colspan="1" rowspan="1" class="confluenceTh">Shorthand Alias</th><th colspan="1" rowspan="1" class="confluenceTh">Options</th><th colspan="1" rowspan="1" class="confluenceTh">Result Body Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">delete</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId, permissionId</td><td colspan="1" rowspan="1" class="confluenceTd"> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">get</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId, permissionId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Permission</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">getIdForEmail</td><td col span="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">email</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.PermissionId</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">insert</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">content, fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Permission</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">list</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.PermissionList</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">patch</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">content, fileId, permissionId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Permission</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">update</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">content, fileId, permissionId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Permission</span></td></tr></tbody></table></div><h4 id="GoogleDrive-URIOptionsfordrive-permissions">URI Options for <em>drive-permissions</em></h4><hr><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">content</td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.services.drive.model.Permission</td></tr><tr><td colspan= "1" rowspan="1" class="confluenceTd">email</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">permissionId</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr></tbody></table></div><h3 id="GoogleDrive-10.EndpointPrefixdrive-properties">10. Endpoint Prefix <em>drive-properties</em></h3><hr><p>The following endpoints can be invoked with the prefix <code>drive-properties</code> as follows:</p><pre> google-drive://drive-properties/endpoint?[options] + </pre><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Endpoint</th><th colspan="1" rowspan="1" class="confluenceTh">Shorthand Alias</th><th colspan="1" rowspan="1" class="confluenceTh">Options</th><th colspan="1" rowspan="1" class="confluenceTh">Result Body Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">delete</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId, propertyKey</td><td colspan="1" rowspan="1" class="confluenceTd"> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">get</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId, propertyKey</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Property</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">insert</td><td colspan="1" ro wspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">content, fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Property</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">list</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Property</span>List</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">patch</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">content, fileId, propertyKey</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Property</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">update</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan ="1" class="confluenceTd">content, fileId, propertyKey</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Property</span></td></tr></tbody></table></div><h4 id="GoogleDrive-URIOptionsfordrive-properties">URI Options for <em>drive-properties</em></h4><hr><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">content</td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.services.drive.model.Property</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">propertyKey</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr></tbody></table></div><h3 id="GoogleDrive-11.EndpointPrefixdrive-realtime">11. En dpoint Prefix <em>drive-realtime</em></h3><hr><p>The following endpoints can be invoked with the prefix <code>drive-realtime</code> as follows:</p><pre> google-drive://drive-realtime/endpoint?[options] + </pre><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Endpoint</th><th colspan="1" rowspan="1" class="confluenceTh">Shorthand Alias</th><th colspan="1" rowspan="1" class="confluenceTh">Options</th><th colspan="1" rowspan="1" class="confluenceTh">Result Body Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">get</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd"> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">update</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">[mediaContent], fileId</td><td colspan="1" rowspan="1" class="confluenceTd"> </td></tr></tbody></table></div><h4 id="GoogleDrive-URIOptionsfordrive-realtime">URI Options for <em>drive-realtime</em></h4><hr><div class="table-wrap"> <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">mediaContent</td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.client.http.AbstractInputStreamContent</td></tr></tbody></table></div><h3 id="GoogleDrive-12.EndpointPrefixdrive-replies">12. Endpoint Prefix <em>drive-replies</em></h3><hr><p>The following endpoints can be invoked with the prefix <code>drive-replies</code> as follows:</p><pre> google-drive://drive-replies/endpoint?[options] + </pre><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Endpoint</th><th colspan="1" rowspan="1" class="confluenceTh">Shorthand Alias</th><th colspan="1" rowspan="1" class="confluenceTh">Options</th><th colspan="1" rowspan="1" class="confluenceTh">Result Body Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">delete</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">commentId, fileId, replyId</td><td colspan="1" rowspan="1" class="confluenceTd"> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">get</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">commentId, fileId, replyId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.CommentReply</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">insert</td> <td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">commentId, content, fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.CommentReply</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">list</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">commentId, fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.CommentReply</span>List</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">patch</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">commentId, content, fileId, replyId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.CommentReply</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">update</td><td colspan="1" rowspan= "1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">commentId, content, fileId, replyId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.CommentReply</span></td></tr></tbody></table></div><h4 id="GoogleDrive-URIOptionsfordrive-replies">URI Options for <em>drive-replies</em></h4><hr><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">commentId</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">content</td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.services.drive.model.CommentReply</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr><tr><td colspan ="1" rowspan="1" class="confluenceTd">replyId</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr></tbody></table></div><h3 id="GoogleDrive-13.EndpointPrefixdrive-revisions">13. Endpoint Prefix <em>drive-revisions</em></h3><hr><p>The following endpoints can be invoked with the prefix <code>drive-revisions</code> as follows:</p><pre> google-drive://drive-revisions/endpoint?[options] + </pre><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Endpoint</th><th colspan="1" rowspan="1" class="confluenceTh">Shorthand Alias</th><th colspan="1" rowspan="1" class="confluenceTh">Options</th><th colspan="1" rowspan="1" class="confluenceTh">Result Body Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">delete</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId, revisionId</td><td colspan="1" rowspan="1" class="confluenceTd"> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">get</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId, revisionId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Revision</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">list</td><td colspan="1" rowspa n="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Revision</span>List</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">patch</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">content, fileId, revisionId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Revision</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">update</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd">content, fileId, revisionId</td><td colspan="1" rowspan="1" class="confluenceTd"><span>com.google.api.services.drive.model.Revision</span></td></tr></tbody></table></div><h4 id="GoogleDrive-URIOptionsfordrive-revisions">URI Options for <em>drive-revisions</em></h4><hr><div class="table -wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">content</td><td colspan="1" rowspan="1" class="confluenceTd">com.google.api.services.drive.model.Revision</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">fileId</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">revisionId</td><td colspan="1" rowspan="1" class="confluenceTd">String</td></tr></tbody></table></div><h3 id="GoogleDrive-ConsumerEndpoints">Consumer Endpoints</h3><hr><p>Any of the producer endpoints can be used as a consumer endpoint. Consumer endpoints can use <a shape="rect" class="external-link" href="http://camel.apache.org/polling-consumer.html#PollingConsumer-ScheduledPollConsumerOptions">Scheduled Poll Consumer Options</a> with a <code>consumer.</code> prefix to s chedule endpoint invocation. Consumer endpoints that return an array or collection will generate one exchange per element, and their routes will be executed once for each exchange.</p><h3 id="GoogleDrive-MessageHeaders">Message Headers</h3><hr><p>Any URI option can be provided in a message header for producer endpoints with a <code>CamelGoogleDrive.</code> prefix.</p><h3 id="GoogleDrive-MessageBody">Message Body</h3><hr><p>All result message bodies utilize objects provided by the underlying APIs used by the GoogleDriveComponent. Producer endpoints can specify the option name for incoming message body in the <code>inBody</code> endpoint URI parameter. For endpoints that return an array or collection, a consumer endpoint will map every element to distinct messages.     </p></div> + </td> + <td valign="top"> + <div class="navigation"> + <div class="navigation_top"> + <!-- NavigationBar --> +<div class="navigation_bottom" id="navigation_bottom"><h3 id="Navigation-Overview"><a shape="rect" href="overview.html">Overview</a></h3><ul class="alternate"><li><a shape="rect" href="index.html">Home</a></li><li><a shape="rect" href="download.html">Download</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li><li><a shape="rect" href="faq.html">FAQ</a></li></ul><h3 id="Navigation-Documentation"><a shape="rect" href="documentation.html">Documentation</a></h3><ul class="alternate"><li><a shape="rect" href="user-guide.html">User Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a shape="rect" href="books.html">Books</a></li><li><a shape="rect" href="tutorials.html">Tutorials</a></li><li><a shape="rect" href="examples.html">Examples</a></li><li><a shape="rect" href="cookbook.html">Cookbook</a></li><li><a shape="rect" href="architecture.html">Architecture</a></li><li><a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a></li><li><a shape="rect" href="dsl.html">DSL</a></li><li><a shape="rect" href="components.html">Components</a></li><li><a shape="rect" href="data-format.html">Data Format</a></li><li><a shape="rect" href="languages.html">Languages</a></li><li><a shape="rect" href="security.html">Security</a></li><li><a shape="rect" href="security-advisories.html">Security Advisories</a></li></ul><h3 id="Navigation-Search">Search</h3><form enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box" action="http://www.google.com/cse"> + <div> + <input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq"> + <input type="hidden" name="ie" value="UTF-8"> + <input type="text" name="q" size="21"> + <input type="submit" name="sa" value="Search"> + </div> +</form> +<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3 id="Navigation-Community"><a shape="rect" href="community.html">Community</a></h3><ul class="alternate"><li><a shape="rect" href="support.html">Support</a></li><li><a shape="rect" href="contributing.html">Contributing</a></li><li><a shape="rect" href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect" href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect" href="user-stories.html">User Stories</a></li><li><a shape="rect" href="news.html">News</a></li><li><a shape="rect" href="articles.html">Articles</a></li><li><a shape="rect" href="site.html">Site</a></li><li><a shape="rect" href="team.html">Team</a></li><li><a shape="rect" class="external-link" href="http://camel-extra.googlecode.com/" rel="nofollow">Camel Extra</a></li></ul><h3 id="Navigation-Developers"><a shape="rect" href="developers.html">Developers</a></h3><ul class="alternate" ><li><a shape="rect" href="developers.html">Developer Guide</a></li><li><a >shape="rect" href="source.html">Source</a></li><li><a shape="rect" >href="building.html">Building</a></li><li><a shape="rect" >href="javadoc.html">JavaDoc</a></li><li><a shape="rect" >href="irc-room.html">IRC Room</a></li></ul><h3 >id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul >class="alternate"><li><a shape="rect" class="external-link" >href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect" >class="external-link" >href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a > shape="rect" class="external-link" >href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a >shape="rect" class="external-link" >href="http://www.apache.org/security/">Security</a></li></ul></div> + <!-- NavigationBar --> + </div> + </div> + </td> + </tr> + </tbody> + </table> + + + <div class="bottom_red_bar"></div> + </div> + </div> + </div> +</div> +<div class="black_box"> +<div class="footer"> + <div class="footer_l"> + <div class="footer_r"> + <div> + <a href="$base/privacy-policy.html">Privacy Policy</a> - + (<a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=45877558">edit page</a>) + (<a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=45877558&showComments=true&showCommentArea=true#addcomment">add comment</a>) + </div> + </div> + </div> +</div> +</div> +</div> +<div class="design_attribution"> +© 2004-2014 The Apache Software Foundation. +<br> +Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners. +<br> +<a href="http://hiramchirino.com">Graphic Design By Hiram</a> +</div> + +<!-- Camel committers that would like access to the Analytics, send a note to priv...@camel.apache.org --> +<script type="text/javascript"> + + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-25976253-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + +</script> + +</body> +</html> + +
Modified: websites/production/camel/content/guaranteed-delivery.html ============================================================================== --- websites/production/camel/content/guaranteed-delivery.html (original) +++ websites/production/camel/content/guaranteed-delivery.html Thu Sep 11 10:19:20 2014 @@ -36,6 +36,16 @@ <![endif]--> + <link href='//camel.apache.org/styles/highlighter/styles/shCoreCamel.css' rel='stylesheet' type='text/css' /> + <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 type="text/javascript"> + SyntaxHighlighter.defaults['toolbar'] = false; + SyntaxHighlighter.all(); + </script> <title> Apache Camel: Guaranteed Delivery @@ -75,16 +85,15 @@ <tbody> <tr> <td valign="top" width="100%"> -<div class="wiki-content maincontent"><h3 id="GuaranteedDelivery-GuaranteedDelivery">Guaranteed Delivery</h3> - -<p>Camel supports the <a shape="rect" class="external-link" href="http://www.enterpriseintegrationpatterns.com/GuaranteedMessaging.html" rel="nofollow">Guaranteed Delivery</a> from the <a shape="rect" href="enterprise-integration-patterns.html">EIP patterns</a> using among others the following components:</p> - -<ul><li><a shape="rect" href="file2.html">File</a> for using file systems as a persistent store of messages</li><li><a shape="rect" href="jms.html">JMS</a> when using persistent delivery (the default) for working with JMS Queues and Topics for high performance, clustering and load balancing</li><li><a shape="rect" href="jpa.html">JPA</a> for using a database as a persistence layer, or use any of the many other database component such as <a shape="rect" href="sql.html">SQL</a>, <a shape="rect" href="jdbc.html">JDBC</a>, <a shape="rect" href="ibatis.html">iBatis</a>/<a shape="rect" href="mybatis.html">MyBatis</a>, <a shape="rect" href="hibernate.html">Hibernate</a></li><li><a shape="rect" href="hawtdb.html">HawtDB</a> for a lightweight key-value persistent store</li></ul> - - -<p><img class="confluence-embedded-image confluence-external-resource" src="http://www.enterpriseintegrationpatterns.com/img/GuaranteedMessagingSolution.gif" data-image-src="http://www.enterpriseintegrationpatterns.com/img/GuaranteedMessagingSolution.gif"></p> - -<h4 id="GuaranteedDelivery-UsingThisPattern">Using This Pattern</h4> +<div class="wiki-content maincontent"><h3 id="GuaranteedDelivery-GuaranteedDelivery">Guaranteed Delivery</h3><p>Camel supports the <a shape="rect" class="external-link" href="http://www.enterpriseintegrationpatterns.com/GuaranteedMessaging.html" rel="nofollow">Guaranteed Delivery</a> from the <a shape="rect" href="enterprise-integration-patterns.html">EIP patterns</a> using among others the following components:</p><ul><li><a shape="rect" href="file2.html">File</a> for using file systems as a persistent store of messages</li><li><a shape="rect" href="jms.html">JMS</a> when using persistent delivery (the default) for working with JMS Queues and Topics for high performance, clustering and load balancing</li><li><a shape="rect" href="jpa.html">JPA</a> for using a database as a persistence layer, or use any of the many other database component such as <a shape="rect" href="sql.html">SQL</a>, <a shape="rect" href="jdbc.html">JDBC</a>, <a shape="rect" href="ibatis.html">iBATIS</a>/<a shap e="rect" href="mybatis.html">MyBatis</a>, <a shape="rect" href="hibernate.html">Hibernate</a></li><li><a shape="rect" href="hawtdb.html">HawtDB</a> for a lightweight key-value persistent store</li></ul><p><img class="confluence-embedded-image confluence-external-resource" src="http://www.enterpriseintegrationpatterns.com/img/GuaranteedMessagingSolution.gif" data-image-src="http://www.enterpriseintegrationpatterns.com/img/GuaranteedMessagingSolution.gif"></p><h4 id="GuaranteedDelivery-Example">Example</h4><p>The following example demonstrates illustrates the use of <a shape="rect" class="external-link" href="http://www.enterpriseintegrationpatterns.com/GuaranteedMessaging.html" rel="nofollow">Guaranteed Delivery</a> within the <a shape="rect" href="jms.html">JMS</a> component. By default, a message is not considered successfully delivered until the recipient has persisted the message locally guaranteeing its receipt in the event the destination becomes unavailable .</p><p><strong>Using the <a shape="rect" href="fluent-builders.html">Fluent Builders</a></strong></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:start") + .to("jms:queue:foo");]]></script> +</div></div><p> </p><p><strong><strong>Using the <a shape="rect" href="spring-xml-extensions.html">Spring XML Extensions</a></strong></strong></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[<route> + <from uri="direct:start"/> + <to uri="jms:queue:foo"/> +</route>]]></script> +</div></div><p></p><h4 id="GuaranteedDelivery-UsingThisPattern">Using This Pattern</h4> <p>If you would like to use this EIP Pattern then please read the <a shape="rect" href="getting-started.html">Getting Started</a>, you may also find the <a shape="rect" href="architecture.html">Architecture</a> useful particularly the description of <a shape="rect" href="endpoint.html">Endpoint</a> and <a shape="rect" href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" href="examples.html">Examples</a> first before trying this pattern out.</p></div> </td> Modified: websites/production/camel/content/hl7.html ============================================================================== --- websites/production/camel/content/hl7.html (original) +++ websites/production/camel/content/hl7.html Thu Sep 11 10:19:20 2014 @@ -86,7 +86,7 @@ <tbody> <tr> <td valign="top" width="100%"> -<div class="wiki-content maincontent"><h2 id="HL7-HL7Component">HL7 Component</h2><p>The <strong>hl7</strong> component is used for working with the HL7 MLLP protocol and <a shape="rect" class="external-link" href="http://www.hl7.org/" rel="nofollow">HL7 v2 messages</a> using the <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net" rel="nofollow">HAPI library</a>.</p><p>This component supports the following:</p><ul class="alternate"><li>HL7 MLLP codec for <a shape="rect" class="external-link" href="http://mina.apache.org/">Mina</a></li><li>Agnostic data format using either plain String objects or HAPI HL7 model objects.</li><li><a shape="rect" href="type-converter.html">Type Converter</a> from/to HAPI and String</li><li>HL7 DataFormat using HAPI library</li><li>Even more ease-of-use as it's integrated well with the <a shape="rect" href="mina.html">camel-mina</a> (<strong>Camel 2.11</strong>: <a shape="rect" href="mina2.html">camel-mina2</a> ) component.</li></u l><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"> +<div class="wiki-content maincontent"><h2 id="HL7-HL7Component">HL7 Component</h2><p>The <strong>hl7</strong> component is used for working with the HL7 MLLP protocol and <a shape="rect" class="external-link" href="http://www.hl7.org/" rel="nofollow">HL7 v2 messages</a> using the <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net" rel="nofollow">HAPI library</a>.</p><p>This component supports the following:</p><ul class="alternate"><li>HL7 MLLP codec for <a shape="rect" class="external-link" href="http://mina.apache.org/">Mina</a></li><li>Agnostic data format using either plain String objects or HAPI HL7 model objects.</li><li><a shape="rect" href="type-converter.html">Type Converter</a> from/to HAPI and String</li><li>HL7 DataFormat using HAPI library</li><li class="confluence-link">Even more ease-of-use as it's integrated well with the  <a shape="rect" href="mina2.html">camel-mina2</a> component.</li></ul><p>Maven users will need to add the following de pendency 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> <groupId>org.apache.camel</groupId> <artifactId>camel-hl7</artifactId> @@ -94,9 +94,7 @@ <!-- use the same version as your Camel core version --> </dependency> ]]></script> -</div></div><h3 id="HL7-HL7MLLPprotocol">HL7 MLLP protocol</h3><p>HL7 is often used with the HL7 MLLP protocol that is a text based TCP socket based protocol. This component ships with a Mina Codec that conforms to the MLLP protocol so you can easily expose a HL7 listener that accepts HL7 requests over the TCP transport.</p><p>To expose a HL7 listener service we reuse the existing mina/mina2 component where we just use the <code>HL7MLLPCodec</code> as codec.</p><p>The HL7 MLLP codec has the following options:</p><div class="confluenceTableSmall"> -<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Default Value </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>startByte</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>0x0b</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The start byte spanning the HL7 payload. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>endByte1</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>0x1c</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The first end byte spanning the HL7 payload.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>endByte2</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>0x0d</ code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The 2nd end byte spanning the HL7 payload. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>charset</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> JVM Default </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The encoding (is a <a shape="rect" class="external-link" href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html" rel="nofollow">charset name</a>) to use for the codec. If not provided, Camel will use the <a shape="rect" class="external-link" href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html#defaultCharset()" rel="nofollow">JVM default Charset</a>. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>convertLFtoCR</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> (<strong>Camel 2.11</strong>:<code>false</code>) </p></td><td colspan="1" rowspan ="1" class="confluenceTd"><p> Will convert <code>\n</code> to <code>\r</code> (<code>0x0d</code>, 13 decimal) as HL7 stipulates <code>\r</code> as segment terminators. The HAPI library requires the use of <code>\r</code>. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>validate</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Whether HAPI Parser should validate or not. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>parser</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>ca.uhn.hl7v2.parser.PipeParser</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> To use a custom parser. Must be of type <code>ca.uhn.hl7v2.parser.Parser</code>. </p></td></tr></tbody></table></div> -</div><h4 id="HL7-ExposingaHL7listener">Exposing a HL7 listener</h4><p>In our Spring XML file, we configure an endpoint to listen for HL7 requests using TCP:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><h3 id="HL7-HL7MLLPprotocol">HL7 MLLP protocol</h3><p>HL7 is often used with the HL7 MLLP protocol that is a text based TCP socket based protocol. This component ships with a Mina Codec that conforms to the MLLP protocol so you can easily expose a HL7 listener that accepts HL7 requests over the TCP transport.</p><p>To expose a HL7 listener service we reuse the existing mina2 component where we just use the <code>HL7MLLPCodec</code> as codec.</p><p>The HL7 MLLP codec has the following options:</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>startByte</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>0x0b</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The start byte spanning the HL7 payload.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>endByte1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>0x1c</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The first end byte spanning the HL7 payload.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>endByte2</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>0x0d</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The 2nd end byte spanning the HL7 payload.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>charset</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>JVM Default</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The encoding (is a <a shape="rect" class="external-link" href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html" rel= "nofollow">charset name</a>) to use for the codec. If not provided, Camel will use the <a shape="rect" class="external-link" href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html#defaultCharset()" rel="nofollow">JVM default Charset</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>convertLFtoCR</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Will convert <code>\n</code> to <code>\r</code> (<code>0x0d</code>, 13 decimal) as HL7 stipulates <code>\r</code> as segment terminators. The HAPI library requires the use of <code>\r</code>.</p></td></tr></tbody></table></div></div><h4 id="HL7-ExposingaHL7listener">Exposing a HL7 listener</h4><p>In our Spring XML file, we configure an endpoint to listen for HL7 requests using TCP:</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[ <endpoint id="hl7listener" uri="mina:tcp://localhost:8888?sync=true&amp;codec=#hl7codec"/> <!-- Camel 2.11: uri="mina2:tcp... --> ]]></script> @@ -195,22 +193,17 @@ Then you don't need to create an instanc </div> </div> -<h3 id="HL7-MessageHeaders">Message Headers</h3><p>The <strong>unmarshal</strong> operation adds these MSH fields as headers on the Camel message:</p><div class="confluenceTableSmall"> -<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Key </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> MSH field </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Example </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelHL7SendingApplication</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>MSH-3</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>MYSERVER</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelHL7SendingFacility</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>MSH-4</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>MYSERVERAPP</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelHL7ReceivingApplication</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code >MSH-5</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> ><code>MYCLIENT</code> </p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p> <code>CamelHL7ReceivingFacility</code> </p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p> <code>MSH-6</code> ></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> ><code>MYCLIENTAPP</code> </p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p> <code>CamelHL7Timestamp</code> </p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p> <code>MSH-7</code> ></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> ><code>20071231235900</code> </p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p> <code>CamelHL7Security</code> </p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p> <code>MSH-8</code> ></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> ><code>null</code> </p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p> <code>CamelHL7M essageType</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>MSH-9-1</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>ADT</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelHL7TriggerEvent</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>MSH-9-2</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>A01</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelHL7MessageControl</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>MSH-10</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>1234</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelHL7ProcessingId</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>MSH-11</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>P</code> </p></td></tr><tr ><td colspan="1" rowspan="1" class="confluenceTd"><p> ><code>CamelHL7VersionId</code> </p></td><td colspan="1" rowspan="1" >class="confluenceTd"><p> <code>MSH-12</code> </p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p> <code>2.4</code> ></p></td></tr></tbody></table></div> -</div><p>All headers are <code>String</code> types. If a header value is missing, its value is <code>null</code>.</p><h3 id="HL7-Options">Options</h3><p>The HL7 Data Format supports the following options:</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> Default </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>validate</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> true </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Whether the HAPI Parser should validate using the default validation rules. <strong>Camel 2.11:</strong> better use the <code>parser</code> option and initialize the parser with the desired HAPI <code>ValidationContext</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>parser</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>ca.uhn.hl7v2.parser.GenericParser</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.1 1:</strong> To use a custom parser. Must be of type <code>ca.uhn.hl7v2.parser.Parser</code>. Note that <code>GenericParser</code> also allows to parse XML-encoded HL7v2 messages. </p></td></tr></tbody></table></div> - -</div><h3 id="HL7-Dependencies">Dependencies</h3><p>To use HL7 in your Camel routes you'll need to add a dependency on <strong>camel-hl7</strong> listed above, which implements this data format.</p><p>The HAPI library since Version 0.6 has been split into a <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-base" rel="nofollow">base library</a> and several structure libraries, one for each HL7v2 message version:</p><ul><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v21" rel="nofollow">v2.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v22" rel="nofollow">v2.2 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v23" rel="nofollow">v2.3 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1 .maven.org/maven2/ca/uhn/hapi/hapi-structures-v231" rel="nofollow">v2.3.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v24" rel="nofollow">v2.4 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v25" rel="nofollow">v2.5 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v251" rel="nofollow">v2.5.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v26" rel="nofollow">v2.6 structures library</a></li></ul><p>By default <code>camel-hl7</code> only references the HAPI <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-base" rel="nofollow">base library</a>. Applications are responsible for including structure libraries t hemselves. For example, if a application works with HL7v2 message versions 2.4 and 2.5 then the following dependencies must be added:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<h3 id="HL7-MessageHeaders">Message Headers</h3><p>The <strong>unmarshal</strong> operation adds these MSH fields as headers on the Camel message:</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Key</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>MSH field</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Example</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelHL7SendingApplication</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MSH-3</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MYSERVER</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelHL7SendingFacility</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MSH-4</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MYSERVERAPP</code></p></td></tr> <tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelHL7ReceivingApplication</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MSH-5</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MYCLIENT</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelHL7ReceivingFacility</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MSH-6</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MYCLIENTAPP</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelHL7Timestamp</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MSH-7</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>20071231235900</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelHL7Security</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MSH-8</code></p></td><td colspan=" 1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelHL7MessageType</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MSH-9-1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ADT</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelHL7TriggerEvent</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MSH-9-2</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>A01</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelHL7MessageControl</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MSH-10</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1234</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelHL7ProcessingId</code></p></td><td colspan="1" rowspan="1" class="confluence Td"><p><code>MSH-11</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>P</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelHL7VersionId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MSH-12</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>2.4</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>CamelHL7Context </code><code><br clear="none"></code></td><td colspan="1" rowspan="1" class="confluenceTd">-</td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>(Camel 2.14)</strong> contains the HapiContext that<br clear="none">was used to parse the message</p></td></tr></tbody></table></div></div><p>All headers except <code>CamelHL7Context </code>are <code>String</code> types. If a header value is missing, its value is <code>null</code>.</p><h3 id="HL7-Options">Options</h3><p>The HL7 Data Format supports the following options:</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>Default</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>validate</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether the HAPI Parser should validate using the default validation rules. Better use the <code>parser</code> or <code>hapiContext</code> option and initialize it with the desired HAPI <code>ValidationContext</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>parser</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ca.uhn.hl7v2.parser.GenericParser</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Use a custom parser. Must be of type <code>ca.uhn.hl7v2.parser.Parser</code>. Note that <code>GenericParser</code> also allows to parse XML-encoded HL7v2 messages</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>hapiContext</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>ca.uhn.hl7v2.DefaultHapiContext</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.14:</strong> Use a custom HAPI context that can define a custom parser, custom ValidationContext etc. This gives you full control over the HL7 parsing and rendering process.</td></tr></tbody></table></div></div><h3 id="HL7-Dependencies">Dependencies</h3><p>To use HL7 in your Camel routes you'll need to add a dependency on <strong>camel-hl7</strong> listed above, which implements this data format.</p><p>The HAPI library since Version 0.6 has been split into a <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-base" rel="nofollow">base library</a> and several structure libraries, one for each HL7v2 message version:</p><ul><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v21" rel="nofollow">v2.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v22" rel="nofollow">v2.2 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v23" rel="nofollow">v2.3 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v231" rel="nofollow">v2.3.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v24" rel="nofollow">v2.4 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v25" rel="nofollow">v2.5 s tructures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v251" rel="nofollow">v2.5.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v26" rel="nofollow">v2.6 structures library</a></li></ul><p>By default <code>camel-hl7</code> only references the HAPI <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-base" rel="nofollow">base library</a>. Applications are responsible for including structure libraries themselves. For example, if a application works with HL7v2 message versions 2.4 and 2.5 then the following dependencies must be added:</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> <groupId>ca.uhn.hapi</groupId> <artifactId>hapi-structures-v24</artifactId> - <version>1.2</version> + <version>2.2</version> <!-- use the same version as your hapi-base version --> </dependency> <dependency> <groupId>ca.uhn.hapi</groupId> <artifactId>hapi-structures-v25</artifactId> - <version>1.2</version> + <version>2.2</version> <!-- use the same version as your hapi-base version --> </dependency> ]]></script> @@ -218,10 +211,10 @@ Then you don't need to create an instanc <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[<dependency> <groupId>ca.uhn.hapi</groupId> <artifactId>hapi-osgi-base</artifactId> - <version>1.2</version> + <version>2.2</version> </dependency> ]]></script> -</div></div><h3 id="HL7-Terserlanguage(Camel2.11)">Terser language (<strong>Camel 2.11</strong>)</h3><p><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net" rel="nofollow">HAPI</a> provides a <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/util/Terser.html" rel="nofollow">Terser</a> class that provides access to fields using a commonly used terse location specification syntax. The Terser language allows to use this syntax to extract values from messages and to use them as expressions and predicates for filtering, content-based routing etc.</p><p>Sample:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><h3 id="HL7-Terserlanguage">Terser language</h3><p><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net" rel="nofollow">HAPI</a> provides a <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/util/Terser.html" rel="nofollow">Terser</a> class that provides access to fields using a commonly used terse location specification syntax. The Terser language allows to use this syntax to extract values from messages and to use them as expressions and predicates for filtering, content-based routing etc.</p><p>Sample:</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[import static org.apache.camel.component.hl7.HL7.terser; ... @@ -236,18 +229,45 @@ Then you don't need to create an instanc .to("mock:test2"); ]]></script> -</div></div><h3 id="HL7-HL7Validationpredicate(Camel2.11)">HL7 Validation predicate (<strong>Camel 2.11</strong>)</h3><p>Often it is preferable to parse a HL7v2 message and validate it against a HAPI <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/validation/ValidationContext.html" rel="nofollow">ValidationContext</a> in a separate step afterwards.</p><p>Sample:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><h3 id="HL7-HL7Validationpredicate">HL7 Validation predicate</h3><p>Often it is preferable to parse a HL7v2 message and validate it against a HAPI <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/validation/ValidationContext.html" rel="nofollow">ValidationContext</a> in a separate step afterwards.</p><p>Sample:</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[import static org.apache.camel.component.hl7.HL7.messageConformsTo; import ca.uhn.hl7v2.validation.impl.DefaultValidation; ... - // Use standard or define your own validation rules + // Use standard or define your own validation rules ValidationContext defaultContext = new DefaultValidation(); // Throws PredicateValidationException if message does not validate from("direct:test1").validate(messageConformsTo(defaultContext)).to("mock:test1"); ]]></script> -</div></div><h3 id="HL7-HL7Acknowledgementexpression(Camel2.11)">HL7 Acknowledgement expression (<strong>Camel 2.11</strong>)</h3><p>A common task in HL7v2 processing is to generate an acknowledgement message as response to an incoming HL7v2 message, e.g. based on a validation result. The <code>ack</code> expression lets us accomplish this very elegantly:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><h3 id="HL7-HL7ValidationpredicateusingtheHapiContext(Camel2.14)">HL7 Validation predicate using the HapiContext (Camel 2.14)</h3><p>The HAPI Context is always configured with a <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/validation/ValidationContext.html" rel="nofollow">ValidationContext</a> (or a <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/validation/builder/ValidationRuleBuilder.html" rel="nofollow">ValidationRuleBuilder</a>), so you can access the validation rules indirectly. Furthermore, when unmarshalling the HL7DataFormat forwards the configured  HAPI context  in the <code>CamelHL7Context </code>header, and the validation rules of this context can be easily reused:</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[import static org.apache.camel.component.hl7.HL7.messageConformsTo; +import static org.apache.camel.component.hl7.HL7.messageConforms +... + + HapiContext hapiContext = new DefaultHapiContext(); + hapiContext.getParserConfiguration().setValidating(false); // don't validate during parsing + + // customize HapiContext some more ... e.g. enforce that PID-8 in ADT_A01 messages of version 2.4 is not empty + ValidationRuleBuilder builder = new ValidationRuleBuilder() { + @Override + protected void configure() { + forVersion(Version.V24) + .message("ADT", "A01") + .terser("PID-8", not(empty())); + } + }; + hapiContext.setValidationRuleBuilder(builder); + + HL7DataFormat hl7 = new HL7DataFormat(); + hl7.setHapiContext(hapiContext); + + from("direct:test1") + .unmarshal(hl7) // uses the GenericParser returned from the HapiContext + .validate(messageConforms()) // uses the validation rules returned from the HapiContext + // equivalent with .validate(messageConformsTo(hapiContext)) + // route continues from here]]></script> +</div></div><p> </p><h3 id="HL7-HL7Acknowledgementexpression">HL7 Acknowledgement expression</h3><p>A common task in HL7v2 processing is to generate an acknowledgement message as response to an incoming HL7v2 message, e.g. based on a validation result. The <code>ack</code> expression lets us accomplish this very elegantly:</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[import static org.apache.camel.component.hl7.HL7.messageConformsTo; import static org.apache.camel.component.hl7.HL7.ack; import ca.uhn.hl7v2.validation.impl.DefaultValidation;