Author: buildbot Date: Thu May 10 02:29:18 2012 New Revision: 817029 Log: Production update by buildbot for camel
Modified: websites/production/camel/content/book-component-appendix.html websites/production/camel/content/book-in-one-page.html websites/production/camel/content/cache/main.pageCache websites/production/camel/content/jcr.html Modified: websites/production/camel/content/book-component-appendix.html ============================================================================== --- websites/production/camel/content/book-component-appendix.html (original) +++ websites/production/camel/content/book-component-appendix.html Thu May 10 02:29:18 2012 @@ -8037,7 +8037,7 @@ In <b>Camel 2.0</b> we store big input s <h2><a shape="rect" name="BookComponentAppendix-JCRComponent"></a>JCR Component</h2> -<p>The <b><tt>jcr</tt></b> component allows you to add nodes to a JCR compliant content repository (for example, <a shape="rect" class="external-link" href="http://jackrabbit.apache.org/">Apache Jackrabbit</a>).</p> +<p>The <b><tt>jcr</tt></b> component allows you to add/read nodes to/from a JCR compliant content repository (for example, <a shape="rect" class="external-link" href="http://jackrabbit.apache.org/">Apache Jackrabbit</a>) using a producer, or listen for changes with a consumer.</p> <p>Maven users will need to add the following dependency to their <tt>pom.xml</tt> for this component:</p> <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> @@ -8059,19 +8059,46 @@ jcr:<span class="code-comment">//user:pa </pre> </div></div> +<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Consumer added</b><br clear="none">From <b>Camel 2.10</b> onwards you can use consumer as an EventListener in JCR or a producer to read a node by identifier.</td></tr></table></div> + <h3><a shape="rect" name="BookComponentAppendix-Usage"></a>Usage</h3> <p>The <tt>repository</tt> element of the URI is used to look up the JCR <tt>Repository</tt> object in the Camel context registry.</p> -<p>If a message is sent to a JCR producer endpoint:</p> -<ul><li>A new node is created in the content repository,</li><li>All the message properties of the IN message are transformed to JCR <tt>Value</tt> instances and added to the new node,</li><li>The node's UUID is returned in the OUT message.</li></ul> +<h4><a shape="rect" name="BookComponentAppendix-Producer"></a>Producer</h4> +<div class="confluenceTableSmall"><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"> Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelJcrOperation</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelJcrInsert</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> CamelJcrInsert or CamelJcrGetById operation to use </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelJcrNodeName</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Used to determine the node name to use. </td></tr></tbody></table> +</div> +</div> -<h3><a shape="rect" name="BookComponentAppendix-Messageproperties"></a>Message properties</h3> -<p>All message properties are converted to node properties, except for the <tt>CamelJcrNodeName</tt> property (you can refer to <tt>JcrConstants.NODE_NAME</tt> in your code), which is used to determine the node name.</p> +<p>When a message is sent to a JCR producer endpoint:<br clear="none"> +*If the operation is CamelJcrInsert: A new node is created in the content repository, all the message properties of the IN message are transformed to JCR <tt>Value</tt> instances and added to the new node and the node's UUID is returned in the OUT message.<br clear="none"> +*If the operation is CamelJcrGetById: A new node is retrieved from the repository using the message body as node identifier.</p> + +<h4><a shape="rect" name="BookComponentAppendix-Consumer"></a>Consumer</h4> +<div class="confluenceTableSmall"><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"> Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>eventTypes</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> A combination of one or more event types encoded as a bit mask value such as javax.jcr.observation.Event.NODE_ADDED, javax.jcr.observation.Event.NODE_REMOVED, etc. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>deep</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> When it is true, events whose associated parent node is at current path or within its subgraph are received. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>uuids</ tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Only events whose associated parent node has one of the identifiers in the comma separated uuid list will be received.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>nodeTypeNames</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Only events whose associated parent node has one of the node types (or a subtype of one of the node types) in this list will be received. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>noLocal</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> If <tt>noLocal</tt> is <tt>true</tt>, then events generated by the session through which the listener was registered are ignored. Otherwise, they are not ignored</td></tr></tbody></table> +</div> +</div> <h3><a shape="rect" name="BookComponentAppendix-Example"></a>Example</h3> -<p>The snippet below creates a node named <tt>node</tt> under the <tt>/home/test</tt> node in the content repository. One additional attribute is added to the node as well: <tt>my.contents.property</tt> which will contain the body of the message being sent.</p> -<div class="error"><span class="error">Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div> +<p>The snippet below creates a node named <tt>node</tt> under the <tt>/home/test</tt> node in the content repository. One additional attribute is added to the node as well: <tt>my.contents.property</tt> which will contain the body of the message being sent.</p> +<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> +<pre class="code-java">from(<span class="code-quote">"direct:a"</span>).setProperty(JcrConstants.JCR_NODE_NAME, constant(<span class="code-quote">"node"</span>)) + .setProperty(<span class="code-quote">"my.contents.property"</span>, body()) + .to(<span class="code-quote">"jcr:<span class="code-comment">//user:pass@repository/home/test"</span>);</span> +</pre> +</div></div> + +<p>The following code will register an EventListener under the path import-application/inbox for Event.NODE_ADDED and Event.NODE_REMOVED events (event types 1 and 2, both masked as 3) and listening deep for all the children.</p> +<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> +<pre class="code-xml"> +<span class="code-tag"><route></span> + <span class="code-tag"><from uri=<span class="code-quote">"jcr://user:pass@repository/import-application/inbox?eventTypes=3&deep=true"</span> /></span> + <span class="code-tag"><to uri=<span class="code-quote">"direct:execute-import-application"</span> /></span> +<span class="code-tag"></route></span> +</pre> +</div></div> <h3><a shape="rect" name="BookComponentAppendix-SeeAlso"></a>See Also</h3> <ul><li><a shape="rect" href="configuring-camel.html" title="Configuring Camel">Configuring Camel</a></li><li><a shape="rect" href="component.html" title="Component">Component</a></li><li><a shape="rect" href="endpoint.html" title="Endpoint">Endpoint</a></li><li><a shape="rect" href="getting-started.html" title="Getting Started">Getting Started</a></li></ul> Modified: websites/production/camel/content/book-in-one-page.html ============================================================================== --- websites/production/camel/content/book-in-one-page.html (original) +++ websites/production/camel/content/book-in-one-page.html Thu May 10 02:29:18 2012 @@ -4238,6 +4238,10 @@ mvn archetype:create -DgroupId=org.examp <span class="code-tag"><groupId></span>org.apache.activemq<span class="code-tag"></groupId></span> <span class="code-tag"><artifactId></span>activemq-camel<span class="code-tag"></artifactId></span> <span class="code-tag"></dependency></span> +<span class="code-tag"><dependency></span> + <span class="code-tag"><groupId></span>org.apache.activemq<span class="code-tag"></groupId></span> + <span class="code-tag"><artifactId></span>activemq-pool<span class="code-tag"></artifactId></span> +<span class="code-tag"></dependency></span> </pre> </div></div> <p>As we use spring xml configuration for the ActiveMQ JMS broker we need this dependency:</p> @@ -28423,7 +28427,7 @@ In <b>Camel 2.0</b> we store big input s <h2><a shape="rect" name="BookInOnePage-JCRComponent"></a>JCR Component</h2> -<p>The <b><tt>jcr</tt></b> component allows you to add nodes to a JCR compliant content repository (for example, <a shape="rect" class="external-link" href="http://jackrabbit.apache.org/">Apache Jackrabbit</a>).</p> +<p>The <b><tt>jcr</tt></b> component allows you to add/read nodes to/from a JCR compliant content repository (for example, <a shape="rect" class="external-link" href="http://jackrabbit.apache.org/">Apache Jackrabbit</a>) using a producer, or listen for changes with a consumer.</p> <p>Maven users will need to add the following dependency to their <tt>pom.xml</tt> for this component:</p> <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> @@ -28445,19 +28449,46 @@ jcr:<span class="code-comment">//user:pa </pre> </div></div> +<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Consumer added</b><br clear="none">From <b>Camel 2.10</b> onwards you can use consumer as an EventListener in JCR or a producer to read a node by identifier.</td></tr></table></div> + <h3><a shape="rect" name="BookInOnePage-Usage"></a>Usage</h3> <p>The <tt>repository</tt> element of the URI is used to look up the JCR <tt>Repository</tt> object in the Camel context registry.</p> -<p>If a message is sent to a JCR producer endpoint:</p> -<ul><li>A new node is created in the content repository,</li><li>All the message properties of the IN message are transformed to JCR <tt>Value</tt> instances and added to the new node,</li><li>The node's UUID is returned in the OUT message.</li></ul> +<h4><a shape="rect" name="BookInOnePage-Producer"></a>Producer</h4> + +<div class="confluenceTableSmall"><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"> Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelJcrOperation</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelJcrInsert</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> CamelJcrInsert or CamelJcrGetById operation to use </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelJcrNodeName</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Used to determine the node name to use. </td></tr></tbody></table> +</div> +</div> +<p>When a message is sent to a JCR producer endpoint:<br clear="none"> +*If the operation is CamelJcrInsert: A new node is created in the content repository, all the message properties of the IN message are transformed to JCR <tt>Value</tt> instances and added to the new node and the node's UUID is returned in the OUT message.<br clear="none"> +*If the operation is CamelJcrGetById: A new node is retrieved from the repository using the message body as node identifier.</p> -<h3><a shape="rect" name="BookInOnePage-Messageproperties"></a>Message properties</h3> -<p>All message properties are converted to node properties, except for the <tt>CamelJcrNodeName</tt> property (you can refer to <tt>JcrConstants.NODE_NAME</tt> in your code), which is used to determine the node name.</p> +<h4><a shape="rect" name="BookInOnePage-Consumer"></a>Consumer</h4> +<div class="confluenceTableSmall"><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"> Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>eventTypes</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> A combination of one or more event types encoded as a bit mask value such as javax.jcr.observation.Event.NODE_ADDED, javax.jcr.observation.Event.NODE_REMOVED, etc. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>deep</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> When it is true, events whose associated parent node is at current path or within its subgraph are received. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>uuids</ tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Only events whose associated parent node has one of the identifiers in the comma separated uuid list will be received.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>nodeTypeNames</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Only events whose associated parent node has one of the node types (or a subtype of one of the node types) in this list will be received. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>noLocal</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> If <tt>noLocal</tt> is <tt>true</tt>, then events generated by the session through which the listener was registered are ignored. Otherwise, they are not ignored</td></tr></tbody></table> +</div> +</div> <h3><a shape="rect" name="BookInOnePage-Example"></a>Example</h3> -<p>The snippet below creates a node named <tt>node</tt> under the <tt>/home/test</tt> node in the content repository. One additional attribute is added to the node as well: <tt>my.contents.property</tt> which will contain the body of the message being sent.</p> -<div class="error"><span class="error">Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div> +<p>The snippet below creates a node named <tt>node</tt> under the <tt>/home/test</tt> node in the content repository. One additional attribute is added to the node as well: <tt>my.contents.property</tt> which will contain the body of the message being sent.</p> +<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> +<pre class="code-java">from(<span class="code-quote">"direct:a"</span>).setProperty(JcrConstants.JCR_NODE_NAME, constant(<span class="code-quote">"node"</span>)) + .setProperty(<span class="code-quote">"my.contents.property"</span>, body()) + .to(<span class="code-quote">"jcr:<span class="code-comment">//user:pass@repository/home/test"</span>);</span> +</pre> +</div></div> + +<p>The following code will register an EventListener under the path import-application/inbox for Event.NODE_ADDED and Event.NODE_REMOVED events (event types 1 and 2, both masked as 3) and listening deep for all the children.</p> +<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> +<pre class="code-xml"> +<span class="code-tag"><route></span> + <span class="code-tag"><from uri=<span class="code-quote">"jcr://user:pass@repository/import-application/inbox?eventTypes=3&deep=true"</span> /></span> + <span class="code-tag"><to uri=<span class="code-quote">"direct:execute-import-application"</span> /></span> +<span class="code-tag"></route></span> +</pre> +</div></div> <h3><a shape="rect" name="BookInOnePage-SeeAlso"></a>See Also</h3> <ul><li><a shape="rect" href="configuring-camel.html" title="Configuring Camel">Configuring Camel</a></li><li><a shape="rect" href="component.html" title="Component">Component</a></li><li><a shape="rect" href="endpoint.html" title="Endpoint">Endpoint</a></li><li><a shape="rect" href="getting-started.html" title="Getting Started">Getting Started</a></li></ul> Modified: websites/production/camel/content/cache/main.pageCache ============================================================================== Binary files - no diff available. Modified: websites/production/camel/content/jcr.html ============================================================================== --- websites/production/camel/content/jcr.html (original) +++ websites/production/camel/content/jcr.html Thu May 10 02:29:18 2012 @@ -77,7 +77,7 @@ <td valign="top" width="100%"> <div class="wiki-content maincontent"><h2><a shape="rect" name="JCR-JCRComponent"></a>JCR Component</h2> -<p>The <b><tt>jcr</tt></b> component allows you to add nodes to a JCR compliant content repository (for example, <a shape="rect" class="external-link" href="http://jackrabbit.apache.org/">Apache Jackrabbit</a>).</p> +<p>The <b><tt>jcr</tt></b> component allows you to add/read nodes to/from a JCR compliant content repository (for example, <a shape="rect" class="external-link" href="http://jackrabbit.apache.org/">Apache Jackrabbit</a>) using a producer, or listen for changes with a consumer.</p> <p>Maven users will need to add the following dependency to their <tt>pom.xml</tt> for this component:</p> <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> @@ -99,19 +99,46 @@ jcr:<span class="code-comment">//user:pa </pre> </div></div> +<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Consumer added</b><br clear="none">From <b>Camel 2.10</b> onwards you can use consumer as an EventListener in JCR or a producer to read a node by identifier.</td></tr></table></div> + <h3><a shape="rect" name="JCR-Usage"></a>Usage</h3> <p>The <tt>repository</tt> element of the URI is used to look up the JCR <tt>Repository</tt> object in the Camel context registry.</p> -<p>If a message is sent to a JCR producer endpoint:</p> -<ul><li>A new node is created in the content repository,</li><li>All the message properties of the IN message are transformed to JCR <tt>Value</tt> instances and added to the new node,</li><li>The node's UUID is returned in the OUT message.</li></ul> +<h4><a shape="rect" name="JCR-Producer"></a>Producer</h4> +<div class="confluenceTableSmall"><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"> Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelJcrOperation</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelJcrInsert</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> CamelJcrInsert or CamelJcrGetById operation to use </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelJcrNodeName</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Used to determine the node name to use. </td></tr></tbody></table> +</div> +</div> -<h3><a shape="rect" name="JCR-Messageproperties"></a>Message properties</h3> -<p>All message properties are converted to node properties, except for the <tt>CamelJcrNodeName</tt> property (you can refer to <tt>JcrConstants.NODE_NAME</tt> in your code), which is used to determine the node name.</p> +<p>When a message is sent to a JCR producer endpoint:<br clear="none"> +*If the operation is CamelJcrInsert: A new node is created in the content repository, all the message properties of the IN message are transformed to JCR <tt>Value</tt> instances and added to the new node and the node's UUID is returned in the OUT message.<br clear="none"> +*If the operation is CamelJcrGetById: A new node is retrieved from the repository using the message body as node identifier.</p> + +<h4><a shape="rect" name="JCR-Consumer"></a>Consumer</h4> +<div class="confluenceTableSmall"><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"> Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>eventTypes</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> A combination of one or more event types encoded as a bit mask value such as javax.jcr.observation.Event.NODE_ADDED, javax.jcr.observation.Event.NODE_REMOVED, etc. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>deep</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> When it is true, events whose associated parent node is at current path or within its subgraph are received. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>uuids</ tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Only events whose associated parent node has one of the identifiers in the comma separated uuid list will be received.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>nodeTypeNames</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Only events whose associated parent node has one of the node types (or a subtype of one of the node types) in this list will be received. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>noLocal</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> If <tt>noLocal</tt> is <tt>true</tt>, then events generated by the session through which the listener was registered are ignored. Otherwise, they are not ignored</td></tr></tbody></table> +</div> +</div> <h3><a shape="rect" name="JCR-Example"></a>Example</h3> -<p>The snippet below creates a node named <tt>node</tt> under the <tt>/home/test</tt> node in the content repository. One additional attribute is added to the node as well: <tt>my.contents.property</tt> which will contain the body of the message being sent.</p> -<div class="error"><span class="error">Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div> +<p>The snippet below creates a node named <tt>node</tt> under the <tt>/home/test</tt> node in the content repository. One additional attribute is added to the node as well: <tt>my.contents.property</tt> which will contain the body of the message being sent.</p> +<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> +<pre class="code-java">from(<span class="code-quote">"direct:a"</span>).setProperty(JcrConstants.JCR_NODE_NAME, constant(<span class="code-quote">"node"</span>)) + .setProperty(<span class="code-quote">"my.contents.property"</span>, body()) + .to(<span class="code-quote">"jcr:<span class="code-comment">//user:pass@repository/home/test"</span>);</span> +</pre> +</div></div> + +<p>The following code will register an EventListener under the path import-application/inbox for Event.NODE_ADDED and Event.NODE_REMOVED events (event types 1 and 2, both masked as 3) and listening deep for all the children.</p> +<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> +<pre class="code-xml"> +<span class="code-tag"><route></span> + <span class="code-tag"><from uri=<span class="code-quote">"jcr://user:pass@repository/import-application/inbox?eventTypes=3&deep=true"</span> /></span> + <span class="code-tag"><to uri=<span class="code-quote">"direct:execute-import-application"</span> /></span> +<span class="code-tag"></route></span> +</pre> +</div></div> <h3><a shape="rect" name="JCR-SeeAlso"></a>See Also</h3> <ul><li><a shape="rect" href="configuring-camel.html" title="Configuring Camel">Configuring Camel</a></li><li><a shape="rect" href="component.html" title="Component">Component</a></li><li><a shape="rect" href="endpoint.html" title="Endpoint">Endpoint</a></li><li><a shape="rect" href="getting-started.html" title="Getting Started">Getting Started</a></li></ul>