You can access configurations as a map in HiveMind 1.1?

http://jakarta.apache.org/hivemind/current/configurations.html#Accessing+Con
figuration+Points

Does that help?  Maybe not immediately, but is that what you are asking for?

-----Original Message-----
From: Zachary Pinter [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 02, 2005 9:01 AM
To: [email protected]
Subject: Re: configuration


Continuing with this question,

Is it possible to do a hashmap type configuration element where instead of
looping through a list of objects that have key/value attributes, you can
just pass a key into a hashmap and get the value?

So, for single properties you can do get("filelocation") and have it return
an object?

-- 
Zachary Pinter
[EMAIL PROTECTED]

On Wed, 2 Mar 2005 14:34:12 +0100, Markus Wiederkehr
<[EMAIL PROTECTED]> wrote:
> I would like to implement a service that requires some configuration. 
> Amongst other things it needs to know the location of a certain file.
> 
> So I have defined an element for this purpose:
> 
> <element name="file">
>   <attribute name="location" required="true"/>
>   ...
> </element>
> 
> It doesn't make sense to specify the file location more than once. But 
> as far as I can see there is no way to prevent it:
> 
> <contribution configuration-id="Test">
>   <file location="file1"/>
>   <file location="file2"/>
> </contribution>
> 
> Using <configuration-point occurs="1"> does not help. I think it would 
> be better to have something like <element occurs="1"> for situations 
> like this.
> 
> If Hivemind knew that a certain element can only occur once it would 
> also be possible to inject the corresponding object directly into the 
> service, instead of injecting a list of objects. Of course this would 
> also require that the configuration schema defines only one element.
> 
> Any thoughts?
> 
> Markus
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to