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

Alan Foster commented on CAMEL-5491:
------------------------------------

@ClausIbsen Thanks for your reply

I poked around and found that it was populating the map with 
ExchangeHelper.createVariableMap, which called populateVariableMap
  {code}   
  public static void populateVariableMap(Exchange exchange, Map<String, Object> 
map) {
        map.put("exchange", exchange);
        Message in = exchange.getIn();
        map.put("in", in);
        map.put("request", in);
        map.put("headers", in.getHeaders());
        map.put("body", in.getBody());
        if (isOutCapable(exchange)) {
            // if we are out capable then set out and response as well
            // however only grab OUT if it exists, otherwise reuse IN
            // this prevents side effects to alter the Exchange if we force 
creating an OUT message
            Message msg = exchange.hasOut() ? exchange.getOut() : 
exchange.getIn();
            map.put("out", msg);
            map.put("response", msg);
        }
        map.put("camelContext", exchange.getContext());
    }
{code}

I was trying to find out where the placeholder's properties were defined as I 
couldn't find it in the exchange object, for some reason 
exchange.getContext().getProperties() doesn't actually contain this information 
(I wonder what properties are returned from getProperties? It was an empty map 
when I checked)...

Could you suggest where this information may be stored? I'm offering to make a 
patch for this, but I may need a small bit of help finding out where the 
property placeholder information could be accessed from :)

Alan
                
> Cannot access blueprint property placeholder values from velocity
> -----------------------------------------------------------------
>
>                 Key: CAMEL-5491
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5491
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-blueprint, camel-freemarker, camel-velocity
>    Affects Versions: 2.10.0
>            Reporter: Alan Foster
>            Priority: Minor
>             Fix For: 2.11.0, Future
>
>
> There isn't a way within velocity to access properties set within the 
> blueprint property-placeholder.
> Currently you can only access the exchange's properties according to the 
> documentation at http://camel.apache.org/velocity.html

--
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

        

Reply via email to