[jira] Commented: (CONFIGURATION-273) Saving with interpolation

2007-05-24 Thread Oliver Heger (JIRA)

[ 
https://issues.apache.org/jira/browse/CONFIGURATION-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498503
 ] 

Oliver Heger commented on CONFIGURATION-273:


Maybe we could implement this feature in a more generic way: The copy methods 
in ConfigurationUtils could support an additional mode, in which interpolation 
is automatically performed for affected properties, so that the resulting 
configuration only contains properties with resolved variables.

Then you can use arbitrary destination configurations, including file-based 
configurations, which can be saved later.

For hierarchical configurations this task is a bit more complicated (they are 
not fully supported by the copy() methods of ConfigurationUtils), but it should 
be possible, too.

 Saving with interpolation
 -

 Key: CONFIGURATION-273
 URL: https://issues.apache.org/jira/browse/CONFIGURATION-273
 Project: Commons Configuration
  Issue Type: New Feature
Affects Versions: 1.4
Reporter: Daniel Adrian

 It will be very nice if you'll add the ability to save a configuration file 
 with the interpolation data.
 so if my config file is :
 my_home=127.0.0.1
 my_place=Is ${my_home}
 when I save the configuration (let's say with save(true)) it will look like
 my_home=127.0.0.1
 my_place=Is 127.0.0.1
 Thank you!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (CONFIGURATION-273) Saving with interpolation

2007-05-24 Thread Emmanuel Bourg (JIRA)

[ 
https://issues.apache.org/jira/browse/CONFIGURATION-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498512
 ] 

Emmanuel Bourg commented on CONFIGURATION-273:
--

Just curious, what is the use case for this feature ? The one I see is to save 
a PropertiesConfiguration as a standard Properties file to be read by another 
application not using Commons Configuration.

This can be achieved with ConfigurationConverter.getProperties(config), it 
performs the interpolation of the variables :

PropertiesConfiguration config = new 
PropertiesConfiguration(conf.properties);
Properties props = ConfigurationConverter.getProperties(config);
FileOutputStream out = new FileOutputStream(conf2.properties)
props.save(out, null);
out.close();



 Saving with interpolation
 -

 Key: CONFIGURATION-273
 URL: https://issues.apache.org/jira/browse/CONFIGURATION-273
 Project: Commons Configuration
  Issue Type: New Feature
Affects Versions: 1.4
Reporter: Daniel Adrian

 It will be very nice if you'll add the ability to save a configuration file 
 with the interpolation data.
 so if my config file is :
 my_home=127.0.0.1
 my_place=Is ${my_home}
 when I save the configuration (let's say with save(true)) it will look like
 my_home=127.0.0.1
 my_place=Is 127.0.0.1
 Thank you!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]