You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by "Liebig, Stefan " <St...@compeople.de> on 2005/01/28 09:13:31 UTC

Configuration as List or Map

Within the changes (http://jakarta.apache.org/hivemind/changes.html) there is:
- Added support for mapped configurations. A configuration schema can now specify an attribute which should be used as the key in a Map of all contributions. The BuilderFactory can inject such configurations as List or Maps. (KW) 
 
How do I get this? Is it sufficent to ´mark´ an attribute as unique and inject a configuration point to either
an List or a Map parameter type? This is just a guess.
 
Stefan
 

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Configuration as List or Map

Posted by Knut Wannheden <kn...@gmail.com>.
Stefan,

What you have to do is to use the "key-attribute" attribute on the
top-level <element> elements in your contributions schema in question.
For every contribution the value of this attribute will then be used
in the Map of all contributions as the key for the contributed object.
Here's the relevant documentation:
http://jakarta.apache.org/hivemind/configurations.html and
http://jakarta.apache.org/hivemind/descriptor.html#element.

One example of how to use this is the hivemind.ObjectProviders
configuration point
(http://jakarta.apache.org/hivemind/hivedocs/config/hivemind.ObjectProviders.html).
I think you should also take a look at the hivemodule.xml for more
details.

Regards,

--knut

On Fri, 28 Jan 2005 00:13:31 -0800, Liebig, Stefan
<St...@compeople.de> wrote:
> Within the changes (http://jakarta.apache.org/hivemind/changes.html) there is:
> - Added support for mapped configurations. A configuration schema can now specify an attribute which should be used as the key in a Map of all contributions. The BuilderFactory can inject such configurations as List or Maps. (KW)
> 
> How do I get this? Is it sufficent to ´mark´ an attribute as unique and inject a configuration point to either
> an List or a Map parameter type? This is just a guess.
> 
> Stefan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org