You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by oh...@apache.org on 2014/09/12 22:27:21 UTC
svn commit: r1624635 [2/2] -
/commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/
Modified: commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_hierarchical.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_hierarchical.xml?rev=1624635&r1=1624634&r2=1624635&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_hierarchical.xml (original)
+++ commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_hierarchical.xml Fri Sep 12 20:27:20 2014
@@ -28,9 +28,9 @@
Many sources of configuration data have a hierarchical or tree-like
nature. They can represent data that is structured in many ways.
Such configuration sources are represented by classes implementing the
- <code><a href="../apidocs/org/apache/commons/configuration/HierarchicalConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/HierarchicalConfiguration.html">
HierarchicalConfiguration</a></code> interface. With
- <code><a href="../apidocs/org/apache/commons/configuration/BaseHierarchicalConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/BaseHierarchicalConfiguration.html">
BaseHierarchicalConfiguration</a></code> there is a fully functional
implementation of the interface from which most of the hierarchical
configuration classes shipped with <em>Commons Configuration</em> are
@@ -39,7 +39,7 @@
<p>
Prominent examples of hierarchical configuration sources are XML
documents. They can be read and written using the
- <code><a href="../apidocs/org/apache/commons/configuration/XMLConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/XMLConfiguration.html">
XMLConfiguration</a></code> class. This section explains how
to deal with such structured data and demonstrates the enhanced query
facilities supported by <code>HierarchicalConfiguration</code>. We
@@ -48,15 +48,15 @@
properties) applies to other hierarchical configurations as well.
Examples for other hierarchical configuration classes are
<ul>
- <li><code><a href="../apidocs/org/apache/commons/configuration/CombinedConfiguration.html">
+ <li><code><a href="../apidocs/org/apache/commons/configuration2/CombinedConfiguration.html">
CombinedConfiguration</a></code></li>
- <li><code><a href="../apidocs/org/apache/commons/configuration/INIConfiguration.html">
+ <li><code><a href="../apidocs/org/apache/commons/configuration2/INIConfiguration.html">
INIConfiguration</a></code></li>
- <li><code><a href="../apidocs/org/apache/commons/configuration/plist/PropertyListConfiguration.html">
+ <li><code><a href="../apidocs/org/apache/commons/configuration2/plist/PropertyListConfiguration.html">
PropertyListConfiguration</a></code></li>
</ul>
</p>
-
+
<subsection name="Accessing properties in hierarchical configurations">
<p>
We will start with a simple XML document to show some basics
@@ -84,13 +84,13 @@
]]></source>
<p>
(As becomes obvious, this tutorial does not bother with good
- design of XML documents, the example file should rather
+ design of XML documents, the example file should rather
demonstrate the different ways of accessing properties.)
To access the data stored in this document it must be loaded
- by <code><a href="../apidocs/org/apache/commons/configuration/XMLConfiguration.html">
- XMLConfiguration</a></code>. Like for other
+ by <code><a href="../apidocs/org/apache/commons/configuration2/XMLConfiguration.html">
+ XMLConfiguration</a></code>. Like for other
<a href="howto_filebased.html">file-based</a> configuration classes
- a <code><a href="../apidocs/org/apache/commons/configuration/builder/FileBasedConfigurationBuilder.html">
+ a <code><a href="../apidocs/org/apache/commons/configuration2/builder/FileBasedConfigurationBuilder.html">
FileBasedConfigurationBuilder</a></code> is used for reading the source
file as shown in the following code fragement:
</p>
@@ -156,7 +156,7 @@ List<Object> buttons = config.getList("b
has the three values <em>OK</em>, <em>Cancel</em>, and
<em>Help</em>, so it is queried using the <code>getList()</code>
method. This works with attributes, too. In addition, a special
- <code><a href="../apidocs/org/apache/commons/configuration/convert/ListDelimiterHandler.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/convert/ListDelimiterHandler.html">
ListDelimiterHandler</a></code> implementation can be set which
supports splitting texts at a specific list delimiter character. This
works in the same way as described in the section about
@@ -423,7 +423,7 @@ List<Object> ... // further calls for ot
very handy when processing list-like structures:
</p>
<source><![CDATA[
-List<HierarchicalConfiguration<ImmutableNode>> fields =
+List<HierarchicalConfiguration<ImmutableNode>> fields =
config.configurationsAt("tables.table(0).fields.field");
for(HierarchicalConfiguration sub : fields)
{
@@ -447,7 +447,7 @@ for(HierarchicalConfiguration sub : fiel
which accept an additional <strong>boolean</strong> parameter. If
here the value <strong>true</strong> is passed, a special
configuration implementation is returned (in fact, an instance of the
- <code><a href="../apidocs/org/apache/commons/configuration/SubnodeConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/SubnodeConfiguration.html">
SubnodeConfiguration</a></code> class) that operates on the same
data structures as the original configuration. Therefore, changes made
on one configuration are directly reflected by the other one.
@@ -632,7 +632,7 @@ config.addProperty("tables.table.fields.
<p>
For more information about adding properties to a hierarchical
configuration also have a look at the javadocs for
- <code><a href="../apidocs/org/apache/commons/configuration/HierarchicalConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/HierarchicalConfiguration.html">
HierarchicalConfiguration</a></code>.
</p>
</subsection>
@@ -698,16 +698,16 @@ String complex = config.getString("test.
<subsection name="Internal Representation">
<p>
You might have noted that the
- <code><a href="../apidocs/org/apache/commons/configuration/HierarchicalConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/HierarchicalConfiguration.html">
HierarchicalConfiguration</a></code> interface has a type parameter
defining the type of nodes it operates on. Internally, the nodes build up
a tree structure on which queries or manipulating operations can be
executed. There is an abstract base class
- <code><a href="../apidocs/org/apache/commons/configuration/AbstractHierarchicalConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.html">
AbstractHierarchicalConfiguration</a></code> implementing a major part of
the provided functionality in terms of abstract node objects. These nodes
are not directly accessed, but via a so-called
- <code><a href="../apidocs/org/apache/commons/configuration/tree/NodeHandler.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/tree/NodeHandler.html">
NodeHandler</a></code>. The <code>NodeHandler</code> interface defines a
number of methods for accessing properties of a node like its name, its
value, or its children in a generic way.
@@ -717,10 +717,10 @@ String complex = config.getString("test.
with different hierarchical data structures, e.g. file systems, JNDI, etc.
The standard configurations shipped with <em>Commons Configuration</em>
mainly use an in-memory representation of their data based on the
- <code><a href="../apidocs/org/apache/commons/configuration/tree/ImmutableNode.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/tree/ImmutableNode.html">
ImmutableNode</a></code> class. There is a special base class for
configurations of this type called
- <code><a href="../apidocs/org/apache/commons/configuration/BaseHierarchicalConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/BaseHierarchicalConfiguration.html">
BaseHierarchicalConfiguration</a></code>. As the name implies, the nodes
used by these configurations are immutable; this is beneficial especially
when it comes to <a href="howto_concurrency.html#Special_cases">concurrent
@@ -754,7 +754,7 @@ ImmutableNode root = config.getNodeModel
becomes possible to plug in different expression engines into a
<code>HierarchicalConfiguration</code> object. So by providing
different implementations of the
- <code><a href="../apidocs/org/apache/commons/configuration/tree/ExpressionEngine.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/tree/ExpressionEngine.html">
ExpressionEngine</a></code>
interface hierarchical configurations can support alternative
expression languages for accessing their data.
@@ -763,7 +763,7 @@ ImmutableNode root = config.getNodeModel
Before we discuss the available expression engines that ship
with Commons Configuration, it should be explained how an
expression engine can be associated with a configuration object.
- <code><a href="../apidocs/org/apache/commons/configuration/HierarchicalConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/HierarchicalConfiguration.html">
HierarchicalConfiguration</a></code> and all implementing classes
provide a <code>setExpressionEngine()</code> method, which expects
an implementation of the <code>ExpressionEngine</code> interface as
@@ -805,9 +805,9 @@ FileBasedConfigurationBuilder<XMLConfigu
<p>
The syntax described so far for property keys of hierarchical
configurations is implemented by a specific implementation of the
- <code><a href="../apidocs/org/apache/commons/configuration/tree/ExpressionEngine.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/tree/ExpressionEngine.html">
ExpressionEngine</a></code> interface called
- <code><a href="../apidocs/org/apache/commons/configuration/tree/DefaultExpressionEngine.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/tree/DefaultExpressionEngine.html">
DefaultExpressionEngine</a></code>. An instance of this class
is used by the base implementation of
<code>HierarchicalConfiguration</code> if no specific expression
@@ -826,7 +826,7 @@ FileBasedConfigurationBuilder<XMLConfigu
change it! The following example shows how the syntax of a
<code>DefaultExpressionEngine</code> object is modified. The
key is to create an instance of the
- <code><a href="../apidocs/org/apache/commons/configuration/tree/DefaultExpressionEngineSymbols.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/tree/DefaultExpressionEngineSymbols.html">
DefaultExpressionEngineSymbols</a></code> class and to
initialize it with the desired syntax elements. This is done
using a builder approach:
@@ -897,7 +897,7 @@ DefaultExpressionEngine engine = new Def
Object value = config.getProperty("tables.table(0).name");
// name can either be a child node of table or an attribute
]]></source>
-
+
<a name="The_XPATH_expression_engine"></a>
<strong>The XPATH expression engine</strong>
<p>
@@ -938,7 +938,7 @@ Object value = config.getProperty("table
</p>
<p>
For enabling XPATH syntax for property keys you need the
- <code><a href="../apidocs/org/apache/commons/configuration/tree/xpath/XPathExpressionEngine.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/tree/xpath/XPathExpressionEngine.html">
XPathExpressionEngine</a></code> class. This class
implements the <code>ExpressionEngine</code> interface and can
be plugged into a <code>HierarchicalConfiguration</code> object
@@ -1074,7 +1074,7 @@ config.addProperty("tables table/name",
the <code><tables></code> element. More information about
keys and how they play together with <code>addProperty()</code>
and <code>setProperty()</code> can be found in the Javadocs for
- <a href="../apidocs/org/apache/commons/configuration/tree/xpath/XPathExpressionEngine.html">
+ <a href="../apidocs/org/apache/commons/configuration2/tree/xpath/XPathExpressionEngine.html">
<code>XPathExpressionEngine</code></a>.
</p>
<p>
@@ -1096,7 +1096,7 @@ config.addProperty("tables table/name",
<p>
There is special support for the initialization parameters of
configuration builders for hierarchical configurations. The
- <code><a href="../apidocs/org/apache/commons/configuration/builder/HierarchicalBuilderProperties.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/HierarchicalBuilderProperties.html">
HierarchicalBuilderProperties</a></code> interface defines additional
settings applicable to hierarchical configurations. Currently, the
<a href="#Expression_engines">expression engine</a> can be set.
@@ -1104,9 +1104,9 @@ config.addProperty("tables table/name",
<p>
A parameters object for a hierarchical configuration can be obtained using
the <code>hierarchical()</code> method of a
- <code><a href="../apidocs/org/apache/commons/configuration/builder/fluent/Parameter.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/fluent/Parameter.html">
Parameters</a></code> instance. It returns an object implementing the
- <code><a href="../apidocs/org/apache/commons/configuration/builder/fluent/HierarchicalBuilderParameters.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/fluent/HierarchicalBuilderParameters.html">
HierarchicalBuilderParameters</a></code> interface which contains set
methods for all the available properties, including the ones inherited
from base interfaces.
Modified: commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_multitenant.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_multitenant.xml?rev=1624635&r1=1624634&r2=1624635&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_multitenant.xml (original)
+++ commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_multitenant.xml Fri Sep 12 20:27:20 2014
@@ -46,17 +46,17 @@
<subsection name="MultiFileConfigurationBuilder">
<p>
- <code><a href="../apidocs/org/apache/commons/configuration/builder/combined/MultiFileConfigurationBuilder.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/combined/MultiFileConfigurationBuilder.html">
MultiFileConfigurationBuilder</a></code> is a specialized configuration
builder implementation which internally manages a set of builders for
<a href="howto_filebased.html">file-based configurations</a>. In the
initialization parameters of this builder a file name pattern has to
be passed. The pattern can contain keys that will be resolved using the
- <code><a href="../apidocs/org/apache/commons/configuration/interpol/ConfigurationInterpolator.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/interpol/ConfigurationInterpolator.html">
ConfigurationInterpolator</a></code> every time the builder's
<code>getConfiguration()</code> method is called. The resolved pattern
is then interpreted as the name of a configuration file to be loaded
- by a newly created <code><a href="../apidocs/org/apache/commons/configuration/builder/FileBasedConfigurationBuilder.html">
+ by a newly created <code><a href="../apidocs/org/apache/commons/configuration2/builder/FileBasedConfigurationBuilder.html">
FileBasedConfigurationBuilder</a></code>.
</p>
<p>
@@ -81,12 +81,12 @@
</subsection>
<subsection name="DynamicCombinedConfiguration">
<p>
- The <code><a href="../apidocs/org/apache/commons/configuration/builder/combined/CombinedConfigurationBuilder.html">
+ The <code><a href="../apidocs/org/apache/commons/configuration2/builder/combined/CombinedConfigurationBuilder.html">
CombinedConfigurationBuilder</a></code> class allows multiple configuration files to be
merged together. However, it will not collaborate with a <code>MultiFileConfiguration</code>
properly since the underlying managed configuration will be different depending
on the resolution of the location pattern.
- <code><a href="../apidocs/org/apache/commons/configuration/DynamicCombinedConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/DynamicCombinedConfiguration.html">
DynamicCombinedConfiguration</a></code> solves this by creating a new
<code>CombinedConfiguration</code> for each pattern.
</p>
@@ -94,10 +94,10 @@
<subsection name="Sample Configuration">
<p>
This sample configuration illustrates how to use
- <code><a href="../apidocs/org/apache/commons/configuration/builder/combined/CombinedConfigurationBuilder.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/combined/CombinedConfigurationBuilder.html">
CombinedConfigurationBuilder</a></code>
in combination with
- <code><a href="../apidocs/org/apache/commons/configuration/builder/combined/MultiFileConfigurationBuilder.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/combined/MultiFileConfigurationBuilder.html">
MultiFileConfigurationBuilder</a></code> to create a multi-tenant
configuration.
</p>
@@ -105,11 +105,11 @@
<configuration>
<header>
<result loggerName="TestLogger"
- config-class="org.apache.commons.configuration.DynamicCombinedConfiguration"
+ config-class="org.apache.commons.configuration2.DynamicCombinedConfiguration"
keyPattern="$${sys:Id}">
- <nodeCombiner config-class="org.apache.commons.configuration.tree.MergeCombiner"/>
+ <nodeCombiner config-class="org.apache.commons.configuration2.tree.MergeCombiner"/>
<expressionEngine
- config-class="org.apache.commons.configuration.tree.xpath.XPathExpressionEngine"/>
+ config-class="org.apache.commons.configuration2.tree.xpath.XPathExpressionEngine"/>
</result>
</header>
<override>
@@ -118,12 +118,12 @@
config-forceCreate="true"
schemaValidation="true">
<expressionEngine
- config-class="org.apache.commons.configuration.tree.xpath.XPathExpressionEngine"/>
+ config-class="org.apache.commons.configuration2.tree.xpath.XPathExpressionEngine"/>
</multiFile>
<xml fileName="testMultiConfiguration_default.xml"
config-name="defaultConfig" schemaValidation="true">
<expressionEngine
- config-class="org.apache.commons.configuration.tree.xpath.XPathExpressionEngine"/>
+ config-class="org.apache.commons.configuration2.tree.xpath.XPathExpressionEngine"/>
</xml>
</override>
</configuration>
@@ -172,17 +172,17 @@
<subsection name="Builder Configuration Related to Multi-file Configurations">
<p>
When setting up a
- <code><a href="../apidocs/org/apache/commons/configuration/builder/combined/MultiFileConfigurationBuilder.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/combined/MultiFileConfigurationBuilder.html">
MultiFileConfigurationBuilder</a></code> a special object with
initialization parameters can be used as argument to the
<code>configure()</code> method. It is of type
- <code><a href="../apidocs/org/apache/commons/configuration/builder/fluent/MultiFileBuilderParameters.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/fluent/MultiFileBuilderParameters.html">
MultiFileBuilderParameters</a></code> and can be obtained via the
<code>multiFile()</code> method of a
- <code><a href="../apidocs/org/apache/commons/configuration/builder/fluent/Parameter.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/fluent/Parameter.html">
Parameters</a></code> object. The properties specific to this
configuration type are defined by the
- <code><a href="../apidocs/org/apache/commons/configuration/builder/MultiFileBuilderProperties.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/MultiFileBuilderProperties.html">
MultiFileBuilderProperties</a></code> interface. They include
<ul>
<li>The pattern string for determining the name of the
@@ -224,7 +224,7 @@ XMLConfiguration config = builder.getCon
a single configuration file. However, this either means the subcomponent
has to be aware of the surrounding configuration and navigate past it or the
application must be provided just the portion of the configuration it
- can process. <code><a href="../apidocs/org/apache/commons/configuration/PatternSubtreeConfigurationWrapper.html">
+ can process. <code><a href="../apidocs/org/apache/commons/configuration2/PatternSubtreeConfigurationWrapper.html">
PatternSubtreeConfigurationWrapper</a></code> can be used for this purpose.
</p>
<p>
@@ -232,7 +232,7 @@ XMLConfiguration config = builder.getCon
attributes needed to make components work correctly injected into them.
When working with Commons Configuration this works very well. Components
simply need to have a
- <code><a href="../apidocs/org/apache/commons/configuration/HierarchicalConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/HierarchicalConfiguration.html">
HierarchicalConfiguration</a></code> attribute along with
a corresponding setter and getter. The injection framework can then be
used to provide the component with the correct configuration using
@@ -241,9 +241,9 @@ XMLConfiguration config = builder.getCon
<p>
<source><![CDATA[
<bean id="configurationBuilder"
- class="org.apache.commons.configuration.builder.FileBasedConfigurationBuilder">
+ class="org.apache.commons.configuration2.builder.FileBasedConfigurationBuilder">
<constructor-arg index="0"
- value="org.apache.commons.configuration.XMLConfiguration"/>
+ value="org.apache.commons.configuration2.XMLConfiguration"/>
<constructor-arg index="1">
<map>
<entry key="config-fileBased">
@@ -258,7 +258,7 @@ XMLConfiguration config = builder.getCon
factory-method="getConfiguration">
</bean>
<bean id="subcomponentConfig"
- class="org.apache.commons.configuration.PatternSubtreeConfigurationWrapper"
+ class="org.apache.commons.configuration2.PatternSubtreeConfigurationWrapper"
autowire='autodetect'>
<constructor-arg index="0">
<ref bean="applicationConfig"/>
@@ -292,7 +292,7 @@ XMLConfiguration config = builder.getCon
managed configuration instance can be declared directly as keys of
this map. The configuration of the file to be loaded is an
exceptional case: This information is stored internally as a
- <code><a href="../apidocs/org/apache/commons/configuration/io/FileHandler.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/io/FileHandler.html">
FileHandler</a></code> object, and the properties of this object are
contained in a sub map under the key <em>config-fileBased</em>.
</p>
Modified: commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_properties.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_properties.xml?rev=1624635&r1=1624634&r2=1624635&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_properties.xml (original)
+++ commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_properties.xml Fri Sep 12 20:27:20 2014
@@ -29,12 +29,12 @@
<p>
Properties files are a popular means of configuring applications. Of course, <em>Commons Configuration</em>
supports this format and enhances significantly the basic <code>java.util.Properties</code> class.
- This section introduces the features of the
- <code><a href="../apidocs/org/apache/commons/configuration/PropertiesConfiguration.html">PropertiesConfiguration</a></code> class.
+ This section introduces the features of the
+ <code><a href="../apidocs/org/apache/commons/configuration2/PropertiesConfiguration.html">PropertiesConfiguration</a></code> class.
Note that <code>PropertiesConfiguration</code> is a very typical example
for an implementation of the <code>Configuration</code> interface; it
extends
- <code><a href="../apidocs/org/apache/commons/configuration/AbstractConfiguration.html">AbstractConfiguration</a></code>,
+ <code><a href="../apidocs/org/apache/commons/configuration2/AbstractConfiguration.html">AbstractConfiguration</a></code>,
thus all the features provided by this base class are available here as
well. More information about functionality common to all standard
<code>Configuration</code> implementations can be found in the section
@@ -76,7 +76,7 @@ catch(ConfigurationException cex)
<p>
As is demonstrated by this example, a configuration object for a
properties file is obtained via a
- <code><a href="../apidocs/org/apache/commons/configuration/builder/FileBasedConfigurationBuilder.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/FileBasedConfigurationBuilder.html">
FileBasedConfigurationBuilder</a></code> as described in the section
<a href="howto_filebased.html">File-based Configurations</a>.
</p>
@@ -126,7 +126,7 @@ colors.pie = #FF0000, #00FF00, #0000FF
</source>
<p>
Provided that an appropriate
- <code><a href="../apidocs/org/apache/commons/configuration/convert/ListDelimiterHandler.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/convert/ListDelimiterHandler.html">
ListDelimiterHandler</a></code> object was set for the
configuration instance, the value is split automatically, and
you can retrieve an array or a <code>java.util.List</code> directly with:
@@ -138,7 +138,7 @@ List<Object> colorList = config.ge
<p>
Splitting of string values at list delimiter characters is disabled
by default. It can be enabled by specifying an instance of
- <code><a href="../apidocs/org/apache/commons/configuration/convert/DefaultListDelimiterHandler.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/convert/DefaultListDelimiterHandler.html">
DefaultListDelimiterHandler</a></code>. This can be done when loading
the configuration via the builder:
</p>
@@ -274,7 +274,7 @@ config.dirs = \\\\share2
]]></source>
<p>
Please also refer to the Javadocs of the
- <code><a href="../apidocs/org/apache/commons/configuration/convert/DefaultListDelimiterHandler.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/convert/DefaultListDelimiterHandler.html">
DefaultListDelimiterHandler</a></code> class; it describes the
escaping rules to be applied in detail.
</p>
@@ -284,7 +284,7 @@ config.dirs = \\\\share2
<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">
+ <code><a href="../apidocs/org/apache/commons/configuration2/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 blank lines in a saved
@@ -413,7 +413,7 @@ public class WhitespacePropertiesReader
{
super(in, delimiter);
}
-
+
/**
* Special algorithm for parsing properties keys with whitespace. This
* method is called for each non-comment line read from the properties
@@ -479,11 +479,11 @@ Configuration config = builder.getConfig
When setting up a configuration builder to produce a
<code>PropertiesConfiguration</code> instance typically an object
implementing the
- <code><a href="../apidocs/org/apache/commons/configuration/builder/fluent/PropertiesBuilderParameters.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/fluent/PropertiesBuilderParameters.html">
PropertiesBuilderParameters</a></code> interface is used. In addition
to the parameters common to all file-based configurations, there are
settings specific to properties files which are defined by the
- <code><a href="../apidocs/org/apache/commons/configuration/builder/PropertiesBuilderProperties.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/PropertiesBuilderProperties.html">
PropertiesBuilderProperties</a></code> interface. These include
<ul>
<li>A flag whether <a href="#Includes">include files</a> are supported.
@@ -497,7 +497,7 @@ Configuration config = builder.getConfig
<p>
A parameters object for a properties configuration can be obtained using
the <code>properties()</code> method of a
- <code><a href="../apidocs/org/apache/commons/configuration/builder/fluent/Parameter.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/fluent/Parameter.html">
Parameters</a></code> instance
</p>
</subsection>
Modified: commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_reloading.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_reloading.xml?rev=1624635&r1=1624634&r2=1624635&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_reloading.xml (original)
+++ commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_reloading.xml Fri Sep 12 20:27:20 2014
@@ -50,7 +50,7 @@
</p>
<p>
A basic component is a <em>reloading detector</em>, defined by the
- <code><a href="../apidocs/org/apache/commons/configuration/reloading/ReloadingDetector.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/reloading/ReloadingDetector.html">
ReloadingDetector</a></code> interface. This object is responsible for
detecting a change on an external configuration source. An example
implementation could check whether the last-modified data of a specific
@@ -70,7 +70,7 @@
</p>
<p>
The next component taking part in reloading is an instance of the
- <code><a href="../apidocs/org/apache/commons/configuration/reloading/ReloadingController.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/reloading/ReloadingController.html">
ReloadingController</a></code> class. This is a fully functional class
implementing a generic protocol for executing a reload check (based on an
external trigger) and reacting accordingly. The actual check whether a
@@ -84,7 +84,7 @@
controller changes into the so-called <em>reloading state</em>. This
means that the need for a reload was detected and now the reload has
actually to happen. Typically, this is done by one of the
- <code><a href="../apidocs/org/apache/commons/configuration/reloading/ReloadingListener.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/reloading/ReloadingListener.html">
ReloadingListener</a></code> objects registered at the controller. As long
as the controller is in reloading state, no further changes on the
configuration source monitored by the associated <code>ReloadingDetector</code>
@@ -118,7 +118,7 @@
which get changed by external sources are a typical use case for an
automatic reloading feature. Therefore, <em>Commons Configuration</em>
has some special support in this area. This is mainly provided by the
- <code><a href="../apidocs/org/apache/commons/configuration/builder/ReloadingFileBasedConfigurationBuilder.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/ReloadingFileBasedConfigurationBuilder.html">
ReloadingFileBasedConfigurationBuilder</a></code> class, an extension of
the standard builder for file-based configurations.
</p>
@@ -128,13 +128,13 @@
<code>ReloadingDetector</code> that is associated with the file managed
by the builder. (Actually, the situation is a bit more complex: the
creation of the reloading detector is delegated to an object implementing
- the <code><a href="../apidocs/org/apache/commons/configuration/builder/ReloadingDetectorFactory.html">
+ the <code><a href="../apidocs/org/apache/commons/configuration2/builder/ReloadingDetectorFactory.html">
ReloadingDetectorFactory</a></code> interface. The factory to be used can
be configured via the builder's initialization parameters. Per default, a
- <code><a href="../apidocs/org/apache/commons/configuration/builder/DefaultReloadingDetectorFactory.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/DefaultReloadingDetectorFactory.html">
DefaultReloadingDetectorFactory</a></code> object is used which creates
an instance of the
- <code><a href="../apidocs/org/apache/commons/configuration/reloading/FileHandlerReloadingDetector.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/reloading/FileHandlerReloadingDetector.html">
FileHandlerReloadingDetector</a></code> class. Such an object can detect
changes on a file referenced by a <code>FileHandler</code>.) The builder
is already registered as change listener at the reloading controller;
@@ -146,7 +146,7 @@
</p>
<p>
For this example we use the
- <code><a href="../apidocs/org/apache/commons/configuration/reloading/PeriodicReloadingTrigger.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/reloading/PeriodicReloadingTrigger.html">
PeriodicReloadingTrigger</a></code> class which is based on a scheduled
executor service. When constructing an instance of this class the
<code>ReloadingController</code> and the period in which to trigger a
@@ -247,10 +247,10 @@ trigger.start();
file-based configurations some settings can be defined that influence
reloading operations. These settings are part of the initialization
parameters for file-based configurations and defined by the
- <code><a href="../apidocs/org/apache/commons/configuration/builder/FileBasedBuilderProperties.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/FileBasedBuilderProperties.html">
FileBasedBuilderProperties</a></code> interface:
<ul>
- <li>The <code><a href="../apidocs/org/apache/commons/configuration/builder/ReloadingDetectorFactory.html">
+ <li>The <code><a href="../apidocs/org/apache/commons/configuration2/builder/ReloadingDetectorFactory.html">
ReloadingDetectorFactory</a></code> to be used when the reloading
controller is created. An application with special requirements related
to the detection of changes can here provide a custom factory. As was
@@ -268,15 +268,15 @@ trigger.start();
<subsection name="Generic Reloading Support">
<p>
- In fact, <code><a href="../apidocs/org/apache/commons/configuration/builder/ReloadingFileBasedConfigurationBuilder.html">
+ In fact, <code><a href="../apidocs/org/apache/commons/configuration2/builder/ReloadingFileBasedConfigurationBuilder.html">
ReloadingFileBasedConfigurationBuilder</a></code> is a pretty thin
implementation around a generic reloading mechanism already supported by
- the <code><a href="../apidocs/org/apache/commons/configuration/builder/BasicConfigurationBuilder.html">
+ the <code><a href="../apidocs/org/apache/commons/configuration2/builder/BasicConfigurationBuilder.html">
BasicConfigurationBuilder</a></code> base class. What it does is mainly
specific to file-based configurations: It ensures that a suitable
<code>ReloadingDetector</code> is used which is connected to the file
managed by the builder, and that this detector is used by a
- <code><a href="../apidocs/org/apache/commons/configuration/reloading/ReloadingController.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/reloading/ReloadingController.html">
ReloadingController</a></code> object also created by the builder.
</p>
<p>
@@ -374,7 +374,7 @@ builder.addEventListener(ConfigurationBu
<subsection name="Managed Reloading">
<p>
- <code><a href="../apidocs/org/apache/commons/configuration/reloading/ManagedReloadingDetector.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/reloading/ManagedReloadingDetector.html">
ManagedReloadingDetector</a></code> is an alternative to automatic
reloading. It allows to hot-reload properties on a running application,
but only when requested by an administrator. The detector class defines a
Modified: commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_utilities.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_utilities.xml?rev=1624635&r1=1624634&r2=1624635&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_utilities.xml (original)
+++ commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_utilities.xml Fri Sep 12 20:27:20 2014
@@ -37,7 +37,7 @@
<p>
Often it is required to copy the data of one <code>Configuration</code>
object into another one. For this purpose the
- <code><a href="../apidocs/org/apache/commons/configuration/AbstractConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/AbstractConfiguration.html">
AbstractConfiguration</a></code> class (which serves as the base class for
most of the configuration implementations shipped with this library)
provides two methods implementing a basic copy operation:
@@ -64,7 +64,7 @@
configurations. Most of the configuration implementations provided by
<em>Commons Configurations</em> support cloning. The
<code>cloneConfiguration()</code> method of
- <code><a href="../apidocs/org/apache/commons/configuration/ConfigurationUtils.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/ConfigurationUtils.html">
ConfigurationUtils</a></code> can be used for creating a copy of an
arbitrary <code>Configuration</code> object. This method checks whether
the passed in configuration implements the <code>Cloneable</code>
@@ -99,11 +99,11 @@ HierarchicalConfiguration<?> hc =
]]></source>
<p>
The <code>convertToHierarchical()</code> method of
- <code><a href="../apidocs/org/apache/commons/configuration/ConfigurationUtils.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/ConfigurationUtils.html">
ConfigurationUtils</a></code> checks whether the passed in object
is already a hierarchical configuration. If this is the case, it is
returned unchanged. Otherwise, a new instance of
- <code><a href="../apidocs/org/apache/commons/configuration/BaseHierarchicalConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/BaseHierarchicalConfiguration.html">
BaseHierarchicalConfiguration</a></code> is created, and the properties of
the source configuration are copied into it.
</p>
@@ -129,7 +129,7 @@ test(xy)=true
To solve this problem, it is possible to specify an alternative expression
engine that will be used for the conversion. For instance, if you know that
your property keys can contain brackets, you could use an instance of
- <code><a href="../apidocs/org/apache/commons/configuration/tree/DefaultExpressionEngine.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/tree/DefaultExpressionEngine.html">
DefaultExpressionEngine</a></code> that is configured with a different
index marker. This could look as follows:
</p>
@@ -154,7 +154,7 @@ HierarchicalConfiguration<?> hc =
CombinedConfiguration</a> flat configurations contained in the combined
configuration are also converted into hierarchical configurations using
the methods discussed here. The
- <code><a href="../apidocs/org/apache/commons/configuration/CombinedConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/CombinedConfiguration.html">
CombinedConfiguration</a></code> class
defines the method <code>setConversionExpressionEngine()</code>, which
can be called to specify an expression engine to be used during this
@@ -171,7 +171,7 @@ HierarchicalConfiguration<?> hc =
be the requirement of converting from <code>Properties</code> objects to
<code>Configuration</code> objects and vice versa. For this purpose an
utility class can be used:
- <code><a href="../apidocs/org/apache/commons/configuration/ConfigurationConverter.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/ConfigurationConverter.html">
ConfigurationConverter</a></code>.
</p>
<p>
@@ -194,17 +194,17 @@ Properties processConfiguration(Properti
{
// Create a configuration for the properties for easy access
Configuration config = ConfigurationConverter.getConfiguration(props);
-
+
// Now use the Configuration API for manipulating the configuration data
...
-
+
// Return a Properties object with the results
return ConfigurationConverter.getProperties(config);
}
]]></source>
<p>
Please refer to the Javadocs of
- <code><a href="../apidocs/org/apache/commons/configuration/ConfigurationConverter.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/ConfigurationConverter.html">
ConfigurationConverter</a></code> to learn more about the available
conversion methods and their limitations.
</p>
@@ -223,7 +223,7 @@ Properties processConfiguration(Properti
written by <em>Commons Configuration</em>.
</p>
<p>
- <code><a href="../apidocs/org/apache/commons/configuration/AbstractConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/AbstractConfiguration.html">
AbstractConfiguration</a></code> provides the method
<code>interpolatedConfiguration()</code>. This method creates a clone of
the current configuration and then performs interpolation on all of its
@@ -231,7 +231,7 @@ Properties processConfiguration(Properti
basically the same content as the original configuration, but with all
variables replaced by their actual values (as far as this was possible).
The following code fragment shows how a
- <code><a href="../apidocs/org/apache/commons/configuration/PropertiesConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/PropertiesConfiguration.html">
PropertiesConfiguration</a></code> object can be saved in a way that the
resulting properties file does not contain any variables:
</p>
@@ -262,10 +262,10 @@ handler.save("external_config.properties
you do not want to provide a special error handler, but only need to
propagate the exception that caused the error event, you can make use of
a convenience method of the
- <code><a href="../apidocs/org/apache/commons/configuration/ConfigurationUtils.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/ConfigurationUtils.html">
ConfigurationUtils</a></code> class: <code>enableRuntimeExceptions()</code>
registers a special error listener at the passed in configuration that
- throws a <code><a href="../apidocs/org/apache/commons/configuration/ConfigurationRuntimeException.html">
+ throws a <code><a href="../apidocs/org/apache/commons/configuration2/ConfigurationRuntimeException.html">
ConfigurationRuntimeException</a></code> exception for each received
error event. The following code fragment shows an example of using this
method:
@@ -280,7 +280,7 @@ String value = config.getString("myKey")
<p>
<code>enableRuntimeExceptions()</code> can be called for all
<code>Configuration</code> implementations that implement the
- <code><a href="../apidocs/org/apache/commons/configuration/event/EventSource.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/event/EventSource.html">
EventSource</a></code> interface (which is the case for almost all configuration
classes provided by this library). Of course, the affected implementation
must support the mechanism of error events, otherwise the registered
@@ -309,11 +309,11 @@ String value = config.getString("myKey")
<code>Configuration</code> objects were the only source of configuration
data. So applications using this version probably pass around objects of
this type. This makes the migration to the new configuration builders
- harder.
+ harder.
</p>
<p>
There is one helper class which can simplify this migration:
- <code><a href="../apidocs/org/apache/commons/configuration/builder/BuilderConfigurationWrapperFactory.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/BuilderConfigurationWrapperFactory.html">
BuilderConfigurationWrapperFactory</a></code>. This class is capable of
creating special proxy objects implementing the <code>Configuration</code>
interface which behind the scenes delegate to the managed configuration
@@ -331,7 +331,7 @@ builder.getConfiguration().getString("ke
The instance can be configured with an enumeration constant of the
<code>EventSourceSupport</code> class which determines whether and how the
proxy objects created by this factory should implement the
- <code><a href="../apidocs/org/apache/commons/configuration/event/EventSource.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/event/EventSource.html">
EventSource</a></code> interface. Then proxy objects can be constructed by
calling the <code>createBuilderConfigurationWrapper()</code> method passing
in the interface class and the configuration builder instance to be
@@ -347,7 +347,7 @@ FileBasedConfigurationBuilder<Configurat
.setFile(new File("config.properties"));
// Create the wrapping proxy
-BuilderConfigurationWrapperFactory wrapperFactory =
+BuilderConfigurationWrapperFactory wrapperFactory =
new BuilderConfigurationWrapperFactory(BuilderConfigurationWrapperFactory.EventSourceSupport.BUILDER);
Configuration config = wrapperFactory.createBuilderConfigurationWrapper(
Configuration.class, builder);
Modified: commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_xml.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_xml.xml?rev=1624635&r1=1624634&r2=1624635&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_xml.xml (original)
+++ commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/howto_xml.xml Fri Sep 12 20:27:20 2014
@@ -27,7 +27,7 @@
<p>
An important sub category of hierarchical configurations files are XML
documents. <em>Commons Configuration</em> ships with the
- <code><a href="../apidocs/org/apache/commons/configuration/XMLConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/XMLConfiguration.html">
XMLConfiguration</a></code> class that can read and write files of this
type. All features described in the chapter about
<a href="howto_hierarchical.html">Hierarchical Configurations</a> are
@@ -120,7 +120,7 @@ XMLConfiguration config = builder.getCon
<p>
<code>XMLConfiguration</code> provides a simple default implementation of
an <code>EntityResolver</code> in form of the
- <code><a href="../apidocs/org/apache/commons/configuration/resolver/DefaultEntityResolver.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/resolver/DefaultEntityResolver.html">
DefaultEntityResolver</a></code> class. This implementation is initialized
by calling the <code>registerEntityId()</code> method with the
public IDs of the entities to be retrieved and their corresponding
@@ -167,7 +167,7 @@ XMLConfiguration config = builder.getCon
Entity and URI Resolvers</a> describes using a set of catalog files to
resolve enitities. <em>Commons Configuration</em> provides support for
this Catalog Resolver through its own
- <code><a href="../apidocs/org/apache/commons/configuration/resolver/CatalogResolver.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/resolver/CatalogResolver.html">
CatalogResolver</a></code> class.
</p>
<source><![CDATA[
@@ -257,7 +257,7 @@ XMLConfiguration config = builder.getCon
builders. The initialization parameters supported for them include all
the settings available for hierarchical configurations and file-based
configurations. In addition, the
- <code><a href="../apidocs/org/apache/commons/configuration/builder/XMLBuilderProperties.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/XMLBuilderProperties.html">
XMLBuilderProperties</a></code> interface defines settings specific to
XML configurations. This includes
<ul>
@@ -271,9 +271,9 @@ XMLConfiguration config = builder.getCon
<p>
A parameters object for an XML configuration can be obtained using
the <code>xml()</code> method of a
- <code><a href="../apidocs/org/apache/commons/configuration/builder/fluent/Parameter.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/fluent/Parameter.html">
Parameters</a></code> instance. It returns an object implementing the
- <code><a href="../apidocs/org/apache/commons/configuration/builder/fluent/XMLBuilderParameters.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/fluent/XMLBuilderParameters.html">
XMLBuilderParameters</a></code> interface which defines set
methods for all the available properties.
</p>
Modified: commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/overview.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/overview.xml?rev=1624635&r1=1624634&r2=1624635&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/overview.xml (original)
+++ commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/overview.xml Fri Sep 12 20:27:20 2014
@@ -29,7 +29,7 @@
Commons Configuration allows you to access configuration properties from
a variety of different sources. No matter if they are stored in a properties file,
a XML document, or a JNDI tree, they can all be accessed in the same way
- through the generic <code><a href="../apidocs/org/apache/commons/configuration/Configuration.html">Configuration</a></code>
+ through the generic <code><a href="../apidocs/org/apache/commons/configuration2/Configuration.html">Configuration</a></code>
interface.
</p>
<p>
@@ -89,12 +89,12 @@
</p>
</subsection>
-
+
<subsection name="The Configuration interface">
<p>
All the classes in this package that represent different kinds of configuration
sources share a single interface:
- <code><a href="../apidocs/org/apache/commons/configuration/Configuration.html">Configuration</a></code>.
+ <code><a href="../apidocs/org/apache/commons/configuration2/Configuration.html">Configuration</a></code>.
This interface allows you to access and manipulate configuration properties
in a generic way.
</p>
@@ -103,7 +103,7 @@
divided into methods which query data from the configuration and
methods which alter the configuration object. In fact, the
<code>Configuration</code> interface extends a base interface called
- <code><a href="../apidocs/org/apache/commons/configuration/ImmutableConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/ImmutableConfiguration.html">
ImmutableConfiguration</a></code>. <code>ImmutableConfiguration</code>
defines all methods which read data from a configuration object without
changing its state. <code>Configuration</code> adds methods for
@@ -191,7 +191,7 @@
object into an <code>ImmutableConfiguration</code>: just pass the
configuration in question to the <code>unmodifiableConfiguration()</code>
method of the
- <code><a href="../apidocs/org/apache/commons/configuration/ConfigurationUtils.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/ConfigurationUtils.html">
ConfigurationUtils</a></code> utility class. This results in an
immutable configuration containing the same data as the original
configuration.
Modified: commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/upgradeto2_0.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/upgradeto2_0.xml?rev=1624635&r1=1624634&r2=1624635&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/upgradeto2_0.xml (original)
+++ commons/proper/configuration/branches/configuration2-alpha/src/site/xdoc/userguide/upgradeto2_0.xml Fri Sep 12 20:27:20 2014
@@ -117,7 +117,7 @@
<subsection name="Accessing Configuration Properties">
<p>
The good news is that there are only minor changes in the central
- <code><a href="../apidocs/org/apache/commons/configuration/Configuration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/Configuration.html">
Configuration</a></code> interface used for reading and writing configuration
data. A few methods have been added supporting new features, but the
principle patterns for dealing with <code>Configuration</code> objects
@@ -129,17 +129,17 @@
<p>
What has changed is the default implementation of
<a href="howto_basicfeatures.html#List_handling">List handling</a> in
- <code><a href="../apidocs/org/apache/commons/configuration/AbstractConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/AbstractConfiguration.html">
AbstractConfiguration</a></code>. In version 1.x list splitting was
enabled per default; string properties containing a "," character
were interpreted as lists with multiple elements. This was a frequent
source for confusion and bug reports. In version 2.0 list splitting is now
disabled initially. The implementation also has been extended: it is no
longer limited to providing a delimiter character, but an implementation
- of the <code><a href="../apidocs/org/apache/commons/configuration/convert/ListDelimiterHandler.html">
+ of the <code><a href="../apidocs/org/apache/commons/configuration2/convert/ListDelimiterHandler.html">
ListDelimiterHandler</a></code> interface can be set which controls all
aspects of list handling. In order to enable list handling again, pass a
- <code><a href="../apidocs/org/apache/commons/configuration/convert/DefaultListDelimiterHandler.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/convert/DefaultListDelimiterHandler.html">
DefaultListDelimiterHandler</a></code> object to your
<code>AbstractConfiguration</code> instance. This class supports splitting
string properties at specific delimiter characters. However, its results
@@ -147,20 +147,20 @@
1.0: this version contained some inconsistencies regarding the escaping of
list delimiter characters. If you really need the same behavior in this
area, then use the
- <code><a href="../apidocs/org/apache/commons/configuration/convert/LegacyListDelimiterHandler.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/convert/LegacyListDelimiterHandler.html">
LegacyListDelimiterHandler</a></code> class.
</p>
<p>
Version 2.0 also has changes related to
<a href="howto_hierarchical.html#Hierarchical_Configurations">Hierarchical
Configurations</a>.
- <code><a href="../apidocs/org/apache/commons/configuration/HierarchicalConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/HierarchicalConfiguration.html">
HierarchicalConfiguration</a></code>, formally the base class for all
hierarchical configurations, is now an interface. The equivalent to the
old base class is now named
- <code><a href="../apidocs/org/apache/commons/configuration/BaseHierarchicalConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/BaseHierarchicalConfiguration.html">
BaseHierarchicalConfiguration</a></code>. It extends the abstract base class
- <code><a href="../apidocs/org/apache/commons/configuration/AbstractHierarchicalConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.html">
AbstractHierarchicalConfiguration</a></code>. The difference between these
classes is that <code>AbstractHierarchicalConfiguration</code> provides
generic algorithms for dealing with an arbitrary hierarchical node
@@ -188,9 +188,9 @@
the way configuration objects are created, initialized, and managed. In
version 1.x configurations are created directly using their constructor.
Especially for file-based configuration implementations - like
- <code><a href="../apidocs/org/apache/commons/configuration/PropertiesConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/PropertiesConfiguration.html">
PropertiesConfiguration</a></code> or
- <code><a href="../apidocs/org/apache/commons/configuration/XMLConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/XMLConfiguration.html">
XMLConfiguration</a></code> - there were constructors which immediately
populated the newly created instances from a data source. If additional
settings were to be applied, this was done after the creation using
@@ -319,7 +319,7 @@ PropertiesConfiguration config = builder
The former has been removed. The functionality provided by
<code>DefaultConfigurationBuilder</code> is still available, but the
class has been renamed to
- <code><a href="../apidocs/org/apache/commons/configuration/builder/combined/CombinedConfigurationBuilder.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/builder/combined/CombinedConfigurationBuilder.html">
CombinedConfigurationBuilder</a></code> (the old name was no longer
appropriate as builders are now a common concept in the library) and
adapted to other builder implementations.
@@ -333,7 +333,7 @@ PropertiesConfiguration config = builder
definition for the combined configuration is obtained. So a dynamic
approach is possible here as well. In both cases, the
<code>getConfiguration()</code> method is used to obtain the
- <code><a href="../apidocs/org/apache/commons/configuration/CombinedConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/CombinedConfiguration.html">
CombinedConfiguration</a></code> object constructed by the builder. From
a usage point of view there is not that much difference between these
classes.
@@ -403,7 +403,7 @@ PropertiesConfiguration config = builder
aspects. The most obvious change is probably that synchronization of
configurations is now much more flexible. A configuration instance is
assigned a
- <code><a href="../apidocs/org/apache/commons/configuration/sync/Synchronizer.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/sync/Synchronizer.html">
Synchronizer</a></code> object which controls if and how locks are obtained
when executing operations on this configuration. By changing the
synchronizer, an application can adapt the locking behavior to its specific
@@ -412,11 +412,11 @@ PropertiesConfiguration config = builder
reflected by different default implementations of the
<code>Synchronizer</code> interface:
<ul>
- <li><code><a href="../apidocs/org/apache/commons/configuration/sync/NoOpSynchronizer.html">
+ <li><code><a href="../apidocs/org/apache/commons/configuration2/sync/NoOpSynchronizer.html">
NoOpSynchronizer</a></code> does not use any synchronization at all.
This is the option of choice for single-threaded access, but fails in a
multi-threaded environment.</li>
- <li><code><a href="../apidocs/org/apache/commons/configuration/sync/ReadWriteSynchronizer.html">
+ <li><code><a href="../apidocs/org/apache/commons/configuration2/sync/ReadWriteSynchronizer.html">
ReadWriteSynchronizer</a></code> implements synchronization based on a
read/write lock.</li>
</ul>
@@ -435,7 +435,7 @@ PropertiesConfiguration config = builder
</p>
<p>
Hierarchical configurations derived from
- <code><a href="../apidocs/org/apache/commons/configuration/BaseHierarchicalConfiguration.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/BaseHierarchicalConfiguration.html">
BaseHierarchicalConfiguration</a></code> now use a new implementation
which allows for concurrent access without locking. So this group of
configurations can be used without having to set a fully-functional
@@ -448,14 +448,14 @@ PropertiesConfiguration config = builder
<li>Some classes have been made immutable, passing all information to the
constructor rather than using bean-style properties for their
initialization. An example is
- <code><a href="../apidocs/org/apache/commons/configuration/tree/DefaultExpressionEngine.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/tree/DefaultExpressionEngine.html">
DefaultExpressionEngine</a></code> whose instances can now be shared between
different hierarchical configuration objects.</li>
<li>Static utility classes with state have been rewritten so that they
can be instantiated. Mutable static fields are in general
thread-hostile. Refer to
<a href="https://issues.apache.org/jira/browse/CONFIGURATION-486">CONFIGURATION-486</a>
- for further details.</li>
+ for further details.</li>
</ul>
</p>
<p>
@@ -473,21 +473,21 @@ PropertiesConfiguration config = builder
events generated by configuration builders and reloading events. Despite
this increased number of event sources, there is now only a single event
listener interface
- (<code><a href="../apidocs/org/apache/commons/configuration/event/EventListener.html">
+ (<code><a href="../apidocs/org/apache/commons/configuration2/event/EventListener.html">
EventListener</a></code>), and the mechanisms for adding and removing event
listeners are the same everywhere; the basic protocol is defined by the
- <code><a href="../apidocs/org/apache/commons/configuration/event/EventSource.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/event/EventSource.html">
EventSource</a></code> interface. (Note that <code>EventSource</code> used
to be a class in version 1.x; it actually was the base class of
<code>AbstractConfiguration</code> and therefore inherited by all concrete
configuration implementations. In version 2.0 this role has been taken
- over by the <code><a href="../apidocs/org/apache/commons/configuration/event/BaseEventSource.html">
+ over by the <code><a href="../apidocs/org/apache/commons/configuration2/event/BaseEventSource.html">
BaseEventSource</a></code> class.)
</p>
<p>
While the old version used numeric constants to define specific event types,
the new events are classified by instances of the
- <code><a href="../apidocs/org/apache/commons/configuration/event/EventType.html">
+ <code><a href="../apidocs/org/apache/commons/configuration2/event/EventType.html">
EventType</a></code> class. Event types can be used to determine the
semantic meaning of an event, but also for filtering for specific events.
They stand in a logic hierarchical relation with each other; an event
@@ -501,7 +501,7 @@ PropertiesConfiguration config = builder
the registration of a change listener at a single configuration instance.
To achieve an equivalent effect with the new API, one would implement an
event listener and register it for the event type
- <code><a href="../apidocs/org/apache/commons/configuration/event/ConfigurationEvent.html#ANY">
+ <code><a href="../apidocs/org/apache/commons/configuration2/event/ConfigurationEvent.html#ANY">
ConfigurationEvent.ANY</a></code>. This listener will then receive
notifications for all kinds of updates performed on the monitored
configuration. Structure and content of these events is nearly