camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "G.J. van de Streek" <str...@avisi.nl>
Subject string constants in simple expression language
Date Wed, 22 Apr 2009 12:07:14 GMT

Is there a way to use string constants in the simple expression language. I
am trying to fix a deprecation warning in:

        from("direct:saveAgentsFile")
                .setHeader(FileComponent.HEADER_FILE_NAME, "agents.xml")
               
.to("file:///Users/streekgj/Desktop/filestore/?append=false")
                ;

I tried to change it to:

                .setHeader(FileComponent.HEADER_FILE_NAME, new
SimpleExpression("agents.xml");)

Of course it is treated as an expression, but is there any way to mark it as
an string literal, or escape the dot? Something like:

                .setHeader(FileComponent.HEADER_FILE_NAME, new
SimpleExpression("'agents.xml'");)
or
                .setHeader(FileComponent.HEADER_FILE_NAME, new
SimpleExpression("agents\\.xml");)

Or do string literals only works with operations?
-- 
View this message in context: http://www.nabble.com/string-constants-in-simple-expression-language-tp23174960p23174960.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message