Author: buildbot Date: Mon Aug 29 14:18:36 2016 New Revision: 996163 Log: Production update by buildbot for camel
Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/mongodb-gridfs.html Modified: websites/production/camel/content/cache/main.pageCache ============================================================================== Binary files - no diff available. Modified: websites/production/camel/content/mongodb-gridfs.html ============================================================================== --- websites/production/camel/content/mongodb-gridfs.html (original) +++ websites/production/camel/content/mongodb-gridfs.html Mon Aug 29 14:18:36 2016 @@ -96,7 +96,7 @@ </div></div><h2 id="MongoDBGridFS-URIformat">URI format</h2><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[gridfs:connectionBean?database=databaseName&bucket=bucketName[&moreOptions...] ]]></script> -</div></div><h2 id="MongoDBGridFS-Endpointoptions">Endpoint options</h2><p>GridFS endpoints support the following options, depending on whether they are acting like a Producer or as a Consumer (options vary based on the consumer type too).</p><p> </p><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><th colspan="1" rowspan="1" class="confluenceTh"><p>Producer</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Consumer</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>database</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Required.</strong> The name of the database to which this endpoint will be bound. All operations will be execu ted against this database.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bucket</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>fs</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The name of the GridFS bucket within the Database. The default is the GridFS.DEFAULT_BUCKET value ("fs").</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick" src="https://cwiki .apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>operation</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>create</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The id of the operation this endpoint will execute. Pick from the following:</p><ul><li>Query operations: <code>findOne</code>, <code>listAll</code>, <code>count</code></li><li>Write operations: <code>create</code></li><li>Delete operations: <code>remove</code></li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon emoti con-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">query</td><td colspan="1" rowspan="1" class="confluenceTd">none</td><td colspan="1" rowspan="1" class="confluenceTd">Combined with the query strategy parameters to create the query used to search for new files.</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">queryStrategy</td><td colspan="1" rowspan="1" class="confluenceTd">TimeStamp</td><td c olspan="1" rowspan="1" class="confluenceTd"><p>The strategy that is used to find new files. Can be one of:</p><ul><li>TimeStamp - files that are uploaded after the Consumer starts are processed</li><li>PersistentTimestamp - Like TimeStamp, but the last timestamp used is persisted to a collection so when the Consumer restarts, it can resume where it left off</li><li>FileAttribute - finds files that do NOT have the give attribute. After processing, it adds the attribute.</li><li>TimestampAndFileAttribute - finds files that are newer than the TimeStamp and are missing the attribute</li><li>PersistentTimestampAndFileAttribute</li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></td></tr><tr><td colspan="1" rowspa n="1" class="confluenceTd">persistentTSCollection</td><td colspan="1" rowspan="1" class="confluenceTd">camel-timestamps</td><td colspan="1" rowspan="1" class="confluenceTd">When using persistent timestamps, this is the Collection that the timestamp is stored into.</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">persistenTSObject</td><td colspan="1" rowspan="1" class="confluenceTd">camel-timestamp</td><td colspan="1" rowspan="1" class="confluenceTd">When using persistent timestamps, this is the object ID for the timestamp object. Each consumer can have it's own timestamp ID stored in a common Collection</td><td colspan="1" rowspan="1" class="confluenceTd "> </td><td colspan="1" rowspan="1" class="confluenceTd"><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">fileAttributeName</td><td colspan="1" rowspan="1" class="confluenceTd">camel-processed</td><td colspan="1" rowspan="1" class="confluenceTd">When using FileAttribute, this is the name of the attribute that is used. When a file is about to be processed, the attribute is set to "processing" and then set to "done" when the file processing is done.</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick )"></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">delay</td><td colspan="1" rowspan="1" class="confluenceTd">500 (ms)</td><td colspan="1" rowspan="1" class="confluenceTd">The delay between polling GridFS for new files</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">initialDelay</td><td colspan="1" rowspan="1" class="confluenceTd">1000 (ms)</td><td colspan="1" rowspan="1" class="confluenceTd">The initial delay before the first poll</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb 3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></td></tr></tbody></table></div><h2 id="MongoDBGridFS-ConfigurationofdatabaseinSpringXML">Configuration of database in Spring XML</h2><p>The following Spring XML creates a bean defining the connection to a MongoDB instance.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><h2 id="MongoDBGridFS-Endpointoptions">Endpoint options</h2><p>GridFS endpoints support the following options, depending on whether they are acting like a Producer or as a Consumer (options vary based on the consumer type too).</p><p> </p><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><th colspan="1" rowspan="1" class="confluenceTh"><p>Producer</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Consumer</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>database</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Required.</strong> The name of the database to which this endpoint will be bound. All operations will be execu ted against this database.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bucket</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>fs</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The name of the GridFS bucket within the Database. The default is the GridFS.DEFAULT_BUCKET value ("fs").</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick" src="https://cwiki .apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>operation</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>create</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The id of the operation this endpoint will execute. Pick from the following:</p><ul><li>Query operations: <code>findOne</code>, <code>listAll</code>, <code>count</code></li><li>Write operations: <code>create</code></li><li>Delete operations: <code>remove</code></li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon emoti con-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>query</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Combined with the query strategy parameters to create the query used to search for new files.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p> </td><td colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>queryStrategy</p></td><td colspan="1" rows pan="1" class="confluenceTd"><p>TimeStamp</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The strategy that is used to find new files. Can be one of:</p><ul><li><p>TimeStamp - files that are uploaded after the Consumer starts are processed</p></li><li><p>PersistentTimestamp - Like TimeStamp, but the last timestamp used is persisted to a collection so when the Consumer restarts, it can resume where it left off</p></li><li><p>FileAttribute - finds files that do NOT have the give attribute. After processing, it adds the attribute.</p></li><li><p>TimestampAndFileAttribute - finds files that are newer than the TimeStamp and are missing the attribute</p></li><li><p>PersistentTimestampAndFileAttribute</p></li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/ic ons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>persistentTSCollection</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>camel-timestamps</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>When using persistent timestamps, this is the Collection that the timestamp is stored into.</p></td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>persistenTSObject</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>camel-timestamp</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>When using persistent timestamps, this is the object ID for the ti mestamp object. Each consumer can have it's own timestamp ID stored in a common Collection</p></td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>fileAttributeName</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>camel-processed</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>When using FileAttribute, this is the name of the attribute that is used. When a file is about to be processed, the attribute is set to "processing" and then set to "done" when the file processing is done.</p></td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"><img class="emoticon emoticon-tick" sr c="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>delay</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>500 (ms)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The delay between polling GridFS for new files</p></td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>initialDelay</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>1000 (ms)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The initial delay before the first poll</p></ td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></td></tr></tbody></table></div><h2 id="MongoDBGridFS-ConfigurationofdatabaseinSpringXML">Configuration of database in Spring XML</h2><p>The following Spring XML creates a bean defining the connection to a MongoDB instance.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> @@ -112,7 +112,7 @@ <to uri="gridfs:mongoBean?database=${mongodb.database}&amp;operation=findOne" /> <to uri="direct:result" /> </route>]]></script> -</div></div><p> </p><h2 id="MongoDBGridFS-GridFSoperations-producerendpoint">GridFS operations - producer endpoint</h2><h4 id="MongoDBGridFS-count">count</h4><p>Returns the total number of file in the collection, returning an Integer as the OUT message body.<br clear="none"><br clear="none"></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><p> </p><h2 id="MongoDBGridFS-GridFSoperations-producerendpoint">GridFS operations - producer endpoint</h2><h4 id="MongoDBGridFS-count">count</h4><p>Returns the total number of file in the collection, returning an Integer as the OUT message body.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[// from("direct:count").to("gridfs?database=tickets&operation=count"); Integer result = template.requestBodyAndHeader("direct:count", "irrelevantBody"); assertTrue("Result is not of type Long", result instanceof Integer);