camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-5503) Expanding Bean Binding annotations to define explicitly what to apply it to
Date Tue, 14 Aug 2012 14:32:37 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-5503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434151#comment-13434151
] 

Claus Ibsen commented on CAMEL-5503:
------------------------------------

We should strive to keep things simple and cover common uses-cases. To execute xpaths on exchange
properties and attachments is not common.

Also we should try to keep the annotations simple. The idea of the annotations is to map to
the message data, and that is 99,9% the message body and headers. You do not so often have
XML in headers, and thus why the @XPath so far covers the message body.

We have to be careful not adding features to Camel, we end up with too much.
                
> Expanding Bean Binding annotations to define explicitly what to apply it to
> ---------------------------------------------------------------------------
>
>                 Key: CAMEL-5503
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5503
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Alan Foster
>            Priority: Trivial
>
> Currently the bean binding annotations are applied to the body like so :
>     public void doSomething(@XPath("//foo/bar/text()") String someValue) {
>     }
> It would be nice if you could specify what you want to apply it to; for instance you
could specify to apply it to headers/properties etc
> In terms of annotations it may look something like:
>     public void doSomething(@XPath("//foo/bar/text()", @Header("someHeader")) String
someValue) {
>     }
> For backwards compatability it would of course still apply to the body by default, but
we can still offer the ability to use it apply it explicitly ie
>     @XPath("//baz/text(), @Body) String someOtherValue
> I feel like this would be a useful addition to camel's bean binding.
> If anyone feels this is a good idea, I am offering to try it out and see how it goes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message