<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div>I will continue discussion here, to have broader audience.<br><br></div>Seems most of you are in favor of new map-* list-* operations but not all of you like idea of enhanced read/write-attribute ops.<br>
<br></div>To shed bit of light on this. Complex attributes are here to stay and will always be around.<br></div>They are/will be used in lesser extend as in original AS7 code but in any case there are here to stay.<br><br>
</div>With extended syntax for write/read-attribute operations I was mostly thinking of simplifying complex attributes read/write <br></div>Also keeping in mind that every object is also a map and can be addressed and updated as such.<br>
having syntax like we could support simple things like this:<br>:write-attribute(name=timeout.unit, value="MINUTES)<br></div>which we are in dare need of.<br><br>as current approach for that is<br></div>:write-attribute(name=timeout, value="{value=10, unit=MINUTES}")<br>
<br></div>where we need to know/change whole object instead of just part of it.<br><br></div>I think having this syntax wouldn't change anything for console at all.<br></div>It would however require some work in CLI area, especially if we would want to have tab completion.<br>
</div><br>Even today there is metadata that tells what complex attributes are and how are they structured, we just don't utilize this info.<br><div><br><div><div><div>As it goes for introducing ModelType.MAP I am all in favor of. As it would allow us also few more things when it comes to <br>
types of map as currently we only have support for Map<String,?> where key can only be String.<br>Introducing ModelType.MAP would also require us to introduce few new model metadata constructs such as key-type.<br><br>
</div><div>I discussed ModelType.MAP with Brian a bit, but he was not big fan as that would require us move all map attributes to use this<br>which would be a big change (100+ attributes) and this would be big compatibility issue.<br>
</div><div>The biggest problem with introducing it is that any object can be used/addressed as map and as such having extra type bit redundant.<br></div><div></div><div><br></div><div>However we could probably introduce it for WildFly 10 (maybe 9) with jboss-dmr 2.x series.<br>
</div><div><br></div><div><br>--<br></div><div>tomaz<br></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 18, 2014 at 10:01 AM, Heiko Braun <span dir="ltr"><<a href="mailto:hbraun@redhat.com" target="_blank">hbraun@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>I've already commented on the gist, but for the record here's my point if view:</div>
<div><br></div><div><br></div><div><p style="margin-right:0px;margin-bottom:15px;margin-left:0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:23.799999237060547px;background-color:rgb(255,255,255);margin-top:0px!important">
+1 on the custom operation for list/map modifications.</p><p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:23.799999237060547px;background-color:rgb(255,255,255)">
But I am against the write-attribute changes and generic complex attributes . IMO we'd better be explicit about complex attributes and limit it to certain usecases:</p><ul style="padding:0px 0px 0px 30px;margin-top:15px;margin-right:0px;margin-left:0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:23.799999237060547px;background-color:rgb(255,255,255);margin-bottom:0px!important">
<li>write-attribute is for simple attributes only and yields an error for complex types</li><li>no support for generic complex attributes. these should become (child) resources themselves</li><li>introduce an explicit ModelType.LIST and ModelType.MAP (i think the former already exists)</li>
</ul><div><br></div></div><div><br></div><div>/Heiko</div><div><br></div><br><div><div><div class="h5"><div>On 14 Aug 2014, at 18:31, Tomaž Cerar <<a href="mailto:tomaz.cerar@gmail.com" target="_blank">tomaz.cerar@gmail.com</a>> wrote:</div>
<br></div></div><blockquote type="cite"><div><div class="h5"><div dir="ltr"><div><div><div><div><div><div>Hi guys,<br><br><br></div>there ware some discussions on how we should improve handling complex types of attribute bit better in CLI.<br>
</div>For most part that was about Map & List types.<br>
<br>After some discussions with few of you I came up with plan / ideas what all options are there for us to improve on.<br><br></div>you can see current state of proposed enhancements at <a href="https://gist.github.com/ctomc/91055a6f4e7502dcd130" target="_blank">https://gist.github.com/ctomc/91055a6f4e7502dcd130</a><br>
<br></div>In short, I propose to add set of map-* and list-* global operations and improve :read-attribute & :write-attribute<br>with EL like syntax for reading / updating map, list and generic complex attributes.<br>
<br><br></div>Let me know what you think about it, especially Console & CLI folks.<br><br>--<br></div><div>tomaz<br></div><div><br><br><br></div></div></div></div>
_______________________________________________<br>wildfly-dev mailing list<br><a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a></blockquote>
</div><br></div></blockquote></div><br></div>