You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2016/05/03 08:39:47 UTC

camel git commit: Added camel-juel docs to Gitbook

Repository: camel
Updated Branches:
  refs/heads/master 1d9d2637f -> 19ae13a4c


Added camel-juel docs to Gitbook


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/19ae13a4
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/19ae13a4
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/19ae13a4

Branch: refs/heads/master
Commit: 19ae13a4cd6a134828560dbf277c6c9a1b519ec4
Parents: 1d9d263
Author: Andrea Cosentino <an...@gmail.com>
Authored: Tue May 3 08:39:05 2016 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Tue May 3 08:39:17 2016 +0200

----------------------------------------------------------------------
 components/camel-juel/src/main/docs/juel.adoc | 93 ++++++++++++++++++++++
 docs/user-manual/en/SUMMARY.md                |  1 +
 2 files changed, 94 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/19ae13a4/components/camel-juel/src/main/docs/juel.adoc
----------------------------------------------------------------------
diff --git a/components/camel-juel/src/main/docs/juel.adoc b/components/camel-juel/src/main/docs/juel.adoc
new file mode 100644
index 0000000..e79b29f
--- /dev/null
+++ b/components/camel-juel/src/main/docs/juel.adoc
@@ -0,0 +1,93 @@
+[[EL-EL]]
+EL
+~~
+
+Camel supports the unified JSP and JSF Expression Language via the
+http://juel.sourceforge.net/[JUEL] to allow an
+link:expression.html[Expression] or link:predicate.html[Predicate] to be
+used in the link:dsl.html[DSL] or link:xml-configuration.html[Xml
+Configuration].
+
+For example you could use EL inside a link:message-filter.html[Message
+Filter] in XML
+
+[source,xml]
+---------------------------------------
+<route>
+  <from uri="seda:foo"/>
+  <filter>
+    <el>${in.headers.foo == 'bar'}</el>
+    <to uri="seda:bar"/>
+  </filter>
+</route>
+---------------------------------------
+
+You could also use slightly different syntax, e.g. if the header name is
+not a valid identifier:
+
+[source,xml]
+------------------------------------------------
+<route>
+  <from uri="seda:foo"/>
+  <filter>
+    <el>${in.headers['My Header'] == 'bar'}</el>
+    <to uri="seda:bar"/>
+  </filter>
+</route>
+------------------------------------------------
+
+You could use EL to create an link:predicate.html[Predicate] in a
+link:message-filter.html[Message Filter] or as an
+link:expression.html[Expression] for a
+link:recipient-list.html[Recipient List]
+
+[[EL-Variables]]
+Variables
+^^^^^^^^^
+
+[width="100%",cols="10%,10%,80%",options="header",]
+|=======================================================================
+|Variable |Type |Description
+
+|exchange |Exchange |the Exchange object
+
+|in |Message |the exchange.in message
+
+|out |Message |the exchange.out message
+|=======================================================================
+
+[[EL-Samples]]
+Samples
+^^^^^^^
+
+You can use EL dot notation to invoke operations. If you for instance
+have a body that contains a POJO that has a `getFamiliyName` method then
+you can construct the syntax as follows:
+
+[source,java]
+-----------------------
+"${in.body.familyName}"
+-----------------------
+
+[[EL-Dependencies]]
+Dependencies
+^^^^^^^^^^^^
+
+To use EL in your camel routes you need to add the a dependency on
+*camel-juel* which implements the EL language.
+
+If you use maven you could just add the following to your pom.xml,
+substituting the version number for the latest & greatest release (see
+link:download.html[the download page for the latest versions]).
+
+[source,java]
+-------------------------------------
+<dependency>
+  <groupId>org.apache.camel</groupId>
+  <artifactId>camel-juel</artifactId>
+  <version>x.x.x</version>
+</dependency>
+-------------------------------------
+
+Otherwise you'll also need to include
+http://repo2.maven.org/maven2/de/odysseus/juel/juel/2.1.3/juel-2.1.3.jar[JUEL].

http://git-wip-us.apache.org/repos/asf/camel/blob/19ae13a4/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index 7a7b8df..636cd25 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -195,6 +195,7 @@
 * [Expession Languages](languages.adoc)
     * [Bean Language](bean-language.adoc)
     * [Constant](constant.adoc)
+    * [EL](juel.adoc)
     * [Jsonpath](jsonpath.adoc)
     * [SQL](josql.adoc)