commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <j...@apache.org>
Subject [jira] Created: (CONFIGURATION-243) Improve handling of optional configurations in DefaultConfigurationBuilder
Date Sun, 03 Dec 2006 17:27:22 GMT
Improve handling of optional configurations in DefaultConfigurationBuilder
--------------------------------------------------------------------------

                 Key: CONFIGURATION-243
                 URL: http://issues.apache.org/jira/browse/CONFIGURATION-243
             Project: Commons Configuration
          Issue Type: Improvement
    Affects Versions: 1.3 Final
            Reporter: Oliver Heger
         Assigned To: Oliver Heger
            Priority: Minor


So far a configuration declared as optional in the configuration definition file won't be
added to the resulting combined configuration when its initialization causes an error. There
are use cases where this behavior is not appropriate:

Consider as an example an application that needs to store user specific settings in a user
configuration file (e.g. stored in the user's home directory). The application's configuration
definition file would include this user configuration and declare it as optional. When a user
starts this application for the first time the user configuration does not exist; so its creation
will cause an error and it won't be added to the combined configuration. Now every time the
application wants to access the user configuration it has to check whether it exists and manually
create it if necessary. Here it would be much easier if an empty configuration of the correct
type was added to the combined configuration.

This behavior could be controlled by an additional reserved attribute config-forceCreate of
a configuration declaration.

By the way: The nested class ConfigurationDeclaration of DefaultConfigurationBuilder should
be public. This makes the implementation of custom configuration providers easier.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
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