commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Borut Bolčina <...@najdi.si>
Subject [Configuration] Wish list
Date Thu, 26 Jan 2006 08:21:24 GMT
Hi,

I've been using Commons Configuration successfully in several projects. 
Besides XPath support I have 3 more feature wishes:

*[1] Getting Properties out of Configuration*
When using already written software components, some methods take 
Properties as input parameter. If using CompositeConfiguration as a 
central point for accesing properties, it would be desirable to get 
Properties out of PropertiesConfiguration which is part of 
CompositeConfiguration. Example of wanted functionality:

Configuration propertiesConfiguration = config.getConfiguration(2);
Properties properties = propertiesConfiguration.getProperties();

Asume 3rd entry in configuration.xml is <properties>.

*[2] Inclusion of DatabaseConfiguration in configuration.xml*
It woould be nice to introduce something like <database> tag in 
configuration.xml. The content of the tag would be connection string for 
the database. Example:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<configuration>
  <xml fileName="prop1.xml"/>
  <xml fileName="prop2.xml"/>
  <properties fileName="prop3.properties"/>
  <database 
connect="jdbc:mysql://delovc10.noviforum.si/feeds?user=foo&password=bar"/>
</configuration>

*[3] Getting configurations out of configuration.xml could be done by 
name and not by index.*
So, instead of
config.getConfiguration(2)
one could write
config.getConfiguration("entryThree");

A new attribute for each entry should be introduced, something like:
<configuration>
  <xml id="entryOne" fileName="prop1.xml"/>
  <xml id="entryTwo" fileName="prop2.xml"/>
  <properties id="entryThree" fileName="prop3.properties"/>
  <database id="entryFour" 
connect="jdbc:mysql://delovc10.noviforum.si/feeds?user=foo&password=bar"/>
</configuration>



What do you think?

Regards,
Borut Bolčina

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


Mime
View raw message