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

Claus Ibsen resolved CAMEL-6016.
--------------------------------

    Resolution: Fixed
    
> Simple language - Add type function which can refer to a constant or enum 
> --------------------------------------------------------------------------
>
>                 Key: CAMEL-6016
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6016
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.11.0
>
>
> It would be nice if we added support so people can refer to a constant on a 
> class / interface, or to an enum, which we can referred to in the simple 
> language.
> The syntax would need to be worked out a bit
> {code}
> <when>
>   <simple>${body} == ${T(com.foo.MyTypes.CUSTOMER)}</simple>
> </when>
> {code}
> Not sure about the function name, here we use T to refer to a type. We could 
> also use, "const", "type", or have "enum" as well
> {code}
> <when>
>   <simple>${body} == ${const(com.foo.MyTypes.CUSTOMER)}</simple>
> </when>
> {code}
> And we can use colon instead of ( ) which is shorter
> {code}
> <when>
>   <simple>${body} == ${enum:com.foo.MyTypes.CUSTOMER}</simple>
> </when>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to