Hi Roberto When writing a dataformat then keep in mind that it should be both useable and configurable from both Java and XML DSL. That is why we have model classes tied into camel-core that specify the options you can configure, so they get generated in the XML DSL as well, as in Java DSL via getter/setters and fluent builders.
This works well when there are limited number of options. If you need to configure any kind of arbitrary key/value pairs etc, then we have a way of setting an option as Map so it can be key/value in the XML DSL etc. Its probably easier if you get to a point with a basic implementation of any23 we can look at first, and then take a review how to add more complex configurations. On Fri, Jun 28, 2019 at 12:08 AM Beto Flores <[email protected]> wrote: > > Hi all. > > I am working in adding configurability to the Any23 DataFormat creation > through DataFormatClause. > > I was thinking in two polymorphic forms like these: > > marshal().any23(conf, extractorsList).... > marshal().any23(conf).... > > Where conf would be a Map<String, String> containing Any23 Configuration > parameters as Key-Value pairs. And extractorsList a List <String> > containing a list of active extractors to be used by the dataformat. > > But I noticed that other dataformats do not use complex structures (Map, > List) in DataFormatClause, instead they use simple types such as int, > String, boolean. Is there a specific reason for that?, I mean it is a > standard to use only simple types. Am I going to have trouble in the any23 > Reifier implementation if I use the aforementioned approach?. > > Best, > Roberto. -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
