commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r424606 - in /jakarta/commons/proper/configuration/trunk/xdocs: changes.xml howto_properties.xml user_guide.xml
Date Sat, 22 Jul 2006 17:08:00 GMT
Author: oheger
Date: Sat Jul 22 10:08:00 2006
New Revision: 424606

URL: http://svn.apache.org/viewvc?rev=424606&view=rev
Log:
Doku for PropertiesConfigurationLayout

Modified:
    jakarta/commons/proper/configuration/trunk/xdocs/changes.xml
    jakarta/commons/proper/configuration/trunk/xdocs/howto_properties.xml
    jakarta/commons/proper/configuration/trunk/xdocs/user_guide.xml

Modified: jakarta/commons/proper/configuration/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/xdocs/changes.xml?rev=424606&r1=424605&r2=424606&view=diff
==============================================================================
--- jakarta/commons/proper/configuration/trunk/xdocs/changes.xml (original)
+++ jakarta/commons/proper/configuration/trunk/xdocs/changes.xml Sat Jul 22 10:08:00 2006
@@ -23,6 +23,13 @@
   <body>
 
     <release version="1.3-SNAPSHOT" date="in SVN">
+      <action dev="oheger" type="add" issue="CONFIGURATION-104">
+        A new class PropertiesConfigurationLayout was introduced whose task is
+        to preserve the structure (e.g. comments, blanc lines) of a file
+        loaded by PropertiesConfiguration. Each PropertiesConfiguration
+        object is now associated with such a layout object. A saved properties
+        file will look very similar to its original.
+      </action>
       <action dev="oheger" type="add" issue="CONFIGURATION-145">
         clone() methods have been added to BaseConfiguration, AbstractFileConfiguration,
         MapConfiguration, CompositeConfiguration, and CombinedConfiguration.

Modified: jakarta/commons/proper/configuration/trunk/xdocs/howto_properties.xml
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/xdocs/howto_properties.xml?rev=424606&r1=424605&r2=424606&view=diff
==============================================================================
--- jakarta/commons/proper/configuration/trunk/xdocs/howto_properties.xml (original)
+++ jakarta/commons/proper/configuration/trunk/xdocs/howto_properties.xml Sat Jul 22 10:08:00
2006
@@ -249,6 +249,30 @@
 ]]></source>
       </subsection>
 
+      <subsection name="Layout Objects">
+      <p>
+        Each <code>PropertiesConfiguration</code> object is associated with a
+        <em>Layout object</em>, an instance of the class
+        <code><a href="apidocs/org/apache/commons/configuration/PropertiesConfigurationLayout.html">
+        PropertiesConfigurationLayout</a></code>. This layout object is
+        responsible for preserving most of the structure of loaded configuration
+        files. This means that things like comments or blanc lines in a saved
+        properties file will closely resemble the original properties file
+        (the algorithm is not 100 percent perfect, but for most use cases it
+        should be sufficient).
+      </p>
+      <p>
+        Normally a developer does not have to deal with these layout objects.
+        However there are some methods that might be of interest in certain use
+        cases. For instance <code>PropertiesConfigurationLayout</code> defines
+        methods for obtaining and setting the comment for a property key. A
+        header comment for the whole properties file is also supported. If the
+        values of multi-valued properties should always be written on a
+        single line rather than adding a new property definition for each value
+        (which would be incompatible with <code>java.util.Properties</code>)
+        the <code>setForceSingleLine()</code> method can be used.
+      </p>
+      </subsection>
     </section>
 
   </body>

Modified: jakarta/commons/proper/configuration/trunk/xdocs/user_guide.xml
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/xdocs/user_guide.xml?rev=424606&r1=424605&r2=424606&view=diff
==============================================================================
--- jakarta/commons/proper/configuration/trunk/xdocs/user_guide.xml (original)
+++ jakarta/commons/proper/configuration/trunk/xdocs/user_guide.xml Sat Jul 22 10:08:00 2006
@@ -57,6 +57,7 @@
         <li><a href="howto_properties.html#Variable Interpolation">Variable Interpolation</a></li>
         <li><a href="howto_properties.html#Saving">Saving</a></li>
         <li><a href="howto_properties.html#Special Characters">Special Characters</a></li>
+        <li><a href="howto_properties.html#Layout Objects">Layout Objects</a></li>
       </ul>
       <li><a href="howto_filebased.html#File-based Configurations">File-based
Configurations</a></li>
       <ul>



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