You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Nicolas Filotto (Jira)" <ji...@apache.org> on 2022/10/24 07:09:00 UTC

[jira] [Comment Edited] (CAMEL-17505) camel-core - DataFormatDSL that is source code generated

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

Nicolas Filotto edited comment on CAMEL-17505 at 10/24/22 7:08 AM:
-------------------------------------------------------------------

The problem, I'm facing with {{DataFormatClause}} is related to the fact that we already have some existing methods without parameters like {{avro()}} or {{base64()}} which prevent us to use the same name to access the builders. Any idea of another name that we could use? {{withAvro()}} / {{end()}}? {{avroBuilder()}} / {{end()}}? {{builder()}} / {{build()}}?


was (Author: JIRAUSER285918):
The problem, I'm facing with {{DataFormatClause}} is related to the fact that we already have some existing methods without parameters like {{avro()}} or {{base64()}} which prevent us to use the same name to access the builders. Any idea of another name that we could use? {{withAvro()}}? {{avroBuilder()}}?

> camel-core - DataFormatDSL that is source code generated
> --------------------------------------------------------
>
>                 Key: CAMEL-17505
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17505
>             Project: Camel
>          Issue Type: Improvement
>          Components: build system, camel-core
>            Reporter: Claus Ibsen
>            Assignee: Nicolas Filotto
>            Priority: Major
>             Fix For: Future
>
>
> For Java DSL then we have a data format builder at {{org.apache.camel.builder.DataFormatClause}}
> This class is very verbose as for Java DSL we have overloaded methods to set the various options, but it can get too far like {{xmlSecurity}} with 15 methods.
> Instead, we should generate a builder DSL class the {{DataFormatClause}} can use.
> {noformat}
> marshal()
>     .secureXml()
>         .optionA(bla bla)
>         .optionB(bla bla)
>         .optionC(bla bla)
>     .end(){noformat}
> Then we can still manually add a few methods for common use cases, so you can do {{marshal().secureXml(bla bla, true)}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)