camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r1004178 - in /websites/production/camel/content: cache/main.pageCache mongodb.html
Date Thu, 05 Jan 2017 08:20:12 GMT
Author: buildbot
Date: Thu Jan  5 08:20:12 2017
New Revision: 1004178

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/mongodb.html

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/mongodb.html
==============================================================================
--- websites/production/camel/content/mongodb.html (original)
+++ websites/production/camel/content/mongodb.html Thu Jan  5 08:20:12 2017
@@ -106,7 +106,17 @@
         <constructor-arg name="port" value="${mongodb.port}"
/>
     </bean>
 &lt;/beans&gt;]]></script>
-</div></div><h3 id="MongoDB-Sampleroute">Sample route</h3><p>The
following route defined in Spring XML executes the operation <a shape="rect" href="#MongoDB-getDbStats"><strong>dbStats</strong></a>
on a collection.</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Get DB stats
for specified collection</b></div><div class="codeContent panelContent pdl">
+</div></div><p>In case you are using a 3.x MongoDB instance you have to
use the following bean</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[&lt;?xml
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
+    xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+    xsi:schemaLocation=&quot;http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd&quot;&gt;
+    &lt;bean id=&quot;mongoBean&quot; class=&quot;com.mongodb.MongoClient&quot;&gt;
+        &lt;constructor-arg name=&quot;host&quot; value=&quot;${mongodb.host}&quot;
/&gt;
+        &lt;constructor-arg name=&quot;port&quot; value=&quot;${mongodb.port}&quot;
/&gt;
+    &lt;/bean&gt;
+&lt;/beans&gt;]]></script>
+</div></div><p>&#160;</p><p>&#160;</p><h3
id="MongoDB-Sampleroute">Sample route</h3><p>The following route defined in
Spring XML executes the operation <a shape="rect" href="#MongoDB-getDbStats"><strong>dbStats</strong></a>
on a collection.</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Get DB stats
for specified collection</b></div><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;route&gt;
   &lt;from uri=&quot;direct:start&quot; /&gt;
   &lt;!-- using bean &#39;mongoBean&#39; defined above --&gt;
@@ -256,7 +266,7 @@ assertTrue(&quot;Result is not of type L
 	.autoStartup(false)
 	.to(&quot;mock:test&quot;);
 ]]></script>
-</div></div><h2 id="MongoDB-Typeconversions">Type conversions</h2><p>The
<code>MongoDbBasicConverters</code> type converter included with the camel-mongodb
component provides the following conversions:</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>From type</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>To type</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>How?</p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>fromMapToDBObject</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>Map</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>DBObject</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>constructs a new <code>BasicDBObject</code>
via the <code>new BasicDBObject(Map m)</code> constructor</p></td></tr><tr><td
colspan="1" rowspan="1" class="conflu
 enceTd"><p>fromBasicDBObjectToMap</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>BasicDBObject</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>Map</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>BasicDBObject</code>
already implements <code>Map</code></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>fromStringToDBObject</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>DBObject</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>uses <code>com.mongodb.util.JSON.parse(String
s)</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>fromAnyObjectToDBObject</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code>&#160;</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>DBObject</code>&#160;</p></td><td
colspan="1" rowspan="1" class
 ="confluenceTd"><p>uses the <a shape="rect" class="external-link" href="http://jackson.codehaus.org/"
rel="nofollow">Jackson library</a> to convert the object to a <code>Map</code>,
which is in turn used to initialise a new <code>BasicDBObject</code></p></td></tr></tbody></table></div><p>This
type converter is auto-discovered, so you don't need to configure anything manually.</p><h2
id="MongoDB-Seealso">See also</h2><ul><li><a shape="rect" class="external-link"
href="http://www.mongodb.org/" rel="nofollow">MongoDB website</a></li><li><a
shape="rect" class="external-link" href="http://en.wikipedia.org/wiki/NoSQL" rel="nofollow">NoSQL
Wikipedia article</a></li><li><a shape="rect" class="external-link" href="http://api.mongodb.org/java/current/"
rel="nofollow">MongoDB Java driver API docs - current version</a></li><li><a
shape="rect" class="external-link" href="http://svn.apache.org/viewvc/camel/trunk/components/camel-mongodb/src/test/">Unit
tests</a> for more examples of usage</li></u
 l></div>
+</div></div><h2 id="MongoDB-Typeconversions">Type conversions</h2><p>The
<code>MongoDbBasicConverters</code> type converter included with the camel-mongodb
component provides the following conversions:</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>From type</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>To type</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>How?</p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>fromMapToDBObject</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>Map</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>DBObject</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>constructs a new <code>BasicDBObject</code>
via the <code>new BasicDBObject(Map m)</code> constructor</p></td></tr><tr><td
colspan="1" rowspan="1" class="conflu
 enceTd"><p>fromBasicDBObjectToMap</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>BasicDBObject</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>Map</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>BasicDBObject</code>
already implements <code>Map</code></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>fromStringToDBObject</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>DBObject</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>uses <code>com.mongodb.util.JSON.parse(String
s)</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>fromAnyObjectToDBObject</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code>&#160;</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>DBObject</code>&#160;</p></td><td
colspan="1" rowspan="1" class
 ="confluenceTd"><p>uses the <a shape="rect" class="external-link" href="http://jackson.codehaus.org/"
rel="nofollow">Jackson library</a> to convert the object to a <code>Map</code>,
which is in turn used to initialise a new <code>BasicDBObject</code></p></td></tr></tbody></table></div><p>This
type converter is auto-discovered, so you don't need to configure anything manually.</p><h2
id="MongoDB-Seealso">See also</h2><ul><li><a shape="rect" class="external-link"
href="http://www.mongodb.org/" rel="nofollow">MongoDB website</a></li><li><a
shape="rect" class="external-link" href="http://en.wikipedia.org/wiki/NoSQL" rel="nofollow">NoSQL
Wikipedia article</a></li><li><a shape="rect" class="external-link" href="http://api.mongodb.org/java/current/"
rel="nofollow">MongoDB Java driver API docs - current version</a></li><li><a
shape="rect" class="external-link" href="http://svn.apache.org/viewvc/camel/trunk/components/camel-mongodb/src/test/">Unit
tests</a> for more examples of usage</li></u
 l><p>https://github.com/apache/camel/blob/master/components/camel-mongodb3/src/main/docs/mongodb3-component.adoc</p></div>
         </td>
         <td valign="top">
           <div class="navigation">



Mime
View raw message