Skip to content

Commit

Permalink
Port from Doxia 1 to 2
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Jan 28, 2025
1 parent c641a27 commit 325a5e4
Show file tree
Hide file tree
Showing 17 changed files with 100 additions and 65 deletions.
62 changes: 33 additions & 29 deletions src/site/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,36 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="Lang">
<bannerRight>
<name>Commons Lang</name>
<src>/images/logo.png</src>
<href>/index.html</href>
</bannerRight>

<body>
<menu name="Lang">
<item name="Overview" href="/index.html" />
<item name="Download" href="/download_lang.cgi" />
<item name="Users guide" href="/userguide.html" />
<item name="Release History" href="/changes.html" />
<item name="Javadoc" href="/apidocs/index.html" />
<item name="Javadoc Archive" href="https://javadoc.io/doc/org.apache.commons/commons-lang3" />
</menu>

<menu name="Development">
<item name="Building" href="/building.html" />
<item name="Mailing Lists" href="/mail-lists.html" />
<item name="Issue Tracking" href="/issue-tracking.html" />
<item name="Proposal" href="/proposal.html" />
<item name="Developer guide" href="/developerguide.html" />
<item name="Source Repository" href="/scm.html" />
</menu>

</body>

</project>
<site xmlns="http://maven.apache.org/SITE/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0 https://maven.apache.org/xsd/site-2.0.0.xsd"
name="Apache Commons Lang">
<bannerRight name="Commons Lang" href="/index.html">
<image src="/images/logo.png"/>
</bannerRight>
<body>
<menu name="Commons BCEL">
<!-- Start: For all components. -->
<item name="About" href="/index.html" />
<item name="Asking Questions" href="/mail-lists.html" />
<item name="Release History" href="/changes.html" />
<item name="Issue Tracking" href="/issue-management.html" />
<item name="Dependency Management" href="/dependency-info.html" />
<item name="Sources" href="/scm.html" />
<item name="Security" href="/security.html" />
<item name="License" href="https://www.apache.org/licenses/LICENSE-2.0" />
<item name="Code of Conduct" href="https://www.apache.org/foundation/policies/conduct.html" />
<item name="Download" href="/download_lang.cgi" />
<item name="Javadoc">
<item name="Javadoc Current" href="/apidocs/index.html" />
<item name="Javadoc Archive" href="https://javadoc.io/doc/org.apache.commons/commons-lang3" />
</item>
<!-- End: For all components. -->
<!-- Specific to this component: -->
<item name="Users guide" href="/userguide.html" />
<item name="Building" href="/building.html" />
<item name="Proposal" href="/proposal.html" />
<item name="Developer guide" href="/developerguide.html" />
</menu>
</body>
</site>
23 changes: 12 additions & 11 deletions src/site/xdoc/article2_4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
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>What's new in Commons Lang 2.4?</title>
<author email="[email protected]">Commons Documentation Team</author>
Expand All @@ -26,6 +28,7 @@ limitations under the License.
<p>Commons Lang 2.4 is out, and the obvious question is: <em>"So what? What's changed?"</em>.</p>
<p>This article aims to briefly cover the changes and save you from having to dig through each JIRA
issue to see what went on in the year of development between Lang 2.3 and 2.4.</p>
</section>
<section name="Deprecations">
<p>First, let us start with a couple of deprecations. As you can see in the release notes, we chose
to deprecate the <a href="https://commons.apache.org/proper/commons-lang/javadocs/api-2.4/org/apache/commons/lang/ObjectUtils.html#appendIdentityToString(java.lang.StringBuffer,%20java.lang.Object)"><code>ObjectUtils.appendIdentityToString(StringBuffer, Object)</code></a> method as its
Expand Down Expand Up @@ -60,7 +63,7 @@ followed by a four-digit number, and that it is customary within our organizatio
with a hyphen following the department identifier. Here we'll represent the EIN as a simple
String (of course in real life we would likely create a class composed of department and number).
We can create a custom <code>Format</code> class:
<pre><code>
<source>
public class EINFormat extends Format {
private char[] idMask;

Expand Down Expand Up @@ -92,10 +95,10 @@ public class EINFormat extends Format {
return source.substring(idx, endIdx).deleteCharAt(2);
}
}
</code></pre>
</source>
Our custom EIN format is made available for <code>MessageFormat</code>-style processing by a
<code>FormatFactory</code> implementation:
<pre><code>
<source>
public class EINFormatFactory implements FormatFactory {
public static final String EIN_FORMAT = "ein";
public Format getFormat(String name, String arguments, Locale locale) {
Expand All @@ -108,19 +111,19 @@ public class EINFormatFactory implements FormatFactory {
return null;
}
}
</code></pre>
</source>

Now you simply provide a <code>java.util.Map&lt;String, FormatFactory&gt;</code> registry (keyed
by format type) to <code>ExtendedMessageFormat</code>:
<pre><code>
<source>
new ExtendedMessageFormat("EIN: {0,ein}", Collections.singletonMap(EINFormatFactory.EIN_FORMAT, new EINFormatFactory()));
</code></pre>
</source>
As expected, this will render a String EIN "AA9999" as: <code>"EIN: AA-9999"</code>.
<br /> <br />
If we wanted to trigger the EIN masking code, we could trigger that in the format pattern:
<pre><code>
<source>
new ExtendedMessageFormat("EIN: {0,ein,#}", Collections.singletonMap(EINFormatFactory.EIN_FORMAT, new EINFormatFactory()));
</code></pre>
</source>
This should render "AA9999" as: <code>"EIN: AA-####"</code>.
<br /> <br />
You can also use <code>ExtendedMessageFormat</code> to override any or all of the built-in
Expand Down Expand Up @@ -189,7 +192,5 @@ and fortunately there are some nice groupings that we can discuss instead:</p>
<p>Hopefully that was all of interest. Don't forget to download <a href="https://commons.apache.org/lang/download_lang.cgi">Lang 2.4</a>, or, for the Maven repository users, upgrade your &lt;version&gt; tag to 2.4. Please feel free to raise any questions you might have on the <a href="mail-lists.html">mailing lists</a>, and report bugs or enhancements in the <a href="issue-tracking.html">issue tracker</a>.</p>
</section>

</section>

</body>
</document>
7 changes: 4 additions & 3 deletions src/site/xdoc/article2_5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
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>What's new in Commons Lang 2.5?</title>
<author email="[email protected]">Commons Documentation Team</author>
Expand All @@ -28,6 +30,7 @@ limitations under the License.
issue to see what went on in the two years of development between Lang 2.4 and 2.5.</p>
<p>Two years?!? Yes, it's true. The reason is that 2.5 represents the backwards compatible changes in the
nearly complete Java-5 focused Lang 3.0. </p>
</section>
<section name="Deprecations">
<p>There were no new deprecations in 2.5. </p>
</section>
Expand Down Expand Up @@ -129,7 +132,5 @@ ToStringStyle meant that containers could end up with memory leaks. This was rew
<p>Hopefully that was all of interest. Don't forget to download <a href="https://commons.apache.org/lang/download_lang.cgi">Lang 2.5</a>, or, for the Maven repository users, upgrade your &lt;version&gt; tag to 2.5. Please feel free to raise any questions you might have on the <a href="mail-lists.html">mailing lists</a>, and report bugs or enhancements in the <a href="issue-tracking.html">issue tracker</a>.</p>
</section>

</section>

</body>
</document>
9 changes: 5 additions & 4 deletions src/site/xdoc/article3_0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
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>What's new in Commons Lang 3.0?</title>
<author email="[email protected]">Commons Documentation Team</author>
Expand All @@ -24,6 +26,7 @@ limitations under the License.

<section name="What's new in Commons Lang 3.0?">
<p>Commons Lang 3.0 is out, and the obvious question is: <em>"So what? What's changed?"</em>.</p>
</section>
<section name="The big story">
<p>Lang is now Java 5 based. We've generified the API, moved certain APIs to support <code>varargs</code> and thrown out any features
that are now supported by Java itself. We've removed the deprecated parts of the API and have also removed some features that
Expand Down Expand Up @@ -84,11 +87,11 @@ some additional classes in this area which are intended to further simplify the
development of concurrent applications.</p>
<p>The classes located in the <code>concurrent</code> package can be roughly
divided into the following categories:
</p>
<ul>
<li>Utility classes</li>
<li>Initializer classes</li>
</ul>
</p>
<p>Classes of the former category provide some basic functionality a developer
typically has to implement manually again and again. Examples are a configurable
<code>ThreadFactory</code> implementation or utility methods for the handling of
Expand Down Expand Up @@ -202,7 +205,5 @@ general-purpose mechanism to raise an <code>IllegalArgumentException</code>.</li
</section>
-->

</section>

</body>
</document>
4 changes: 3 additions & 1 deletion src/site/xdoc/building.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
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>Building</title>
<author email="[email protected]">Commons Documentation Team</author>
Expand Down
6 changes: 4 additions & 2 deletions src/site/xdoc/developerguide.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
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>Developer guide for Commons "Lang"</title>
</properties>
Expand Down Expand Up @@ -140,11 +142,11 @@ The currently targeted version of Java is 1.6.
</p>
<p>
To build Lang:
</p>
<table>
<tr><th></th><th>Tested JAR</th><th>Distribution</th><th>Site</th></tr>
<tr><td>Maven 2.x</td><td><code>mvn package</code></td><td>mvn assembly:assembly</td><td>mvn site</td></tr>
</table>
</p>
</section>
</body>
</document>
4 changes: 3 additions & 1 deletion src/site/xdoc/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
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>Home</title>
<author email="[email protected]">Commons Documentation Team</author>
Expand Down
9 changes: 6 additions & 3 deletions src/site/xdoc/proposal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
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>Proposal for Lang Package</title>
</properties>
Expand Down Expand Up @@ -83,13 +85,14 @@ several existing components in the open source world.</p>
</subsection>
<subsection name="(4) Initial Committers">

<p>The initial committers on the Lang component shall be as follows:
<p>
The initial committers on the Lang component shall be as follows:
</p>
<ul>
<li>Henri Yandell (bayard)</li>
<li>Daniel Rall (dlr)</li>
<li>Stephen Colebourne (scolebourne)</li>
</ul>
</p>

</subsection>
</section>
Expand Down
4 changes: 3 additions & 1 deletion src/site/xdoc/upgradeto2_0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
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>2.0 Release Notes</title>
<author email="[email protected]">Commons Documentation Team</author>
Expand Down
4 changes: 3 additions & 1 deletion src/site/xdoc/upgradeto2_1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
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>2.1 Release Notes</title>
<author email="[email protected]">Commons Documentation Team</author>
Expand Down
4 changes: 3 additions & 1 deletion src/site/xdoc/upgradeto2_2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
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>2.2 Release Notes</title>
<author email="[email protected]">Commons Documentation Team</author>
Expand Down
4 changes: 3 additions & 1 deletion src/site/xdoc/upgradeto2_3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
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>2.3 Release Notes</title>
<author email="[email protected]">Commons Documentation Team</author>
Expand Down
4 changes: 3 additions & 1 deletion src/site/xdoc/upgradeto2_4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
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>2.4 Release Notes</title>
<author email="[email protected]">Commons Documentation Team</author>
Expand Down
4 changes: 3 additions & 1 deletion src/site/xdoc/upgradeto2_5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
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>2.5 Release Notes</title>
<author email="[email protected]">Commons Documentation Team</author>
Expand Down
4 changes: 3 additions & 1 deletion src/site/xdoc/upgradeto2_6.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
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>2.6 Release Notes</title>
<author email="[email protected]">Commons Documentation Team</author>
Expand Down
4 changes: 3 additions & 1 deletion src/site/xdoc/upgradeto3_0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
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>Upgrade from 2.5 to 3.0</title>
<author email="[email protected]">Commons Documentation Team</author>
Expand Down
9 changes: 6 additions & 3 deletions src/site/xdoc/userguide.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ See the License for the specific language governing permissions and
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>Commons Lang - User guide</title>
<author email="[email protected]">Commons Documentation Team</author>
Expand All @@ -26,7 +27,9 @@ limitations under the License.
<body>

<section name='User guide for Commons "Lang"'>
Looking for the User Guide? It has been moved to the package <a href="javadocs/api-release/index.html">Javadoc</a>.
<p>
The User Guide has moved to the package <a href="javadocs/api-release/index.html">Javadoc</a>.
</p>
</section>

</body>
Expand Down

0 comments on commit 325a5e4

Please sign in to comment.