You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/01/29 10:19:13 UTC
[jira] [Created] (CAMEL-6016) Simple language - Add type function
which can refer to a constant or enum
Claus Ibsen created CAMEL-6016:
----------------------------------
Summary: 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
Fix For: Future
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