Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F2EC3F1B0 for ; Mon, 25 Mar 2013 23:19:40 +0000 (UTC) Received: (qmail 21384 invoked by uid 500); 25 Mar 2013 23:19:40 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 21346 invoked by uid 500); 25 Mar 2013 23:19:40 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 21339 invoked by uid 99); 25 Mar 2013 23:19:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Mar 2013 23:19:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Mar 2013 23:19:37 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 415062388978 for ; Mon, 25 Mar 2013 23:19:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r855941 - in /websites/production/camel/content: cache/main.pageCache languages.html predicate.html Date: Mon, 25 Mar 2013 23:19:16 -0000 To: commits@camel.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130325231916.415062388978@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: buildbot Date: Mon Mar 25 23:19:15 2013 New Revision: 855941 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/languages.html websites/production/camel/content/predicate.html Modified: websites/production/camel/content/cache/main.pageCache ============================================================================== Binary files - no diff available. Modified: websites/production/camel/content/languages.html ============================================================================== --- websites/production/camel/content/languages.html (original) +++ websites/production/camel/content/languages.html Mon Mar 25 23:19:15 2013 @@ -77,7 +77,11 @@

Languages

-

To support flexible and powerful Enterprise Integration Patterns Camel supports various Languages to create an Expression or Predicate within either the Routing Domain Specific Language or the Xml Configuration. The following languages are supported

+

To support flexible and powerful Enterprise Integration Patterns Camel supports various Languages to create an Expression or Predicate within either the Routing Domain Specific Language or the Xml Configuration.

+ +
Combining Predicates
When creating predicates (expressions that evaluate to true or false), you can combine several predicates - regardless of the language they are built with - by using the PredicateBuilder class. For more information, see Compound Predicates.
+ +

The following languages are supported:

  • Bean Language for using Java for expressions
  • Constant
  • the unified EL from JSP and JSF
  • Header
  • JXPath
  • Mvel
  • OGNL
  • Ref Language
  • Property
  • Scripting Languages such as Modified: websites/production/camel/content/predicate.html ============================================================================== --- websites/production/camel/content/predicate.html (original) +++ websites/production/camel/content/predicate.html Mon Mar 25 23:19:15 2013 @@ -137,8 +137,27 @@ from("jms:queue

    Compound Predicates

    -

    You can also create compound predicates using boolean operators such as and, or, not and many others.
    -The sample below demonstrates this:

    + +

    You can also create compound predicates using boolean operators such as and, or, not and many others.

    + +

    Currently this feature is only available in the Java-based DSLs, but not in the Spring nor Blueprint DSLs.

    + +

    Using the PredicateBuilder class, you can combine predicates from different Expression Languages based on logical operators and comparison operators:

    + +
    • not, and, or
    • isNull, isNotNull
    • isEqualTo, isGreaterThan, isLessThan
    • startsWith, endsWith
    • in ("any of X predicates stands true")
    + + +

    Additionally, with PredicateBuilder you can create Regular Expressions and use them as predicates, applying them to the result of an expression, e.g. PredicateBuilder.regex(header("foo"), "\d{4}") applies the regular expression to the header = foo.

    + +

    Combining different Expression Languages is also possible, e.g.:

    + +
    +
    +PredicateBuilder.and(XPathBuilder.xpath("/bookings/flights"), simple("${property.country = 'Spain'}"))
    +
    +
    + +

    The sample below demonstrates further use cases:

    // We define 3 predicates based on some user roles
     // we have static imported and/or from org.apache.camel.builder.PredicateBuilder
    @@ -167,7 +186,6 @@ The sample below demonstrates this:

    -

    Extensible Predicates

    Camel supports extensible Predicates using multiple Languages; the following languages are supported out of the box