Skip to content

Commit

Permalink
Port site from Doxia 1 to 2
Browse files Browse the repository at this point in the history
Fix HTML
  • Loading branch information
garydgregory committed Feb 7, 2025
1 parent 2102c20 commit fd671f0
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 47 deletions.
11 changes: 6 additions & 5 deletions src/site/xdoc/userguide/howto_reloading.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
limitations under the License.
-->

<document>

<document xmlns="http://maven.apache.org/XDOC/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>Reloading</title>
</properties>
Expand Down Expand Up @@ -58,6 +59,7 @@
a configuration source actively for changes; it only has to be able to
detect a change when it is triggered. This is reflected in the methods
defined by the <code>ReloadingDetector</code> interface:
</p>
<ul>
<li>The <code>isReloadingRequired()</code> method is called to trigger
a check. The detector has to determine whether something has changed on
Expand All @@ -67,7 +69,6 @@
opportunity to reset itself so that new changes on the associated
configuration source can be detected.</li>
</ul>
</p>
<p>
The next component taking part in reloading is an instance of the
<code><a href="../apidocs/org/apache/commons/configuration2/reloading/ReloadingController.html">
Expand Down Expand Up @@ -249,6 +250,7 @@ trigger.start();
parameters for file-based configurations and defined by the
<code><a href="../apidocs/org/apache/commons/configuration2/builder/FileBasedBuilderProperties.html">
FileBasedBuilderProperties</a></code> interface:
</p>
<ul>
<li>The <code><a href="../apidocs/org/apache/commons/configuration2/builder/ReloadingDetectorFactory.html">
ReloadingDetectorFactory</a></code> to be used when the reloading
Expand All @@ -263,7 +265,6 @@ trigger.start();
value can be used to improve performance if there are many accesses to
a configuration builder in short intervals.</li>
</ul>
</p>
</subsection>

<subsection name="Generic Reloading Support">
Expand Down Expand Up @@ -294,6 +295,7 @@ trigger.start();
</p>
<p>
So the recipe to activate reloading for a builder instance is as follows:
</p>
<ul>
<li>Create and initialize the builder instance as usual.</li>
<li>Create a <code>ReloadingDetector</code> which is able to monitor
Expand All @@ -311,7 +313,6 @@ trigger.start();
of time (e.g. initiate a corresponding trigger as described earlier in
this chapter.</li>
</ul>
</p>
</subsection>

<subsection name="Reloading Checks on Builder Access">
Expand Down
12 changes: 7 additions & 5 deletions src/site/xdoc/userguide/howto_utilities.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
limitations under the License.
-->

<document>

<document xmlns="http://maven.apache.org/XDOC/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>Utility classes and Tips and Tricks Howto</title>
<author email="oheger@apache.org">Oliver Heger</author>
Expand All @@ -41,6 +42,7 @@
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:
</p>
<ul>
<li><code>append()</code> takes the configuration to be copied
as argument and adds all of its properties to the current configuration.</li>
Expand All @@ -49,7 +51,6 @@
configuration are replaced by the properties of the source configuration.
</li>
</ul>
</p>
<p>
These methods work fine if the target configuration is not a hierarchical
configuration. If a hierarchical configuration is to be copied into
Expand All @@ -58,6 +59,7 @@
properties of the source configuration, but the specific parent-child
relations will probably be lost. If a hierarchical configuration needs to
be copied, there are the following options:
</p>
<ul>
<li>The <code>clone()</code> method can be used to create a copy of a
hierarchical configuration. This also works for non-hierarchical
Expand All @@ -74,7 +76,6 @@
copies the content of the specified configuration into the newly created
object.</li>
</ul>
</p>
</subsection>

<subsection name="Converting a flat configuration into a hierarchical one">
Expand Down Expand Up @@ -364,12 +365,13 @@ Configuration config = wrapperFactory.createBuilderConfigurationWrapper(
with Spring's <code>PropertiesLoaderSupport</code>.

This allows a configuration object to behave
</p>
<ul>
<li>like a normal <code>java.util.Properties</code> object which can be passed on to</li>
<li><code>setProperties()</code> method allowing <code>PropertyOverrideConfigurer</code> and</li>
<li><code>PropertyPlaceholderConfigurer</code> to take advantage of Commons Configuration.</li>
</ul>

<p>
Previously this functionality was provided by the spring-modules-jakarta-commons library (<code>CommonsConfigurationFactoryBean</code>).
As this library is no longer maintained, this is now supported directly by Commons Configuration.
If you've used this with Commons Configuration 1.x, just replace the spring-modules-jakarta-commons classname with
Expand Down
7 changes: 4 additions & 3 deletions src/site/xdoc/userguide/howto_xml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
limitations under the License.
-->

<document>

<document xmlns="http://maven.apache.org/XDOC/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>XML Configurations</title>
</properties>
Expand Down Expand Up @@ -260,14 +261,14 @@ XMLConfiguration config = builder.getConfiguration();
<code><a href="../apidocs/org/apache/commons/configuration2/builder/XMLBuilderProperties.html">
XMLBuilderProperties</a></code> interface defines settings specific to
XML configurations. This includes
</p>
<ul>
<li>a custom <code>DocumentBuilder</code></li>
<li>a custom <code>EntityResolver</code></li>
<li>flags whether the XML document is to be validated and how this
validation is to be performed</li>
<li>the public and the system ID of the document when it is written</li>
</ul>
</p>
<p>
A parameters object for an XML configuration can be obtained using
the <code>xml()</code> method of a
Expand Down
11 changes: 7 additions & 4 deletions src/site/xdoc/userguide/overview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
limitations under the License.
-->

<document>
<document xmlns="http://maven.apache.org/XDOC/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>Configuration Overview</title>
<author email="epugh@upstate.com">Eric Pugh</author>
Expand Down Expand Up @@ -45,6 +47,7 @@
by just using a Configuration object versus a specific type like XMLConfiguration or
JNDIConfiguration, you are sheltered from the mechanics of actually retrieving the
configuration values. These various sources include:
</p>
<ul>
<li>
<strong>EnvironmentConfiguration</strong>
Expand Down Expand Up @@ -90,8 +93,6 @@
and converts it to a Configuration object.
</li>
</ul>

</p>
</subsection>

<subsection name="The Configuration interface">
Expand Down Expand Up @@ -124,6 +125,7 @@
overloaded variants of all methods that allow to specify a default value,
which will be returned if the property cannot be found. The following
data types are supported out of the box:
</p>
<ul>
<li>BigDecimal</li>
<li>BigInteger</li>
Expand All @@ -136,6 +138,7 @@
<li>short</li>
<li>String</li>
</ul>
<p>
The names of these methods start with <code>get</code> followed by their
data type. The <code>getString()</code> method for instance will return
String values, <code>getInt()</code> will operate on integers.
Expand Down Expand Up @@ -164,6 +167,7 @@
<p>
For manipulating properties or their values the following methods can
be used:
</p>
<dl>
<dt><code>addProperty()</code></dt>
<dd>Adds a new property to the configuration. If this property already
Expand All @@ -178,7 +182,6 @@
<dt><code>clear()</code></dt>
<dd>Wipes out the whole configuration</dd>
</dl>
</p>
</subsection>

<subsection name="Immutable Configurations">
Expand Down
5 changes: 3 additions & 2 deletions src/site/xdoc/userguide/quick_start.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
limitations under the License.
-->

<document>

<document xmlns="http://maven.apache.org/XDOC/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>Quick start</title>
</properties>
Expand Down
15 changes: 8 additions & 7 deletions src/site/xdoc/userguide/upgradeto2_0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
limitations under the License.
-->

<document>

<document xmlns="http://maven.apache.org/XDOC/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>Migration Guide: 1.x to 2.0</title>
</properties>
Expand All @@ -31,7 +32,6 @@
areas in which major changes have been implemented; here problems are
likely to be encountered during migration. It has the following content:
</p>
<p>
<ul>
<li><a href="#Introduction">Introduction</a></li>
<li><a href="#Structural_Changes">Structural Changes</a></li>
Expand All @@ -42,7 +42,6 @@
<li><a href="#Concurrency_Issues">Concurrency Issues</a></li>
<li><a href="#Events">Events</a></li>
</ul>
</p>

<subsection name="Introduction">
<p>
Expand Down Expand Up @@ -207,6 +206,7 @@ config.setListDelimiter(';');
]]></source>
<p>
While this code is easy to write, there are some non-obvious problems:
</p>
<ul>
<li>Some settings influence the loading of the configuration data. In
this example, the definition of the list delimiter and the
Expand All @@ -219,7 +219,6 @@ config.setListDelimiter(';');
<li>The various set methods are not thread-safe; if this configuration
instance is to be accessed from another thread, there may be problems.</li>
</ul>
</p>
<p>
To overcome these problems, <em>Commons Configuration</em> uses a
different approach for the creation of configuration objects based on
Expand Down Expand Up @@ -310,11 +309,11 @@ PropertiesConfiguration config = builder.getConfiguration();
creating a
<a href="howto_combinedbuilder.html#Combining_Configuration_Sources">combined
configuration</a> out of multiple sources:
</p>
<ul>
<li>The already deprecated <code>ConfigurationFactory</code> class</li>
<li>The <code>DefaultConfigurationBuilder</code> class</li>
</ul>
</p>
<p>
The former has been removed. The functionality provided by
<code>DefaultConfigurationBuilder</code> is still available, but the
Expand Down Expand Up @@ -411,6 +410,7 @@ PropertiesConfiguration config = builder.getConfiguration();
thread, there is no need for any synchronization. Typical usage modes are
reflected by different default implementations of the
<code>Synchronizer</code> interface:
</p>
<ul>
<li><code><a href="../apidocs/org/apache/commons/configuration2/sync/NoOpSynchronizer.html">
NoOpSynchronizer</a></code> does not use any synchronization at all.
Expand All @@ -420,6 +420,7 @@ PropertiesConfiguration config = builder.getConfiguration();
ReadWriteSynchronizer</a></code> implements synchronization based on a
read/write lock.</li>
</ul>
<p>
Note that the default option is <code>NoOpSynchronizer</code>. This means
that configuration objects are not thread-safe per default! You have to
change the synchronizer in order to make them safe for concurrent access.
Expand All @@ -444,6 +445,7 @@ PropertiesConfiguration config = builder.getConfiguration();
<p>
There are some other changes on classes with the goal to make them
well-behaving citizens in a concurrent environment. This includes:
</p>
<ul>
<li>Some classes have been made immutable, passing all information to the
constructor rather than using bean-style properties for their
Expand All @@ -457,7 +459,6 @@ PropertiesConfiguration config = builder.getConfiguration();
<a href="https://issues.apache.org/jira/browse/CONFIGURATION-486">CONFIGURATION-486</a>
for further details.</li>
</ul>
</p>
<p>
Please refer to <a href="howto_concurrency.html">Configurations and
Concurrent Access</a> for a full description of this complex topic.
Expand Down
5 changes: 3 additions & 2 deletions src/site/xdoc/userguide/upgradeto2_x.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
limitations under the License.
-->

<document>

<document xmlns="http://maven.apache.org/XDOC/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>Migration Guide: 2.x</title>
</properties>
Expand Down
Loading

0 comments on commit fd671f0

Please sign in to comment.