JCRPage edited by willem jiangJCR ComponentThe jcr component allows you to add nodes to a JCR (JSR-170) compliant content repository (for example, Apache Jackrabbit ). <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-jcr</artifactId> <version>x.x.x</version> <!-- use the same version as your Camel core version --> </dependency>
Message propertiesAll message properties are converted to node properties, except for the CamelJcrNodeName property (you can refer to JcrConstants.NODE_NAME in your code), which is used to determine the node name. ExampleThe snippet below creates a node named node under the /home/test node in the content repository. One additional attribute is added to the node as well: my.contents.property which will contain the body of the message being sent. from("direct:a").setProperty(JcrConstants.JCR_NODE_NAME, constant("node")) .setProperty("my.contents.property", body()).to("jcr://user:p...@repository/home/test"); See Also
Change Notification Preferences
View Online
|
View Change
|
Add Comment
|
- [CONF] Apache Camel > JCR confluence
- [CONF] Apache Camel > JCR confluence
- [CONF] Apache Camel > JCR confluence