commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Pugh" <ep...@upstate.com>
Subject RE: [configuration] Loading and Saving
Date Tue, 07 Sep 2004 15:25:52 GMT
Works for me!  We keep fixing things on this front in bits and pieces.
Getting closure would be good.

I guess my only misgivings is that I don't want to keep delaying 1.0 while
waiting for more code.  But, you do seem to have it quite well thought out,
so if you are stepping up to the plate to do it, I think it's a great idea.
Otherwise, if it's more of an "idea" then lets get 1.0 out, warts and all...

I have to say, I like your email "design doc"!

Eric

> -----Original Message-----
> From: Emmanuel Bourg [mailto:smanux@lfjr.net]
> Sent: Tuesday, September 07, 2004 4:05 PM
> To: Jakarta Commons Developers List
> Subject: [configuration] Loading and Saving
>
>
> Hi all, I'd like to suggest a change to something in [configuration]
> that has been itching me for quite some time: the inconsistencies
> between the various file based configurations with regard to data
> persistence.
>
> Currently we have several inconsistent constructors, and load()/save()
> methods between PropertiesConfiguration, XMLConfiguration and
> HierarchicalXMLConfiguration. For example, XMLConfiguration can be
> constructed from a File object, but not the others,
> HierarchicalXMLConfiguration can be loaded from an URL but not saved,
> PropertiesConfiguration can be loaded directly from an InputStream, etc.
>
> There are also exception inconsistencies, for example save(OutputStream)
> throws a ConfigurationException in XMLConfiguration and an IOException
> in PropertiesConfiguration.
>
> I summarized these differences in the attached excel sheet (I hope
> everyone can read it, if not I'll export it to HTML). I think in order
> to provide a clean and well thought out API we must implement the same
> methods everywhere. Hence I suggest the following:
>
> - replace BasePathLoader with a FileConfiguration interface. This
> interface will declare the load/save methods and the get/setters for the
> file name and the base path.
>
> - replace BasePathConfiguration with AbstractFileConfiguration. It
> provides a default implementation for the get/setters and for some
> load/save methods.
>
> - complete PropertiesConfiguration, XMLConfiguration and
> HierarchicalXMLConfiguration with the missing constructors and methods.
>
> What do you think ?
>
> Emmanuel Bourg
>
>
>


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


Mime
View raw message