camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Burgazzoli (JIRA)" <>
Subject [jira] [Commented] (CAMEL-10352) Optionally delegate to Aries PropertyEvaluator services in BlueprintPropertiesParser
Date Thu, 13 Oct 2016 12:10:20 GMT


Luca Burgazzoli commented on CAMEL-10352:

[~davsclaus] [~gzres]

I had a second look at the code and I think we can implement this thing in a better and less
intrusive way, some background:

- BlueprintPropertiesParser invokes AbstractPropertyPlaceholder::getProperty via reflection
(as it is protected) and this method does not take into account PropertyEvaluator
- DefaultPropertiesParser tries to resolve a placeholder using registered functions then it
check if the placeholder has a default value before to call doGetPropertyValue so if you have
a placeholder named prefix:something, you'll get doGetPropertyValue invoked with prefix

To let PropertyEvaluators be taken into account, we could:

- Invoke AbstractPropertyPlaceholder::retrieveValue which eventually invokes a PropertyEvaluator
- Invoke doGetPropertyValue in DefaultPropertiesParser::getPropertyValue also before searching
for the default so that you can give a change to the specific subclass ((in our case BlueprintPropertiesParser)
to resolve the placeholder as it is , if no result are returned we then go ahead as today
searching for a default and so on.

By doing so we relies on Aries for property resolution so we do not need to care about PropertyEvaluators
or any other stuff that may land in aries in the future and we do not need to add a new prefix
resolution in BlueprintPropertiesParser.

[Here|] you can wee
the required changes

Let me know what you think.


> Optionally delegate to Aries PropertyEvaluator services in BlueprintPropertiesParser
> ------------------------------------------------------------------------------------
>                 Key: CAMEL-10352
>                 URL:
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-blueprint, osgi
>            Reporter: Grzegorz Grzybek
>            Assignee: Luca Burgazzoli

This message was sent by Atlassian JIRA

View raw message