Hi all, multi-value support looks more difficult as it first seems.
The current approach allowed to add collections of more or less SIMPLE items into a single key. But even thinking on being capable of replacing backends currently written in *xml, json, yam *completely, we actually have a requirement for being able to support lists (or arrays) in multiple locations within a property key, e.g. something like: a.b[0].c.d[0].name , where b and c are array structures. This is what I could successfully implement on the formats module. Nevertheless this structure matches with Map<String,String>, nevertheless there is the question of internal representation during evaluation phase from the various PropertySources. Actually property sources basically provide a Map<String,PropertyValue>. After a number of experiments I suggest changing PropertyValue to an interface and also extend that interface with an additional ListPropertyValue actually allows to implement something similar without blowing up all other API/SPIs completely. I am currently finishing this kind of experiment and will create a corresponding branch for discussion until Wednesday the latest. Based on that, we probably have to discuss the collection support completely. E.g. one idea would be to use our functional extension points, e.g. something similar like List<Map> beans = Configuration.adapt(TamayaCollections.asList( Map.class, "a.b")); Or mapped to a concrete configuration bean class: List<Bean> beans = Configuration.adapt(TamayaCollections.asList(Bean.class, "a.b")); This would transfer and map the properties in the a.b array to instances of the given class. J Anatole Am So., 7. Okt. 2018 um 15:40 Uhr schrieb Werner Keil <[email protected] >: > So I guess we try go get Tamaya graduated here eventually? > > If a clarification of a more distinct config spec than the "Trinity" that's > cultivated right now happens before that, it certainly won't hurt ;-) > > @Anatole All the best. > > Werner > > > > > On Sun, Oct 7, 2018 at 3:36 PM Anatole Tresch <[email protected]> wrote: > > > Hi William > > > > Ill make ir short, since I am a bit sick today... > > > > As of now the format modules do not support things, like Json arrays and > > Yaml lists properly. There is another ticket for that. > > > > Actually I have implemented this ticket already, but not yet committed, > > because I also was playing around with another other ticket for better > > classloading support (I know mixing up tickets is bad practice, ashes on > my > > head)... > > > > I think I will be back to notmal soon, so I can create a branch... > > > > Ok? J Anatole > > > > > > > > William Lieurance <[email protected]> schrieb am So., 7. > Okt. > > 2018, 12:08: > > > > > Hi there, > > > > > > I took a stab at TAMAYA-355, the multi-value mapping ticket, and had a > > > question. > > > > > > Anatole, you mention that there's somewhere in core that supports > mapping > > > that includes nested elements, but I can't find it. Where did you > mean? > > > I've got the json and yaml extensions found, but am missing that > > > XML-looking config format in the ticket. > > > > > > I'm excited that we're pushing towards another release. :-) > > > > > > --William > > > > > > > > > > > > ________________________________________ > > > From: Anatole Tresch <[email protected]> > > > Sent: Thursday, September 27, 2018 1:14 PM > > > To: [email protected] > > > Subject: Important changes > > > > > > Hi guys, > > > > > > I have added three ticket I like to be discussed, which I think > together > > > with other open issues would be a good package for the next release. So > > > have a look at and comment on: > > > > > > https://issues.apache.org/jira/browse/TAMAYA-355 > > > https://issues.apache.org/jira/browse/TAMAYA-354 > > > https://issues.apache.org/jira/browse/TAMAYA-353 > > > <https://issues.apache.org/jira/browse/TAMAYA-353> > > > > > > J Anatole > > > > > > -- > > > *Anatole Tresch* > > > PPMC Member Apache Tamaya > > > JCP Star Spec Lead > > > *Switzerland, Europe Zurich, GMT+1* > > > *maketechsimple.wordpress.com <http://maketechsimple.wordpress.com/> * > > > *Twitter: @atsticks, @tamayaconf* > > > [image: JVM Con] > > > > > > -- *Anatole Tresch* PPMC Member Apache Tamaya JCP Star Spec Lead *Switzerland, Europe Zurich, GMT+1* *maketechsimple.wordpress.com <http://maketechsimple.wordpress.com/> * *Twitter: @atsticks, @tamayaconf* *Speaking at:* [image: JSD_Speaker_2017][image: J-Con 2017 logo][image: JVM Con]
