camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] Created: (CAMEL-1381) PredicateClause in the fluent builder for building predicates using fluent builder syntax
Date Wed, 25 Feb 2009 10:09:59 GMT
PredicateClause in the fluent builder for building predicates using fluent builder syntax

                 Key: CAMEL-1381
             Project: Apache Camel
          Issue Type: New Feature
          Components: camel-core
            Reporter: Claus Ibsen
             Fix For: Future

The problem is when using predicates in the fluent builder you can not build an expression
but only call a single predicate.

James gave a hint on a solution:
>> Minor issue but I have been trying to coax folks away from this form
>> of DSL (e.g. figure 15)
>> when(header("type").
>> to
>> when().header("type")...
>> not always applicable - but its just to let the IDE do better
>> completion and let us remove some of the kinda global bits of DSL we
>> still have lying around the code.
> Yeah I will go over and change the ones that is possible. However when
> you chain a method then its not possible, eg:
> when().header("type").isEqualTo("foo").to("seda:foo");

Yeah - for things like that we currently have to use the EL / simple /
XPath expression languages.

I guess we could add some DSL to build them maybe...



i.e. the is() builds a kinda binary expression with the first
expression returning a binary expression which is then used to build
an == != > < <= >= type expression with another expression?

Not totally sure its worth it though :)

So something like the ExpressionClause that can do this for expression, we can create a PredicateClause
that preserves the original type so you can continue routing afterwards.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message