commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <>
Subject Re: [configuration] SubsetConfiguration
Date Fri, 05 Mar 2004 11:17:10 GMT
I tried to push the reasoning a bit further yesterday and observed that 
if there is a SubsetConfiguration shifting the parent keys to the left, 
we might imagine a SupersetConfiguration shifting the keys to the right 
by adding a prefix. Both classes could even be merged into a 
TranslatedConfiguration. But what use case could require the addition of 
a prefix to all the keys of a configuration ? I identified 2 use cases:

- ini files, a section is basically a configuration translated to the 
right by the section name.

- configuration "mounting" in a CompositeConfiguration, to mix 
heterogeneous configurations with identical keys into a unique 
configuration. For example, given 2 configurations:

One would mount the configuration into a CompositeConfiguration to avoid 

composite.addConfiguration(new TranslatedConfiguration(mail, "mail"));
composite.addConfiguration(new TranslatedConfiguration(database, 


Emmanuel Bourg

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message