[
https://issues.apache.org/jira/browse/CAMEL-7995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14196737#comment-14196737
]
Grzegorz Grzybek commented on CAMEL-7995:
-----------------------------------------
Because Camel model (JAXB-based) elements (e.g. processor definitions) can have
many String properties which can be defined using placeholders (_templates_),
to support marshalling to XML (via JAXB) in two modes (with placeholders and
with replaced values) we should actually keep two {{*Definition}} objects
because (for example) template values in {{ProcessorDefinition}} are overriden
when actual {{Processor}} instances are created.
Maybe processor definition could keep a copy if itself from the moment it was
created (something like instance→template relationship)?
Also there's inconsistency: {{ProcessorDefinition}} instances have there
placeholder values replaced with actual values when the {{Processor}} is
created. But this is not the case for {{FromDefinition}} which only provides
it's (probably parameterized with placeholder) value of {{uri}} in
{{org.apache.camel.model.FromDefinition#resolveEndpoint()}}.
> Route model - Keep the {{ }} placeholders and allow api to get the model with
> the resolved values
> -------------------------------------------------------------------------------------------------
>
> Key: CAMEL-7995
> URL: https://issues.apache.org/jira/browse/CAMEL-7995
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Claus Ibsen
> Fix For: 3.0.0, Future
>
>
> When you define routes using {{ }} placeholders, they get resolved when Camel
> builds the runtime route. And the route model gets updated with the resolved
> values, eg so {{ }} gets replaced with the value.
> So when you dump the route model as xml (eg as source) then you loose the {{
> }} placeholders and see the actual values.
> We should allow to keep the {{ }} so the route model is 100% as designed, but
> we should also store the resolved values that the runtime route is using, so
> you can see those values as well.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)