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/11/07 13:15:00 UTC

[jira] [Commented] (CAMEL-17505) camel-core - Propose a DSL for data formats

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

Nicolas Filotto commented on CAMEL-17505:
-----------------------------------------

Part 2 https://github.com/apache/camel/pull/8678

> camel-core - Propose a DSL for data formats
> -------------------------------------------
>
>                 Key: CAMEL-17505
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17505
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Nicolas Filotto
>            Priority: Major
>             Fix For: 3.20.0
>
>
> 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 propose a builder DSL class that the {{RouteBuilder}} can provide.
> {noformat}
> marshal(
>     dataFormat()
>         .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)