commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <>
Subject Re: [configuration] Loading and Saving
Date Wed, 08 Sep 2004 15:30:03 GMT
Oliver Heger wrote:

> In my opinion this would have two advantages:
> 1. The logic of loading and storing data is extracted from the 
> Configuration classes. In fact we would only need one or two 
> Configuration classes that are only responsible for maintaining
> properties.

Well, it's almost the case already, AbstractConfiguration is the main 
class handling the properties, the final configurations are only left 
with a few constructors, a load(Reader) and a save(Writer) method, they 
are just responsible for reading and writing the data.

> 2. It would be possible to store a Configuration with a different Writer
> than it was loaded. So it would for instance be possible to read a 
> properties file and save it as XML file.

That's an interesting feature and I see it as the main benefit of an 
architecture separating the data from the persistence mechanism. But I 
don't think it's really a common use case, and copying properties is 
still possible if one want to change the file format (we may add a 
addAll(Configuration) method to the Configuration interface to achieve 
that). I filed a enhancement request to cover this topic:

Emmanuel Bourg

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

View raw message