Why not keep it readable by enhancing <schema>? We can add an attribute to <element key='attribute-name'/> or add an attribute to <attribute key='true'/>? Either a List or Map can be injected into the service depending on the type it expects.
Albert --- Knut Wannheden <[EMAIL PROTECTED]> 內容: > I'm sure I'm not the first to think of this, but if > the contributions > schema specified exactly one attribute of the > top-level contribution > element as both "required" and "unique", then > injecting the > configuration as a Map could be allowed even with a > simple > <set-configuration>. > > Would that make sense or would it seem too magical? > > --knut > > On Thu, 11 Nov 2004 09:09:48 -0500, Howard Lewis > Ship <[EMAIL PROTECTED]> wrote: > > What about: > > > > <set-object property="foo" > > > object="mapped-configuration:MyConfiguration:keyProperty"/> > > > > This would be easy to implement; it takes a > configuration's List, > > creates a Map from it based on a named keyProperty > and assigns that > > Map to the property of the contructed service. > > > > Can you just tell that I love the ObjectProvider > concept? I wish I > > had thought of it much earlier. > > > > > > > > > > On Wed, 10 Nov 2004 13:56:42 -0500, Steve Gibson > <[EMAIL PROTECTED]> wrote: > > > Its too bad we couldn't specify Collection and > be able to mutate a > > > Collection to a Map. > > > An EntrySet is a Set, could be expressed as a > List, but forms the basis > > > for a Map. > > > > > > Too bad the Collections framework doesn't do > this for us... > > > > > > Steve Gibson > > > > > > -----Original Message----- > > > From: David J. M. Karlsen > [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, November 10, 2004 1:36 PM > > > To: [email protected] > > > Subject: [SPAM] - Retrieve configuration as a > Map - Email has different > > > SMTP TO: and MIME TO: fields in the email > addresses > > > > > > Proposal for 1.1 / general feature request (also > put on the wiki-web): > > > > > > Very often configuration for implementation > classes is a set of unique > > > and required properties. Therefore it would be > very interesting to > > > retrieve the configuration as a Map rather than > a List, because it's > > > possible to use keys, rather than retrieving a > List and not knowing > > > which property is which. > > > > > > What do you think? > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > > > > > > -- > > Howard M. Lewis Ship > > Independent J2EE / Open-Source Java Consultant > > Creator, Jakarta Tapestry > > Creator, Jakarta HiveMind > > http://howardlewisship.com > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
