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

Antoine DESSAIGNE commented on CAMEL-7419:
------------------------------------------

We may be the only ones but we're not using spring at all, we're using classic 
JAXB deserialization of a {{RoutesDefinition}} object. Thus, the solution based 
on spring won't help us.

On the other hand, I love the notation with children tags such as {{file}}, 
that way you can have attribute type information. The only thing that we need 
to take care of is handling of custom Components.


> Configure endpoints with many options in the DSL using a mix of url and 
> properties
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-7419
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7419
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-blueprint, camel-core, camel-spring
>            Reporter: Claus Ibsen
>             Fix For: 3.0.0
>
>
> See nabble
> http://camel.465427.n5.nabble.com/longish-uri-on-file-endpoint-tp5750862.html
> We could toy with the idea of allowing to configure endpoints using a mix of 
> uri's and properties. So you can define the uri in a more readable manner if 
> it has many options.
> {code}
> <from uri="ftp:someserver">
>    <property name="delete" value="true"/>
>    <property name="username" value="{{ftpUser}}"/>
>    <property name="password" value="Se!@rec"/>
>    ... // more properties here
> </from>
> {code}
> This should also be supported in the <endpoint>, eg
> {code}
> <endpoint id="myFtp" uri="ftp:/xxxx">
>   <property name="delete" value="true"/>
>    <property name="username" value="{{ftpUser}}"/>
>    <property name="password" value="Se!@rec"/>
> </endpoint>
> {code}
> We could also support breaking (a bit wacky idea) up the url's in multiple 
> properties url2, url3, url4, which get's appended as one combined url by 
> Camel internally. This allows people to breakup options that may belong 
> together in a few url's. We may come up with a better name than url2, url3 
> etc.
> {code}
> <from uri="ftp:someserver">
>   <property name="url2" value=".... more options here"/>
>   <property name="url3" value=".... more options here"/>
> </from>
> {code}
> Also we can support the p:xxx attribute syntax so you can do shorthand 
> property assignment. We do this with the property placeholder in the EIPs.
> (see Using property placeholders for any kind of attribute in the XML DSL at 
> http://camel.apache.org/using-propertyplaceholder.html). Then it becomes just 
> one tag.
> {code}
> <from uri="ftp:someserver"
>    p:delete="true" 
>    p:username="{{ftpUser}}"
>    p:password="Se!@rec"/>
> {code}
> Although using the <from><property> is similar to what you do in 
> spring/blueprint and also tooling friendly. So you can have code assistance 
> in your IDE, and XML schema validation. 
> Also it allows for people to configure their passwords without using RAW() 
> style. As the value is used as-is.
> And for Java DSL, we can have some java builder to do similar. But people can 
> also just break up their strings, or use string format etc.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to