camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [4/6] camel git commit: Added simple-language docs to Gitbook
Date Fri, 09 Sep 2016 09:31:02 GMT
Added simple-language 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/04f58429
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/04f58429
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/04f58429

Branch: refs/heads/master
Commit: 04f584298a15b1d78d87b3d5ec272236c04058a0
Parents: caf15c0
Author: Andrea Cosentino <ancosen@gmail.com>
Authored: Fri Sep 9 10:31:17 2016 +0200
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Fri Sep 9 11:30:42 2016 +0200

----------------------------------------------------------------------
 camel-core/src/main/docs/simple-language.adoc | 1013 ++++++++++++++++++++
 components/readme.adoc                        |   48 +-
 docs/user-manual/en/SUMMARY.md                |   16 +-
 3 files changed, 1033 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/04f58429/camel-core/src/main/docs/simple-language.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/simple-language.adoc b/camel-core/src/main/docs/simple-language.adoc
new file mode 100644
index 0000000..3f549ff
--- /dev/null
+++ b/camel-core/src/main/docs/simple-language.adoc
@@ -0,0 +1,1013 @@
+[[Simple-SimpleExpressionLanguage]]
+Simple Expression Language
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The Simple Expression Language was a really simple language when it was
+created, but has since grown more powerful. It is primarily intended for
+being a really small and simple language for evaluating
+link:expression.html[Expression]s and link:predicate.html[Predicate]s
+without requiring any new dependencies or knowledge of
+link:xpath.html[XPath]; so it is ideal for testing in camel-core. The
+idea was to cover 95% of the common use cases when you need a little bit
+of expression based script in your Camel routes.
+
+However for much more complex use cases you are generally recommended to
+choose a more expressive and powerful language such as:
+
+* link:spel.html[SpEL]
+* link:mvel.html[Mvel]
+* link:groovy.html[Groovy]
+* link:javascript.html[JavaScript]
+* link:el.html[EL]
+* link:ognl.html[OGNL]
+* one of the supported link:scripting-languages.html[Scripting
+Languages]
+
+The simple language uses `${body`} placeholders for complex expressions
+where the expression contains constant literals. The $\{ } placeholders
+can be omitted if the expression is only the token itself.
+
+TIP:*Alternative syntax*
+
+From Camel 2.5 onwards you can also use the alternative syntax which
+uses $simple\{ } as placeholders. +
+ This can be used in situations to avoid clashes when using for example
+Spring property placeholder together with Camel.
+
+
+TIP:*Configuring result type*
+
+From Camel 2.8 onwards you can configure the result type of the
+link:simple.html[Simple] expression. For example to set the type as a
+`java.lang.Boolean` or a `java.lang.Integer` etc.
+
+INFO:*File language is now merged with Simple language*
+
+From Camel 2.2 onwards, the link:file-language.html[File Language] is
+now merged with link:simple.html[Simple] language which means you can
+use all the file syntax directly within the simple language.
+
+
+INFO:*Simple Language Changes in Camel 2.9 onwards*
+
+The link:simple.html[Simple] language have been improved from Camel 2.9
+onwards to use a better syntax parser, which can do index precise error
+messages, so you know exactly what is wrong and where the problem is.
+For example if you have made a typo in one of the operators, then
+previously the parser would not be able to detect this, and cause the
+evaluation to be true. There are a few changes in the syntax which are
+no longer backwards compatible. When using link:simple.html[Simple]
+language as a link:predicate.html[Predicate] then the literal text
+*must* be enclosed in either single or double quotes. For example:
+`"${body} == 'Camel'"`. Notice how we have single quotes around the
+literal. The old style of using `"body"` and `"header.foo"` to refer to
+the message body and header is @deprecated, and it is encouraged to
+always use $\{ } tokens for the built-in functions.
+The range operator now requires the range to be in single quote as well
+as shown: `"${header.zip} between '30000..39999'"`.
+
+To get the body of the in message: `"body"`, or `"in.body"` or
+`"${body}"`.
+
+A complex expression must use $\{ } placeholders, such as:
+`"Hello ${in.header.name} how are you?"`.
+
+You can have multiple functions in the same expression:
+`"Hello ${in.header.name} this is ${in.header.me} speaking"`. +
+ However you can *not* nest functions in Camel 2.8.x or older (i.e.
+having another $\{ } placeholder in an existing, is not allowed). +
+ From *Camel 2.9* onwards you can nest functions.
+
+[[SimpleLanguage-Options]]
+Simple Language options
+^^^^^^^^^^^^^^^^^^^^^^^
+
+// language options: START
+The Simple language supports 2 options which are listed below.
+
+
+
+{% raw %}
+[width="100%",cols="2,1m,1m,6",options="header"]
+|=======================================================================
+| Name | Default | Java Type | Description
+| resultType |  | String | Sets the class name of the result type (type from output)
+| trim | true | Boolean | Whether to trim the value to remove leading and trailing whitespaces
and line breaks
+|=======================================================================
+{% endraw %}
+// language options: END
+
+[[Simple-Variables]]
+Variables
+^^^^^^^^^
+
+[width="100%",cols="10%,10%,80%",options="header",]
+|=======================================================================
+|Variable |Type |Description
+
+|camelId |String |*Camel 2.10:* the link:camelcontext.html[CamelContext] name
+
+|camelContext.*OGNL* |Object |*Camel 2.11:* the CamelContext invoked using a Camel OGNL expression.
+
+|exchange |Exchange |*Camel 2.16:* the link:exchange.html[Exchange]
+
+|exchange.*OGNL* |Object |*Camel 2.16:* the link:exchange.html[Exchange] invoked using a
Camel
+OGNL expression.
+
+|exchangeId |String |*Camel 2.3:* the exchange id
+
+|id |String |the input message id
+
+|body |Object |the input body
+
+|in.body |Object |the input body
+
+|body.*OGNL* |Object |*Camel 2.3:* the input body invoked using a Camel OGNL expression.
+
+|in.body.*OGNL* |Object |*Camel 2.3:* the input body invoked using a Camel OGNL expression.
+
+|bodyAs(_type_) |Type |*Camel 2.3:* Converts the body to the given type determined by its
+classname. The converted body can be null.
+
+|bodyAs(_type_).*OGNL* |Object |*Camel 2.18:* Converts the body to the given type determined
by its
+classname and then invoke methods using a Camel OGNL expression. The
+converted body can be null.
+
+|mandatoryBodyAs(_type_) |Type |*Camel 2.5:* Converts the body to the given type determined
by its
+classname, and expects the body to be not null.
+
+|mandatoryBodyAs(_type_).*OGNL* |Object |*Camel 2.18:* Converts the body to the given type
determined by its
+classname and then invoke methods using a Camel OGNL expression.
+
+|out.body |Object |the output body
+
+|header.foo |Object |refer to the input foo header
+
+|header[foo] |Object |*Camel 2.9.2:* refer to the input foo header
+
+|headers.foo |Object |refer to the input foo header
+
+|headers[foo] |Object |*Camel 2.9.2:* refer to the input foo header
+
+|in.header.foo |Object |refer to the input foo header
+
+|in.header[foo] |Object |*Camel 2.9.2:* refer to the input foo header
+
+|in.headers.foo |Object |refer to the input foo header
+
+|in.headers[foo] |Object |*Camel 2.9.2:* refer to the input foo header
+
+|header.foo[bar] |Object |*Camel 2.3:* regard input foo header as a map and perform lookup
on the
+map with bar as key
+
+|in.header.foo[bar] |Object |*Camel 2.3:* regard input foo header as a map and perform lookup
on the
+map with bar as key
+
+|in.headers.foo[bar] |Object |*Camel 2.3:* regard input foo header as a map and perform lookup
on the
+map with bar as key
+
+|header.foo.*OGNL* |Object |*Camel 2.3:* refer to the input foo header and invoke its value
using a
+Camel OGNL expression.
+
+|in.header.foo.*OGNL* |Object |*Camel 2.3:* refer to the input foo header and invoke its
value using a
+Camel OGNL expression.
+
+|in.headers.foo.*OGNL* |Object |*Camel 2.3:* refer to the input foo header and invoke its
value using a
+Camel OGNL expression.
+
+|out.header.foo |Object |refer to the out header foo
+
+|out.header[foo] |Object |*Camel 2.9.2:* refer to the out header foo
+
+|out.headers.foo |Object |refer to the out header foo
+
+|out.headers[foo] |Object |*Camel 2.9.2:* refer to the out header foo
+
+|headerAs(_key_,_type_) |Type |*Camel 2.5:* Converts the header to the given type determined
by its
+classname
+
+|headers |Map |*Camel 2.9:* refer to the input headers
+
+|in.headers |Map |*Camel 2.9:* refer to the input headers
+
+|property.foo |Object |*Deprecated:* refer to the foo property on the exchange
+
+|exchangeProperty.foo |Object |*Camel 2.15:* refer to the foo property on the exchange
+
+|property[foo] |Object |*Deprecated:* refer to the foo property on the exchange
+
+|exchangeProperty[foo] |Object |*Camel 2.15:* refer to the foo property on the exchange
+
+|property.foo.*OGNL* |Object |*Deprecated:* refer to the foo property on the exchange and
invoke its
+value using a Camel OGNL expression.
+
+|exchangeProperty.foo.*OGNL* |Object |*Camel 2.15:* refer to the foo property on the exchange
and invoke its
+value using a Camel OGNL expression.
+
+|sys.foo |String |refer to the system property
+
+|sysenv.foo |String |*Camel 2.3:* refer to the system environment
+
+|exception |Object |*Camel 2.4:* Refer to the exception object on the exchange, is *null*
if
+no exception set on exchange. Will fallback and grab caught exceptions
+(`Exchange.EXCEPTION_CAUGHT`) if the Exchange has any.
+
+|exception.*OGNL* |Object |*Camel 2.4:* Refer to the exchange exception invoked using a Camel
OGNL
+expression object
+
+|exception.message |String |Refer to the exception.message on the exchange, is *null* if
no
+exception set on exchange. Will fallback and grab caught exceptions
+(`Exchange.EXCEPTION_CAUGHT`) if the Exchange has any.
+
+|exception.stacktrace |String |*Camel 2.6.* Refer to the exception.stracktrace on the exchange,
is
+*null* if no exception set on exchange. Will fallback and grab caught
+exceptions (`Exchange.EXCEPTION_CAUGHT`) if the Exchange has any.
+
+|date:_command:pattern_ |String |Date formatting using the `java.text.SimpleDataFormat` patterns.
+Supported commands are: *now* for current timestamp, *in.header.xxx* or
+*header.xxx* to use the Date object in the IN header with the key xxx.
+*out.header.xxx* to use the Date object in the OUT header with the key
+xxx.
+
+|bean:_bean expression_ |Object |Invoking a bean expression using the link:bean.html[Bean]
language.
+Specifying a method name you must use dot as separator. We also support
+the ?method=methodname syntax that is used by the link:bean.html[Bean]
+component.
+
+|properties:_locations:key_ |String |*Deprecated (use properties-location instead) Camel
2.3:* Lookup a
+property with the given key. The `locations` option is optional. See
+more at link:using-propertyplaceholder.html[Using PropertyPlaceholder].
+
+|properties-location:_http://locationskey[locations:key]_ |String |*Camel 2.14.1:* Lookup
a property with the given key. The `locations`
+option is optional. See more at
+link:using-propertyplaceholder.html[Using PropertyPlaceholder].
+
+|properties:key:default |String |*Camel 2.14.1*: Lookup a property with the given key. If
the key does
+not exists or has no value, then an optional default value can be
+specified.
+
+|routeId |String |*Camel 2.11:* Returns the id of the current route the
+link:exchange.html[Exchange] is being routed.
+
+|threadName |String |*Camel 2.3:* Returns the name of the current thread. Can be used for
+logging purpose.
+
+|ref:xxx |Object |*Camel 2.6:* To lookup a bean from the link:registry.html[Registry] with
+the given id.
+
+|type:name.field |Object |*Camel 2.11:* To refer to a type or field by its FQN name. To refer
to a
+field you can append .FIELD_NAME. For example you can refer to the
+constant field from Exchange as: `org.apache.camel.Exchange.FILE_NAME`
+
+|null |null |*Camel 2.12.3:* represents a *null*
+
+|random_(value)_ |Integer |*Camel 2.16.0:*returns a random Integer between 0 (included) and
_value_
+(excluded)
+
+|random_(min,max)_ |Integer |*Camel 2.16.0:*returns a random Integer between _min_ (included)
and
+_max_ (excluded)
+
+|collate(group) |List |*Camel 2.17:* The collate function iterates the message body and groups
+the data into sub lists of specified size. This can be used with the
+link:splitter.html[Splitter] EIP to split a message body and group/batch
+the splitted sub message into a group of N sub lists. This method works
+similar to the collate method in Groovy.
+
+|messageHistory |String |*Camel 2.17:* The message history of the current exchange how it
has
+been routed. This is similar to the route stack-trace message history
+the error handler logs in case of an unhandled exception.
+
+|messageHistory(false) |String |*Camel 2.17:* As messageHistory but without the exchange
details (only
+includes the route strack-trace). This can be used if you do not want to
+log sensitive data from the message itself.
+|=======================================================================
+
+[[Simple-OGNLexpressionsupport]]
+OGNL expression support
+^^^^^^^^^^^^^^^^^^^^^^^
+
+*Available as of Camel 2.3*
+
+INFO:Camel's OGNL support is for invoking methods only. You cannot access
+fields. From *Camel 2.11.1* onwards we added special support for accessing the
+length field of Java arrays.
+
+
+The link:simple.html[Simple] and link:bean.html[Bean] language now
+supports a Camel OGNL notation for invoking beans in a chain like
+fashion. Suppose the Message IN body contains a POJO which has a `getAddress()`
+method.
+
+Then you can use Camel OGNL notation to access the address object:
+
+[source,java]
+--------------------------------
+simple("${body.address}")
+simple("${body.address.street}")
+simple("${body.address.zip}")
+--------------------------------
+
+Camel understands the shorthand names for getters, but you can invoke
+any method or use the real name such as:
+
+[source,java]
+--------------------------------------
+simple("${body.address}")
+simple("${body.getAddress.getStreet}")
+simple("${body.address.getZip}")
+simple("${body.doSomething}")
+--------------------------------------
+
+You can also use the null safe operator (`?.`) to avoid NPE if for
+example the body does NOT have an address
+
+[source,java]
+----------------------------------
+simple("${body?.address?.street}")
+----------------------------------
+
+It is also possible to index in `Map` or `List` types, so you can do:
+
+[source,java]
+---------------------------
+simple("${body[foo].name}")
+---------------------------
+
+To assume the body is `Map` based and lookup the value with `foo` as
+key, and invoke the `getName` method on that value.
+
+If the key has space, then you *must* enclose the key with quotes, for
+example 'foo bar':
+
+[source,java]
+---------------------------------
+simple("${body['foo bar'].name}")
+---------------------------------
+
+You can access the `Map` or `List` objects directly using their key name
+(with or without dots) :
+
+[source,java]
+------------------------------
+simple("${body[foo]}")
+simple("${body[this.is.foo]}")
+------------------------------
+
+Suppose there was no value with the key `foo` then you can use the null
+safe operator to avoid the NPE as shown:
+
+[source,java]
+----------------------------
+simple("${body[foo]?.name}")
+----------------------------
+
+You can also access `List` types, for example to get lines from the
+address you can do:
+
+[source,java]
+----------------------------------
+simple("${body.address.lines[0]}")
+simple("${body.address.lines[1]}")
+simple("${body.address.lines[2]}")
+----------------------------------
+
+There is a special `last` keyword which can be used to get the last
+value from a list.
+
+[source,java]
+-------------------------------------
+simple("${body.address.lines[last]}")
+-------------------------------------
+
+And to get the 2nd last you can subtract a number, so we can use
+`last-1` to indicate this:
+
+[source,java]
+---------------------------------------
+simple("${body.address.lines[last-1]}")
+---------------------------------------
+
+And the 3rd last is of course:
+
+[source,java]
+---------------------------------------
+simple("${body.address.lines[last-2]}")
+---------------------------------------
+
+And you can call the size method on the list with
+
+[source,java]
+------------------------------------
+simple("${body.address.lines.size}")
+------------------------------------
+
+From *Camel 2.11.1* onwards we added support for the length field for
+Java arrays as well, eg:
+
+[source,java]
+---------------------------------------------------
+String[] lines = new String[]{"foo", "bar", "cat"};
+exchange.getIn().setBody(lines);
+
+simple("There are ${body.length} lines")
+---------------------------------------------------
+
+And yes you can combine this with the operator support as shown below:
+
+[source,java]
+------------------------------------
+simple("${body.address.zip} > 1000")
+------------------------------------
+
+[[Simple-Operatorsupport]]
+Operator support
+^^^^^^^^^^^^^^^^
+
+The parser is limited to only support a single operator.
+
+To enable it the left value must be enclosed in $\{ }. The syntax is:
+
+[source,java]
+--------------------------
+${leftValue} OP rightValue
+--------------------------
+
+Where the `rightValue` can be a String literal enclosed in `' '`,
+`null`, a constant value or another expression enclosed in $\{ }.
+
+INFO:*Important*
+
+There *must* be spaces around the operator.
+
+
+Camel will automatically type convert the rightValue type to the
+leftValue type, so it is able to eg. convert a string into a numeric so
+you can use > comparison for numeric values.
+
+The following operators are supported:
+
+[width="100%",cols="50%,50%",options="header",]
+{% raw %}
+|=======================================================================
+|Operator |Description
+
+|== |equals
+
+|=~ |*Camel 2.16:* equals ignore case (will ignore case when comparing String
+values)
+
+|> |greater than
+
+|>= |greater than or equals
+
+|< |less than
+
+|<= |less than or equals
+
+|!= |not equals
+
+|contains |For testing if contains in a string based value
+
+|not contains |For testing if not contains in a string based value
+
+|regex |For matching against a given regular expression pattern defined as a
+String value
+
+|not regex |For not matching against a given regular expression pattern defined as a
+String value
+
+|in |For matching if in a set of values, each element must be separated by
+comma.
+
+|not in |For matching if not in a set of values, each element must be separated
+by comma.
+
+|is |For matching if the left hand side type is an instanceof the value.
+
+|not is |For matching if the left hand side type is not an instanceof the value.
+
+|range |For matching if the left hand side is within a range of values defined
+as numbers: `from..to`. From *Camel 2.9* onwards the range values must
+be enclosed in single quotes.
+
+|not range |For matching if the left hand side is not within a range of values
+defined as numbers: `from..to`. From *Camel 2.9* onwards the range
+values must be enclosed in single quotes.
+
+|starts with |*Camel 2.17.1, 2.18*: For testing if the left hand side string starts
+with the right hand string.
+
+|ends with |*Camel 2.17.1, 2.18*: For testing if the left hand side string ends with
+the right hand string.
+{% endraw %}
+|=======================================================================
+
+And the following unary operators can be used:
+
+[width="100%",cols="50%,50%",options="header",]
+{% raw %}
+|=======================================================================
+|Operator |Description
+
+|++ |*Camel 2.9:* To increment a number by one. The left hand side must be a
+function, otherwise parsed as literal.
+
+|-- |*Camel 2.9:* To decrement a number by one. The left hand side must be a
+function, otherwise parsed as literal.
+
+|\ |*Camel 2.9.3 to 2.10.x* To escape a value, eg \$, to indicate a $ sign.
+Special: Use \n for new line, \t for tab, and \r for carriage return.
+*Notice:* Escaping is *not* supported using the
+link:file-language.html[File Language]. *Notice:* From Camel 2.11
+onwards the escape character is no longer support, but replaced with the
+following three special escaping.
+
+|\n |*Camel 2.11:* To use newline character.
+
+|\t |*Camel 2.11:* To use tab character.
+
+|\r |*Camel 2.11:* To use carriage return character.
+
+|\} |*Camel 2.18:* To use the } character as text
+{% endraw %}
+|=======================================================================
+
+And the following logical operators can be used to group expressions:
+
+[width="100%",cols="50%,50%",options="header",]
+{% raw %}
+|=======================================================================
+|Operator |Description
+
+|and |*deprecated* use && instead. The logical and operator is used to group
+two expressions.
+
+|or |*deprecated* use \|\| instead. The logical or operator is used to group
+two expressions.
+
+|&& |*Camel 2.9:* The logical and operator is used to group two expressions.
+
+| \|\| |*Camel 2.9:* The logical or operator is used to group two expressions.
+{% endraw %}
+|=======================================================================
+
+INFO:*Using and,or operators*
+
+In *Camel 2.4 or older* the `and` or `or` can only be used *once* in a
+simple language expression. From *Camel 2.5* onwards you can use these
+operators multiple times.
+
+The syntax for AND is:
+
+[source,java]
+----------------------------------------------------------
+${leftValue} OP rightValue and ${leftValue} OP rightValue 
+----------------------------------------------------------
+
+And the syntax for OR is:
+
+[source,java]
+---------------------------------------------------------
+${leftValue} OP rightValue or ${leftValue} OP rightValue 
+---------------------------------------------------------
+
+Some examples:
+
+[source,java]
+---------------------------------------------------------------------------------------------------------------------------------------
+// exact equals match
+simple("${in.header.foo} == 'foo'")
+ 
+// ignore case when comparing, so if the header has value FOO this will match
+simple("${in.header.foo} =~ 'foo'")
+
+// here Camel will type convert '100' into the type of in.header.bar and if it is an Integer
'100' will also be converter to an Integer
+simple("${in.header.bar} == '100'")
+
+simple("${in.header.bar} == 100")
+
+// 100 will be converter to the type of in.header.bar so we can do > comparison
+simple("${in.header.bar} > 100")
+---------------------------------------------------------------------------------------------------------------------------------------
+
+*Comparing with different types*
+
+When you compare with different types such as String and int, then you
+have to take a bit care. Camel will use the type from the left hand side
+as 1st priority. And fallback to the right hand side type if both values
+couldn't be compared based on that type. +
+ This means you can flip the values to enforce a specific type. Suppose
+the bar value above is a String. Then you can flip the equation:
+
+[source,java]
+--------------------------------
+simple("100 < ${in.header.bar}")
+--------------------------------
+
+which then ensures the int type is used as 1st priority.
+
+This may change in the future if the Camel team improves the binary
+comparison operations to prefer numeric types over String based. It's
+most often the String type which causes problem when comparing with
+numbers.
+
+[source,java]
+----------------------------------
+// testing for null
+simple("${in.header.baz} == null")
+
+// testing for not null
+simple("${in.header.baz} != null")
+----------------------------------
+
+And a bit more advanced example where the right value is another
+expression
+
+[source,java]
+-----------------------------------------------------------------------
+simple("${in.header.date} == ${date:now:yyyyMMdd}")
+
+simple("${in.header.type} == ${bean:orderService?method=getOrderType}")
+-----------------------------------------------------------------------
+
+And an example with contains, testing if the title contains the word
+Camel
+
+[source,java]
+---------------------------------------------
+simple("${in.header.title} contains 'Camel'")
+---------------------------------------------
+
+And an example with regex, testing if the number header is a 4 digit
+value:
+
+[source,java]
+--------------------------------------------
+simple("${in.header.number} regex '\\d{4}'")
+--------------------------------------------
+
+And finally an example if the header equals any of the values in the
+list. Each element must be separated by comma, and no space around. +
+ This also works for numbers etc, as Camel will convert each element
+into the type of the left hand side.
+
+[source,java]
+--------------------------------------------
+simple("${in.header.type} in 'gold,silver'")
+--------------------------------------------
+
+And for all the last 3 we also support the negate test using not:
+
+[source,java]
+------------------------------------------------
+simple("${in.header.type} not in 'gold,silver'")
+------------------------------------------------
+
+And you can test if the type is a certain instance, eg for instance a
+String
+
+[source,java]
+-------------------------------------------------
+simple("${in.header.type} is 'java.lang.String'")
+-------------------------------------------------
+
+We have added a shorthand for all `java.lang` types so you can write it
+as:
+
+[source,java]
+---------------------------------------
+simple("${in.header.type} is 'String'")
+---------------------------------------
+
+Ranges are also supported. The range interval requires numbers and both
+from and end are inclusive. For instance to test whether a value is
+between 100 and 199:
+
+[source,java]
+--------------------------------------------
+simple("${in.header.number} range 100..199")
+--------------------------------------------
+
+Notice we use `..` in the range without spaces. It is based on the same
+syntax as Groovy.
+
+From *Camel 2.9* onwards the range value must be in single quotes
+
+[source,java]
+----------------------------------------------
+simple("${in.header.number} range '100..199'")
+----------------------------------------------
+
+*Can be used in Spring XML*
+
+As the Spring XML does not have all the power as the Java DSL with all
+its various builder methods, you have to resort to use some other
+languages +
+ for testing with simple operators. Now you can do this with the simple
+language. In the sample below we want to test if the header is a widget
+order:
+
+[source,xml]
+------------------------------------------------------------
+    <from uri="seda:orders">
+       <filter>
+           <simple>${in.header.type} == 'widget'</simple>
+           <to uri="bean:orderService?method=handleWidget"/>
+       </filter>
+    </from>
+------------------------------------------------------------
+
+[[Simple-Usingandor]]
+Using and / or
+++++++++++++++
+
+If you have two expressions you can combine them with the `and` or `or`
+operator.
+
+TIP:*Camel 2.9 onwards*
+
+Use && or || from Camel 2.9 onwards.
+
+For instance:
+
+[source,java]
+------------------------------------------------------------------------------
+simple("${in.header.title} contains 'Camel' and ${in.header.type'} == 'gold'")
+------------------------------------------------------------------------------
+
+And of course the `or` is also supported. The sample would be:
+
+[source,java]
+-----------------------------------------------------------------------------
+simple("${in.header.title} contains 'Camel' or ${in.header.type'} == 'gold'")
+-----------------------------------------------------------------------------
+
+*Notice:* Currently `and` or `or` can only be used *once* in a simple
+language expression. This might change in the future. +
+ So you *cannot* do:
+
+[source,java]
+---------------------------------------------------------------------------------------------------------------------
+simple("${in.header.title} contains 'Camel' and ${in.header.type'} == 'gold' and ${in.header.number}
range 100..200")
+---------------------------------------------------------------------------------------------------------------------
+
+[[Simple-Samples]]
+Samples
+^^^^^^^
+
+In the Spring XML sample below we filter based on a header value:
+
+[source,xml]
+--------------------------------------------
+    <from uri="seda:orders">
+       <filter>
+           <simple>${in.header.foo}</simple>
+           <to uri="mock:fooOrders"/>
+       </filter>
+    </from>
+--------------------------------------------
+
+The Simple language can be used for the predicate test above in the
+link:message-filter.html[Message Filter] pattern, where we test if the
+in message has a `foo` header (a header with the key `foo` exists). If
+the expression evaluates to *true* then the message is routed to the
+`mock:fooOrders` endpoint, otherwise it is lost in the deep blue sea
+image:https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/wink.png[(wink)].
+
+The same example in Java DSL:
+
+[source,java]
+------------------------------------------------------------------
+    from("seda:orders")
+        .filter().simple("${in.header.foo}").to("seda:fooOrders");
+------------------------------------------------------------------
+
+You can also use the simple language for simple text concatenations such
+as:
+
+[source,java]
+----------------------------------------------------------------------------------------------------
+   from("direct:hello").transform().simple("Hello ${in.header.user} how are you?").to("mock:reply");
+----------------------------------------------------------------------------------------------------
+
+Notice that we must use $\{ } placeholders in the expression now to
+allow Camel to parse it correctly.
+
+And this sample uses the date command to output current date.
+
+[source,java]
+------------------------------------------------------------------------------------------------------------------------
+   from("direct:hello").transform().simple("The today is ${date:now:yyyyMMdd} and it is a
great day.").to("mock:reply");
+------------------------------------------------------------------------------------------------------------------------
+
+And in the sample below we invoke the bean language to invoke a method
+on a bean to be included in the returned string:
+
+[source,java]
+-------------------------------------------------------------------------------------------------
+   from("direct:order").transform().simple("OrderId: ${bean:orderIdGenerator}").to("mock:reply");
+-------------------------------------------------------------------------------------------------
+
+Where `orderIdGenerator` is the id of the bean registered in the
+link:registry.html[Registry]. If using Spring then it is the Spring bean
+id.
+
+If we want to declare which method to invoke on the order id generator
+bean we must prepend `.method name` such as below where we invoke the
+`generateId` method.
+
+[source,java]
+------------------------------------------------------------------------------------------------------------
+   from("direct:order").transform().simple("OrderId: ${bean:orderIdGenerator.generateId}").to("mock:reply");
+------------------------------------------------------------------------------------------------------------
+
+We can use the `?method=methodname` option that we are familiar with the
+link:bean.html[Bean] component itself:
+
+[source,java]
+-------------------------------------------------------------------------------------------------------------------
+   from("direct:order").transform().simple("OrderId: ${bean:orderIdGenerator?method=generateId}").to("mock:reply");
+-------------------------------------------------------------------------------------------------------------------
+
+And from Camel 2.3 onwards you can also convert the body to a given
+type, for example to ensure that it is a String you can do:
+
+[source,xml]
+---------------------------------------------------------
+  <transform>
+    <simple>Hello ${bodyAs(String)} how are you?</simple>
+  </transform>
+---------------------------------------------------------
+
+There are a few types which have a shorthand notation, so we can use
+`String` instead of `java.lang.String`. These are:
+`byte[], String, Integer, Long`. All other types must use their FQN
+name, e.g. `org.w3c.dom.Document`.
+
+It is also possible to lookup a value from a header `Map` in *Camel 2.3*
+onwards:
+
+[source,xml]
+-----------------------------------------------------------
+  <transform>
+    <simple>The gold value is ${header.type[gold]}</simple>
+  </transform>
+-----------------------------------------------------------
+
+In the code above we lookup the header with name `type` and regard it as
+a `java.util.Map` and we then lookup with the key `gold` and return the
+value. If the header is not convertible to Map an exception is thrown. If the
+header with name `type` does not exist `null` is returned.
+
+From Camel 2.9 onwards you can nest functions, such as shown below:
+
+[source,xml]
+--------------------------------------------------
+<setHeader headerName="myHeader">
+  <simple>${properties:${header.someKey}}</simple>
+</setHeader>
+--------------------------------------------------
+
+[[Simple-Referringtoconstantsorenums]]
+Referring to constants or enums
++++++++++++++++++++++++++++++++
+
+*Available as of Camel 2.11*
+
+Suppose you have an enum for customers
+
+And in a link:content-based-router.html[Content Based Router] we can use
+the link:simple.html[Simple] language to refer to this enum, to check
+the message which enum it matches.
+
+[[Simple-UsingnewlinesortabsinXMLDSLs]]
+Using new lines or tabs in XML DSLs
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+*Available as of Camel 2.9.3*
+
+From Camel 2.9.3 onwards it is easier to specify new lines or tabs in
+XML DSLs as you can escape the value now
+
+[source,xml]
+-------------------------------------------------------
+<transform>
+  <simple>The following text\nis on a new line</simple>
+</transform>
+-------------------------------------------------------
+
+[[Simple-Leadingandtrailingwhitespacehandling]]
+Leading and trailing whitespace handling
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+*Available as of Camel 2.10.0*
+
+From Camel 2.10.0 onwards, the trim attribute of the expression can be
+used to control whether the leading and trailing whitespace characters
+are removed or preserved. The default value is true, which removes the
+whitespace characters.
+
+[source,xml]
+---------------------------------------------------------------------------------
+<setBody>
+  <simple trim="false">You get some trailing whitespace characters.     </simple>
+</setBody>
+---------------------------------------------------------------------------------
+
+[[Simple-Settingresulttype]]
+Setting result type
+^^^^^^^^^^^^^^^^^^^
+
+*Available as of Camel 2.8*
+
+You can now provide a result type to the link:simple.html[Simple]
+expression, which means the result of the evaluation will be converted
+to the desired type. This is most useable to define types such as
+booleans, integers, etc.
+
+For example to set a header as a boolean type you can do:
+
+[source,java]
+-------------------------------------------------
+.setHeader("cool", simple("true", Boolean.class))
+-------------------------------------------------
+
+And in XML DSL
+
+[source,xml]
+---------------------------------------------------------------------------------------
+      <setHeader headerName="cool">
+        <!-- use resultType to indicate that the type should be a java.lang.Boolean -->
+        <simple resultType="java.lang.Boolean">true</simple>
+      </setHeader>
+---------------------------------------------------------------------------------------
+
+[[Simple-Changingfunctionstartandendtokens]]
+Changing function start and end tokens
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+*Available as of Camel 2.9.1*
+
+You can configure the function start and end tokens - $\{ } using the
+setters `changeFunctionStartToken` and `changeFunctionEndToken` on
+`SimpleLanguage`, using Java code. From Spring XML you can define a
+<bean> tag with the new changed tokens in the properties as shown below:
+
+[source,xml]
+------------------------------------------------------------------------------
+    <!-- configure Simple to use custom prefix/suffix tokens -->
+    <bean id="simple" class="org.apache.camel.language.simple.SimpleLanguage">
+      <property name="functionStartToken" value="["/>
+      <property name="functionEndToken" value="]"/>
+    </bean>
+------------------------------------------------------------------------------
+
+In the example above we use [ ] as the changed tokens.
+
+Notice by changing the start/end token you change those in all the Camel
+applications which share the same *camel-core* on their classpath. +
+ For example in an OSGi server this may affect many applications, where
+as a Web Application as a WAR file it only affects the Web Application.
+
+[[Simple-Loadingscriptfromexternalresource]]
+Loading script from external resource
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+*Available as of Camel 2.11*
+
+You can externalize the script and have Camel load it from a resource
+such as `"classpath:"`, `"file:"`, or `"http:"`. +
+ This is done using the following syntax: `"resource:scheme:location"`,
+eg to refer to a file on the classpath you can do:
+
+[source,java]
+----------------------------------------------------------------
+.setHeader("myHeader").simple("resource:classpath:mysimple.txt")
+----------------------------------------------------------------
+
+[[Simple-SettingSpringbeanstoExchangeproperties]]
+Setting Spring beans to Exchange properties
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+*Available as of Camel 2.6*
+
+You can set a spring bean into an exchange property as shown below:
+
+[source,xml]
+-------------------------------------------------------
+<bean id="myBeanId" class="my.package.MyCustomClass" />
+...
+<route>
+  ...
+  <setProperty propertyName="monitoring.message">
+    <simple>ref:myBeanId</simple>
+  </setProperty>
+  ...
+</route>
+-------------------------------------------------------
+
+[[Simple-Dependencies]]
+Dependencies
+^^^^^^^^^^^^
+
+The link:simple.html[Simple] language is part of *camel-core*.

http://git-wip-us.apache.org/repos/asf/camel/blob/04f58429/components/readme.adoc
----------------------------------------------------------------------
diff --git a/components/readme.adoc b/components/readme.adoc
index 6b5ec75..672ba62 100644
--- a/components/readme.adoc
+++ b/components/readme.adoc
@@ -36,39 +36,6 @@ Components
 | link:camel-avro/src/main/docs/avro-component.adoc[Avro] (camel-avro) +
 `avro:transport:host:port/messageName` | Working with Apache Avro for data serialization.
 
-| link:camel-aws/src/main/docs/aws-cw-component.adoc[AWS CloudWatch] (camel-aws) +
-`aws-cw:namespace` | The aws-cw component is used for sending metrics to an Amazon CloudWatch.
-
-| link:camel-aws/src/main/docs/aws-ddb-component.adoc[AWS DynamoDB] (camel-aws) +
-`aws-ddb:tableName` | The aws-ddb component is used for storing and retrieving data from
Amazon's DynamoDB service.
-
-| link:camel-aws/src/main/docs/aws-ddbstream-component.adoc[AWS DynamoDB Streams] (camel-aws)
+
-`aws-ddbstream:tableName` | The aws-ddbstream component is used for working with Amazon DynamoDB
Streams.
-
-| link:camel-aws/src/main/docs/aws-ec2-component.adoc[AWS EC2] (camel-aws) +
-`aws-ec2:label` | The aws-ec2 is used for managing Amazon EC2 instances.
-
-| link:camel-aws/src/main/docs/aws-kinesis-component.adoc[AWS Kinesis] (camel-aws) +
-`aws-kinesis:streamName` | The aws-kinesis component is for consuming records from Amazon
Kinesis Streams.
-
-| link:camel-aws/src/main/docs/aws-s3-component.adoc[AWS S3 Storage Service] (camel-aws)
+
-`aws-s3:bucketNameOrArn` | The aws-s3 component is used for storing and retrieving objecct
from Amazon S3 Storage Service.
-
-| link:camel-aws/src/main/docs/aws-ses-component.adoc[AWS Simple Email Service] (camel-aws)
+
-`aws-ses:from` | The aws-ses component is used for sending emails with Amazon's SES service.
-
-| link:camel-aws/src/main/docs/aws-sns-component.adoc[AWS Simple Notification System] (camel-aws)
+
-`aws-sns:topicNameOrArn` | The aws-sns component is used for sending messages to an Amazon
Simple Notification Topic.
-
-| link:camel-aws/src/main/docs/aws-sqs-component.adoc[AWS Simple Queue Service] (camel-aws)
+
-`aws-sqs:queueNameOrArn` | The aws-sqs component is used for sending and receiving messages
to Amazon's SQS service.
-
-| link:camel-aws/src/main/docs/aws-swf-component.adoc[AWS Simple Workflow] (camel-aws) +
-`aws-swf:type` | The aws-swf component is used for managing workflows from Amazon Simple
Workflow.
-
-| link:camel-aws/src/main/docs/aws-sdb-component.adoc[AWS SimpleDB] (camel-aws) +
-`aws-sdb:domainName` | The aws-sdb component is for storing and retrieving data from/to Amazon's
SDB service.
-
 | link:camel-bean-validator/src/main/docs/bean-validator-component.adoc[Bean Validator] (camel-bean-validator)
+
 `bean-validator:label` | The Validator component performs bean validation of the message
body using the Java Bean Validation API.
 
@@ -192,9 +159,24 @@ Components
 | link:camel-google-drive/src/main/docs/google-drive-component.adoc[Google Drive] (camel-google-drive)
+
 `google-drive:apiName/methodName` | The google-drive component provides access to Google
Drive file storage service.
 
+| link:camel-gae/src/main/docs/gauth-component.adoc[Google GAuth] (camel-gae) +
+`gauth:name` | The gauth component is used by web applications to implement a Google-specific
OAuth consumer.
+
+| link:camel-gae/src/main/docs/ghttp-component.adoc[Google HTTP] (camel-gae) +
+`ghttp:httpUri` | The ghttp component provides HTTP connectivity to the GAE.
+
+| link:camel-gae/src/main/docs/glogin-component.adoc[Google Login] (camel-gae) +
+`glogin:hostName` | The glogin component is used by Camel applications outside Google App
Engine (GAE) for programmatic login to GAE applications.
+
+| link:camel-gae/src/main/docs/gmail-component.adoc[Google mail] (camel-gae) +
+`gmail:sender` | The gmail component is used for sending emails to GAE.
+
 | link:camel-google-mail/src/main/docs/google-mail-component.adoc[Google Mail] (camel-google-mail)
+
 `google-mail:apiName/methodName` | The google-mail component provides access to Google Mail.
 
+| link:camel-gae/src/main/docs/gtask-component.adoc[Google Task] (camel-gae) +
+`gtask:queueName` | The gtask component is used for sending messages to GAE task queue service.
+
 | link:camel-gora/src/main/docs/gora-component.adoc[Gora] (camel-gora) +
 `gora:name` | The gora component allows you to work with NoSQL databases using the Apache
Gora framework.
 

http://git-wip-us.apache.org/repos/asf/camel/blob/04f58429/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index b3eda45..bba9400 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -134,17 +134,6 @@
 	* [Atmosphere Websocket](atmosphere-websocket-component.adoc)
 	* [Atom](atom-component.adoc)
 	* [Avro](avro-component.adoc)
-	* [AWS CloudWatch](aws-cw-component.adoc)
-	* [AWS DynamoDB](aws-ddb-component.adoc)
-	* [AWS DynamoDB Streams](aws-ddbstream-component.adoc)
-	* [AWS EC2](aws-ec2-component.adoc)
-	* [AWS Kinesis](aws-kinesis-component.adoc)
-	* [AWS S3 Storage Service](aws-s3-component.adoc)
-	* [AWS Simple Email Service](aws-ses-component.adoc)
-	* [AWS Simple Notification System](aws-sns-component.adoc)
-	* [AWS Simple Queue Service](aws-sqs-component.adoc)
-	* [AWS Simple Workflow](aws-swf-component.adoc)
-	* [AWS SimpleDB](aws-sdb-component.adoc)
 	* [Bean Validator](bean-validator-component.adoc)
 	* [Beanstalk](beanstalk-component.adoc)
 	* [Box](box-component.adoc)
@@ -186,7 +175,12 @@
 	* [GitHub](github-component.adoc)
 	* [Google Calendar](google-calendar-component.adoc)
 	* [Google Drive](google-drive-component.adoc)
+	* [Google GAuth](gauth-component.adoc)
+	* [Google HTTP](ghttp-component.adoc)
+	* [Google Login](glogin-component.adoc)
+	* [Google mail](gmail-component.adoc)
 	* [Google Mail](google-mail-component.adoc)
+	* [Google Task](gtask-component.adoc)
 	* [Gora](gora-component.adoc)
 	* [Grape](grape-component.adoc)
 	* [Guava EventBus](guava-eventbus-component.adoc)


Mime
View raw message