You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Rodrigo Kumpera <ku...@gmail.com> on 2006/07/21 17:39:10 UTC

Configuration injection when configuration-point occurs="1"

Hi,

I would like to be able to avoid the following idiom while injecting a
configuration which only one ocurrence is allowed:

public void setConfiguration(List configuration) {
	this.configuration = (MyConfigType) configuration.get(0);
}

I think on this case HiveMind should try to inject in the following setter:

public void setConfiguration(MyConfigType configuration) {
	this.configuration =  configuration;
}

Looking at the code of BuilderFactory it doesn't seens to be obvious
how to support such thing out of the box. Or maybe I'm missing
something.  Is someone aware of how to do that?

Thanks,
Rodrigo Kumpera

Re: Configuration injection when configuration-point occurs="1"

Posted by Achim Hügen <ac...@gmx.de>.
It's not possible in the moment with patching the core framework,
but a topic that will get addressed in hivemind 2.

Achim

Am Fri, 21 Jul 2006 17:39:10 +0200 schrieb Rodrigo Kumpera  
<ku...@gmail.com>:

> Hi,
>
> I would like to be able to avoid the following idiom while injecting a
> configuration which only one ocurrence is allowed:
>
> public void setConfiguration(List configuration) {
> 	this.configuration = (MyConfigType) configuration.get(0);
> }
>
> I think on this case HiveMind should try to inject in the following  
> setter:
>
> public void setConfiguration(MyConfigType configuration) {
> 	this.configuration =  configuration;
> }
>
> Looking at the code of BuilderFactory it doesn't seens to be obvious
> how to support such thing out of the box. Or maybe I'm missing
> something.  Is someone aware of how to do that?
>
> Thanks,
> Rodrigo Kumpera
>