camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CAMEL-1381) PredicateClause in the fluent builder for building predicates using fluent builder syntax
Date Fri, 31 Dec 2010 14:15:45 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-1381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen resolved CAMEL-1381.
--------------------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: Future)
                   2.6.0
         Assignee: Claus Ibsen

> PredicateClause in the fluent builder for building predicates using fluent builder syntax
> -----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1381
>                 URL: https://issues.apache.org/jira/browse/CAMEL-1381
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.6.0
>
>
> 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...
> when().is().header("foo").equalTo("something").
> or
> when().is().header("foo").equalTo().header("bar");
> 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.


Mime
View raw message