diff options
| author | Arnaud Vandyck <avdyk@debian.org> | 2005-02-28 12:26:04 +0100 |
|---|---|---|
| committer | git-ubuntu importer <ubuntu-devel-discuss@lists.ubuntu.com> | 2005-12-21 05:22:22 +0000 |
| commit | cafbb23b938a619b2c5e894edb23294dc2392011 (patch) | |
| tree | 44c4e57834e37cf28b7a297d3a0311e01643d6bb | |
| parent | 2a006c8ca19022829dd030c7a03aba8569c1380d (diff) | |
1:1.1.4-2 (patches unapplied)import/1%1.1.4-2ubuntu/breezy-develubuntu/breezy
Imported using git-ubuntu import.
Notes
Notes:
* generate the javadoc
* new upstream release
* corrected the release number (closes: #282218)
* added a debian/watch file
| -rw-r--r-- | build.xml.orig | 380 | ||||
| -rw-r--r-- | debian/ant.properties | 1 | ||||
| -rw-r--r-- | debian/changelog | 14 | ||||
| -rw-r--r-- | debian/conf/share/MANIFEST.MF (renamed from conf/share/MANIFEST.MF) | 0 | ||||
| -rw-r--r-- | debian/conf/share/ValidatorCheckStyle.xml (renamed from conf/share/ValidatorCheckStyle.xml) | 0 | ||||
| -rw-r--r-- | debian/conf/share/validator_1_0.dtd (renamed from conf/share/validator_1_0.dtd) | 0 | ||||
| -rw-r--r-- | debian/conf/share/validator_1_0_1.dtd (renamed from conf/share/validator_1_0_1.dtd) | 0 | ||||
| -rw-r--r-- | debian/conf/share/validator_1_1.dtd (renamed from conf/share/validator_1_1.dtd) | 0 | ||||
| -rw-r--r-- | debian/conf/share/validator_1_2_0.dtd (renamed from conf/share/validator_1_2_0.dtd) | 0 | ||||
| -rw-r--r-- | debian/patches/01_dont_copy_RELEASE-NOTES.patch (renamed from debian/patches/01_build_without_javadoc.patch) | 12 | ||||
| -rwxr-xr-x | debian/rules | 10 | ||||
| -rw-r--r-- | debian/watch | 2 | ||||
| -rw-r--r-- | maven.xml | 18 | ||||
| -rw-r--r-- | project.xml | 2 | ||||
| -rw-r--r-- | src/share/org/apache/commons/validator/Field.java | 36 | ||||
| -rw-r--r-- | src/share/org/apache/commons/validator/Msg.java | 36 | ||||
| -rw-r--r-- | xdocs/changes.xml | 28 | ||||
| -rw-r--r-- | xdocs/downloads.xml | 35 |
18 files changed, 146 insertions, 428 deletions
diff --git a/build.xml.orig b/build.xml.orig deleted file mode 100644 index caaf6f7..0000000 --- a/build.xml.orig +++ /dev/null @@ -1,380 +0,0 @@ -<!--
- Copyright 2003-2004 The Apache Software Foundation
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- 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.
--->
-<project name="Validator" default="dist" basedir=".">
-
-
-<!--
- "Validator" component of the Jakarta Commons Subproject
- $Id: build.xml,v 1.32.2.1 2004/04/13 05:52:15 rleland Exp $
--->
-
-
-<!-- ========== Initialize Properties ===================================== -->
-
-
- <property file="build.properties"/> <!-- Component local -->
- <property file="../build.properties"/> <!-- Commons local -->
- <property file="${user.home}/build.properties"/> <!-- User local -->
-
-
-<!-- ========== External Dependencies ===================================== -->
-
-
- <!-- The directories corresponding to your necessary dependencies -->
- <property name="junit.home" value="/usr/local/junit3.8.1"/>
- <property name="commons.home" value="../../jakarta-commons"/>
- <property name="sandbox.home" value="../../jakarta-commons-sandbox"/>
- <property name="beanutils.home" value="${commons.home}/beanutils"/>
- <property name="collections.home" value="${commons.home}/collections"/>
- <property name="digester.home" value="${commons.home}/digester"/>
- <property name="logging.home" value="${commons.home}/logging"/>
-
-
-<!-- ========== Derived Values ============================================ -->
-
-
- <!-- The locations of necessary jar files -->
- <property name="junit.jar" value="${junit.home}/junit.jar"/>
- <property name="commons-beanutils.jar" value="${beanutils.home}/dist/commons-beanutils.jar"/>
- <property name="commons-collections.jar" value="${collections.home}/dist/commons-collections.jar"/>
- <property name="commons-digester.jar" value="${digester.home}/dist/commons-digester.jar"/>
- <property name="commons-logging.jar" value="${logging.home}/dist/commons-logging.jar"/>
-
-
-<!-- ========== Component Declarations ==================================== -->
-
-
- <!-- The name of this component -->
- <property name="component.name" value="validator"/>
-
- <!-- The primary package name of this component -->
- <property name="component.package" value="org.apache.commons.validator"/>
-
- <!-- The title of this component -->
- <property name="component.title" value="Validator"/>
-
- <!-- The current version number of this component -->
- <property name="component.version" value="1.1.3-dev"/>
-
- <!-- The base directory for compilation targets -->
- <property name="build.home" value="target"/>
-
- <!-- The base directory for component configuration files -->
- <property name="conf.home" value="conf/share"/>
-
- <!-- The base directory for distribution targets -->
- <property name="dist.home" value="dist"/>
-
- <!-- The base directory for release targets -->
- <property name="release.home" value="release" />
-
- <!-- The base directory for component sources -->
- <property name="source.home" value="src/share"/>
-
- <!-- The base directory for javascript sources -->
- <property name="javascript.home" value="src/javascript"/>
-
- <!-- The base directory for unit test sources -->
- <property name="test.home" value="src/test"/>
-
- <!-- The base directory for example sources -->
- <property name="example.home" value="src/example"/>
-
- <!-- Directory where binary release files are staged -->
- <property name="stage.bin.dir" value="${release.home}/stage/bin"/>
-
- <!-- Directory where source release files are staged -->
- <property name="stage.src.dir" value="${release.home}/stage/src"/>
-
- <!-- Directory where release builds are prepared for upload -->
- <property name="upload.dir" value="${release.home}/upload"/>
-
- <!-- Base file name for upload files -->
- <property name="upload.file.base" value="${component.name}-${component.version}"/>
-
-
-<!-- ========== Compiler Defaults ========================================= -->
-
-
- <!-- Should Java compilations set the 'debug' compiler option? -->
- <property name="compile.debug" value="true"/>
-
- <!-- Should Java compilations set the 'deprecation' compiler option? -->
- <property name="compile.deprecation" value="false"/>
-
- <!-- Should Java compilations set the 'optimize' compiler option? -->
- <property name="compile.optimize" value="true"/>
-
- <!-- Construct compile classpath -->
- <path id="compile.classpath">
- <pathelement location="${build.home}/classes"/>
- <pathelement location="${commons-beanutils.jar}"/>
- <pathelement location="${commons-collections.jar}"/>
- <pathelement location="${commons-digester.jar}"/>
- <pathelement location="${commons-logging.jar}"/>
- <pathelement location="${oro.jar}"/>
- </path>
-
-
-<!-- ========== Test Execution Defaults =================================== -->
-
-
- <!-- Construct unit test classpath -->
- <path id="test.classpath">
- <pathelement location="${build.home}/classes"/>
- <pathelement location="${build.home}/tests"/>
- <pathelement location="${commons-beanutils.jar}"/>
- <pathelement location="${commons-collections.jar}"/>
- <pathelement location="${commons-digester.jar}"/>
- <pathelement location="${commons-logging.jar}"/>
- <pathelement location="${oro.jar}"/>
- <pathelement location="${junit.jar}"/>
- <pathelement location="${xerces.jar}"/>
- </path>
-
- <!-- Should all tests fail if one does? -->
- <property name="test.failonerror" value="true"/>
-
- <!-- The test runner to execute -->
- <property name="test.runner" value="junit.textui.TestRunner"/>
-
-
-<!-- ========== Example Execution Defaults ================================ -->
-
-
- <!-- Construct example classpath -->
- <path id="example.classpath">
- <path refid="test.classpath"/>
- <pathelement location="${build.home}/example" />
- </path>
-
-
-<!-- ========== Executable Targets ======================================== -->
-
-
- <target name="init"
- description="Initialize and evaluate conditionals">
- <echo message="-------- ${component.name} ${component.version} --------"/>
- <filter token="name" value="${component.name}"/>
- <filter token="package" value="${component.package}"/>
- <filter token="version" value="${component.version}"/>
- </target>
-
-
- <target name="prepare" depends="init"
- description="Prepare build directory">
- <mkdir dir="${build.home}"/>
- <mkdir dir="${build.home}/classes"/>
- <mkdir dir="${build.home}/conf"/>
- <mkdir dir="${build.home}/tests"/>
- </target>
-
-
- <target name="static" depends="prepare"
- description="Copy static files to build directory">
- <tstamp/>
- <copy todir="${build.home}/conf" filtering="on">
- <fileset dir="${conf.home}" includes="*.MF"/>
- </copy>
- </target>
-
-
- <target name="compile" depends="static"
- description="Compile shareable components">
- <javac srcdir="${source.home}"
- destdir="${build.home}/classes"
- debug="${compile.debug}"
- deprecation="${compile.deprecation}"
- optimize="${compile.optimize}">
- <classpath refid="compile.classpath"/>
- </javac>
- <copy todir="${build.home}/classes" filtering="on">
- <fileset dir="${source.home}"
- excludes="**/*.java"/>
- </copy>
- <copy todir="${build.home}/classes/org/apache/commons/validator/resources/"
- file="${conf.home}/validator_1_0.dtd"/>
- <copy todir="${build.home}/classes/org/apache/commons/validator/resources/"
- file="${conf.home}/validator_1_0_1.dtd"/>
- <copy todir="${build.home}/classes/org/apache/commons/validator/resources/"
- file="${conf.home}/validator_1_1.dtd"/>
- <copy todir="${build.home}/classes/">
- <fileset dir="${javascript.home}"
- includes="**/*.js"/>
- </copy>
- </target>
-
-
- <target name="clean"
- description="Clean build and distribution directories">
- <delete dir="${build.home}"/>
- <delete dir="${dist.home}"/>
- <delete dir="${release.home}"/>
- </target>
-
-
- <target name="all" depends="clean,compile"
- description="Clean and compile all components"/>
-
-
- <target name="javadoc" depends="compile"
- description="Create component Javadoc documentation">
- <mkdir dir="${dist.home}"/>
- <mkdir dir="${dist.home}/docs"/>
- <mkdir dir="${dist.home}/docs/api"/>
- <javadoc sourcepath="${source.home}"
- destdir="${dist.home}/docs/api"
- packagenames="org.apache.commons.*"
- author="true"
- private="true"
- version="true"
- doctitle="<h1>${component.title} (Version ${component.version})</h1>"
- windowtitle="${component.title} (Version ${component.version})"
- bottom="Copyright (c) 2001-2004 Apache Software Foundation"
- classpathref="compile.classpath" />
- <exec executable="bash" failifexecutionfails="false">
- <arg line="-c 'etc/jsdoc.sh ${jsdoc.home} ${javascript.home} ${dist.home}/docs/api ' "/>
- </exec>
- </target>
-
- <target name="change-log" >
- <cvschangelog destfile="changelog.xml" start="${cvs.start}" />
- <style in="changelog.xml" out="changelog.html" style="${ant.home}/etc/changelog.xsl">
- <param name="title" expression="Validator ChangeLog"/>
- <param name="module" expression="commons"/>
- <param name="cvsweb" expression="http://cvs.apache.org/viewcvs/"/>
- </style>
- </target>
-
-
-
- <target name="dist" depends="compile,javadoc"
- description="Create binary distribution">
- <mkdir dir="${dist.home}"/>
- <copy file="LICENSE.txt"
- todir="${dist.home}"/>
- <copy file="RELEASE-NOTES.readme"
- todir="${dist.home}"/>
- <mkdir dir="${build.home}/classes/META-INF"/>
- <copy file="LICENSE.txt"
- tofile="${build.home}/classes/META-INF/LICENSE.txt"/>
- <jar jarfile="${dist.home}/commons-${component.name}.jar"
- basedir="${build.home}/classes"
- manifest="${build.home}/conf/MANIFEST.MF"/>
- </target>
-
-
-<!-- ========== Unit Test Targets ========================================= -->
-
-
- <target name="compile.tests" depends="compile"
- description="Compile unit test cases">
- <javac srcdir="${test.home}"
- destdir="${build.home}/tests"
- debug="${compile.debug}"
- deprecation="${compile.deprecation}"
- optimize="${compile.optimize}">
- <classpath refid="test.classpath"/>
- </javac>
- <copy todir="${build.home}/tests" filtering="on">
- <fileset dir="${test.home}" excludes="**/*.java"/>
- </copy>
- </target>
-
-
- <target name="test" depends="compile.tests"
- description="Run all unit test cases">
- <echo message="Running tests ..."/>
- <java classname="${test.runner}" fork="yes"
- failonerror="${test.failonerror}">
- <arg value="org.apache.commons.validator.ValidatorTestSuite"/>
- <classpath refid="test.classpath"/>
- </java>
- </target>
-
-
-<!-- ========== Example Targets =========================================== -->
-
-
- <target name="prepare.example" depends="compile"
- description="Prepare example directory">
- <mkdir dir="${build.home}/example"/>
- </target>
-
-
- <target name="compile.example" depends="prepare.example"
- description="Compile example application">
- <javac srcdir="${example.home}"
- destdir="${build.home}/example"
- debug="${compile.debug}"
- deprecation="${compile.deprecation}"
- optimize="${compile.optimize}">
- <classpath refid="example.classpath"/>
- </javac>
- <copy todir="${build.home}/example" filtering="on">
- <fileset dir="${example.home}" excludes="**/*.java"/>
- </copy>
- </target>
-
-
- <target name="example" depends="compile.example"
- description="Run example application">
- <java fork="yes"
- classname="org.apache.commons.validator.example.ValidateExample"
- taskname="main" failonerror="true">
- <classpath refid="example.classpath" />
- </java>
- </target>
-
-
-<!-- ========== Release Targets =========================================== -->
-
-
- <target name="release" depends="clean,dist"
- description="Construct release distribution">
- <mkdir dir="${stage.bin.dir}/${upload.file.base}"/>
- <mkdir dir="${stage.src.dir}/${upload.file.base}-src"/>
- <copy todir="${stage.bin.dir}/${upload.file.base}">
- <fileset dir="${dist.home}"/>
- </copy>
- <copy todir="${stage.src.dir}/${upload.file.base}-src">
- <fileset dir=".">
- <exclude name="build.properties"/>
- <exclude name="target/**"/>
- <exclude name="dist/**"/>
- <exclude name="release/**"/>
- </fileset>
- </copy>
- <mkdir dir="${upload.dir}"/>
- <zip zipfile="${upload.dir}/${upload.file.base}.zip"
- basedir="${stage.bin.dir}"/>
- <zip zipfile="${upload.dir}/${upload.file.base}-src.zip"
- basedir="${stage.src.dir}"/>
- <tar tarfile="${upload.dir}/${upload.file.base}.tar"
- basedir="${stage.bin.dir}"
- longfile="gnu"/>
- <tar tarfile="${upload.dir}/${upload.file.base}-src.tar"
- basedir="${stage.src.dir}"
- longfile="gnu"/>
- <gzip src="${upload.dir}/${upload.file.base}.tar"
- zipfile="${upload.dir}/${upload.file.base}.tar.gz"/>
- <gzip src="${upload.dir}/${upload.file.base}-src.tar"
- zipfile="${upload.dir}/${upload.file.base}-src.tar.gz"/>
- </target>
-
-
-</project>
-
diff --git a/debian/ant.properties b/debian/ant.properties index 501f4c6..162c33c 100644 --- a/debian/ant.properties +++ b/debian/ant.properties @@ -1,2 +1,3 @@ build.sysclasspath=only compile.target=1.3 +conf.home=debian/conf/share diff --git a/debian/changelog b/debian/changelog index 11431da..2504292 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +libcommons-validator-java (1:1.1.4-2) unstable; urgency=low + + * generate the javadoc + + -- Arnaud Vandyck <avdyk@debian.org> Mon, 28 Feb 2005 12:26:04 +0100 + +libcommons-validator-java (1:1.1.4-1) unstable; urgency=low + + * new upstream release + * corrected the release number (closes: #282218) + * added a debian/watch file + + -- Arnaud Vandyck <avdyk@debian.org> Mon, 7 Feb 2005 13:02:51 +0100 + libcommons-validator-java (1.3-1) unstable; urgency=low * New upstream release diff --git a/conf/share/MANIFEST.MF b/debian/conf/share/MANIFEST.MF index 2f6c767..2f6c767 100644 --- a/conf/share/MANIFEST.MF +++ b/debian/conf/share/MANIFEST.MF diff --git a/conf/share/ValidatorCheckStyle.xml b/debian/conf/share/ValidatorCheckStyle.xml index da62d76..da62d76 100644 --- a/conf/share/ValidatorCheckStyle.xml +++ b/debian/conf/share/ValidatorCheckStyle.xml diff --git a/conf/share/validator_1_0.dtd b/debian/conf/share/validator_1_0.dtd index 1be74fc..1be74fc 100644 --- a/conf/share/validator_1_0.dtd +++ b/debian/conf/share/validator_1_0.dtd diff --git a/conf/share/validator_1_0_1.dtd b/debian/conf/share/validator_1_0_1.dtd index 5ecd5b6..5ecd5b6 100644 --- a/conf/share/validator_1_0_1.dtd +++ b/debian/conf/share/validator_1_0_1.dtd diff --git a/conf/share/validator_1_1.dtd b/debian/conf/share/validator_1_1.dtd index a64bc0d..a64bc0d 100644 --- a/conf/share/validator_1_1.dtd +++ b/debian/conf/share/validator_1_1.dtd diff --git a/conf/share/validator_1_2_0.dtd b/debian/conf/share/validator_1_2_0.dtd index c2a2935..c2a2935 100644 --- a/conf/share/validator_1_2_0.dtd +++ b/debian/conf/share/validator_1_2_0.dtd diff --git a/debian/patches/01_build_without_javadoc.patch b/debian/patches/01_dont_copy_RELEASE-NOTES.patch index 6a6c7d0..4ab2245 100644 --- a/debian/patches/01_build_without_javadoc.patch +++ b/debian/patches/01_dont_copy_RELEASE-NOTES.patch @@ -1,12 +1,6 @@ ---- build.xml.orig 2004-11-19 14:10:34.454329416 +0100 -+++ build.xml 2004-11-19 14:14:07.767900824 +0100 -@@ -261,13 +261,13 @@ -
-
-
-- <target name="dist" depends="compile,javadoc"
-+ <target name="dist" depends="compile"
- description="Create binary distribution">
+--- build.xml.old 2005-02-28 12:27:18.794208328 +0100 ++++ build.xml 2005-02-28 12:28:25.453074640 +0100 +@@ -266,8 +266,8 @@ <mkdir dir="${dist.home}"/>
<copy file="LICENSE.txt"
todir="${dist.home}"/>
diff --git a/debian/rules b/debian/rules index dd7afba..a48fe1e 100755 --- a/debian/rules +++ b/debian/rules @@ -11,19 +11,19 @@ include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/ant.mk include /usr/share/cdbs/1/rules/simple-patchsys.mk -JAVA_HOME_DIRS := /usr/lib/fjsdk +JAVA_HOME_DIRS := /usr/lib/kaffe #JAVACMD := /usr/bin/java-sablevm ANT_HOME := /usr/share/ant1.6 -DEB_JARS := junit commons-beanutils commons-collections commons-digester commons-logging oro /usr/share/ant1.6/lib/ant-launcher.jar gnujaxp +DEB_JARS := junit commons-beanutils commons-collections commons-digester commons-logging oro gnujaxp /usr/share/ant1.6/lib/ant-launcher.jar DEB_ANT_COMPILER := jikes DEB_ANT_BUILD_TARGET := dist DEB_INSTALL_DIRS_ALL := usr/share/java usr/share/sgml/apache/jakarta/validator -DEB_INSTALL_DOCS_ALL := NOTICE.txt +DEB_INSTALL_DOCS_ALL := NOTICE.txt dist/docs/* #DEB_COMPRESS_EXCLUDE := LIBRARY=commons-validator -VERSION=1.3 +VERSION=1.1.4 clean:: # -rm dist/${LIBRARY}*.jar dist/commons-validator_1_0_1.dtd @@ -31,7 +31,7 @@ clean:: install/lib${LIBRARY}-java:: mv dist/${LIBRARY}.jar dist/${LIBRARY}-${VERSION}.jar - cp conf/share/*.dtd dist/ + cp debian/conf/share/*.dtd dist/ echo "dist/${LIBRARY}-${VERSION}.jar usr/share/java" > debian/install echo "dist/*.dtd usr/share/sgml/apache/jakarta/validator" >> debian/install echo "usr/share/java/${LIBRARY}-${VERSION}.jar usr/share/java/${LIBRARY}.jar" > debian/links diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..7bfd429 --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=2 +http://www.apache.org/dist/jakarta/commons/validator/source/commons-validator-(.*)-src\.tar\.gz debian uupdate @@ -16,6 +16,24 @@ <project default="java:jar">
+
+ <!-- ================================================================== -->
+ <!-- START : C O M M O N S - B U I L D -->
+ <!-- ================================================================== -->
+ <!-- Required: Look and Feel for documentation within distributions -->
+ <!-- ================================================================== -->
+ <postGoal name="xdoc:copy-resources">
+ <copy todir="${basedir}/target/docs/style/" failonerror="false">
+ <fileset dir="${basedir}/../commons-build/xdocs/style">
+ <include name='**/*'/>
+ <exclude name='**/CVS/**'/>
+ </fileset>
+ </copy>
+ </postGoal>
+ <!-- ================================================================== -->
+ <!-- END: C O M M O N S - B U I L D -->
+ <!-- ================================================================== -->
+
<preGoal name="xdoc:jelly-transform">
<attainGoal name="html2xdoc"/>
</preGoal>
diff --git a/project.xml b/project.xml index d9b667a..15735de 100644 --- a/project.xml +++ b/project.xml @@ -19,7 +19,7 @@ <extend>../commons-build/project.xml</extend>
<name>Validator</name>
<id>commons-validator</id>
- <currentVersion>1.1.3</currentVersion>
+ <currentVersion>1.1.4</currentVersion>
<inceptionYear>2002</inceptionYear>
<package>org.apache.commons.validator</package>
diff --git a/src/share/org/apache/commons/validator/Field.java b/src/share/org/apache/commons/validator/Field.java index 85e5cbc..368e7dc 100644 --- a/src/share/org/apache/commons/validator/Field.java +++ b/src/share/org/apache/commons/validator/Field.java @@ -1,7 +1,7 @@ /*
- * $Header: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Field.java,v 1.31.2.1 2004/06/22 02:24:38 husted Exp $
- * $Revision: 1.31.2.1 $
- * $Date: 2004/06/22 02:24:38 $
+ * $Header: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Field.java,v 1.31.2.3 2004/11/11 15:32:03 niallp Exp $
+ * $Revision: 1.31.2.3 $
+ * $Date: 2004/11/11 15:32:03 $
*
* ====================================================================
* Copyright 2001-2004 The Apache Software Foundation
@@ -239,14 +239,32 @@ public class Field implements Cloneable, Serializable { * Add a <code>Msg</code> to the <code>Field</code>.
*/
public void addMsg(Msg msg) {
- hMsgs.put(msg.getName(), msg.getKey());
+ hMsgs.put(msg.getName(), msg);
}
/**
* Retrieve a message value.
*/
public String getMsg(String key) {
- return (String) hMsgs.get(key);
+ Msg msg = getMessage(key);
+ return (msg == null) ? null : msg.getKey();
+ }
+
+ /**
+ * Retrieve a message object.
+ * @since Validator 1.1.4
+ */
+ public Msg getMessage(String key) {
+ return (Msg)hMsgs.get(key);
+ }
+
+ /**
+ * The <code>Field</code>'s messages are returned as an
+ * unmodifiable <code>Map</code>.
+ * @since Validator 1.1.4
+ */
+ public Map getMessages() {
+ return Collections.unmodifiableMap(hMsgs);
}
/**
@@ -627,11 +645,9 @@ public class Field implements Cloneable, Serializable { String varKey = TOKEN_START + TOKEN_VAR;
// Process Messages
if (key != null && !key.startsWith(varKey)) {
- for (Iterator i = hMsgs.keySet().iterator(); i.hasNext();) {
- String msgKey = (String) i.next();
- String value = this.getMsg(msgKey);
-
- hMsgs.put(msgKey, ValidatorUtils.replace(value, key, replaceValue));
+ for (Iterator i = hMsgs.values().iterator(); i.hasNext();) {
+ Msg msg = (Msg) i.next();
+ msg.setKey(ValidatorUtils.replace(msg.getKey(), key, replaceValue));
}
}
diff --git a/src/share/org/apache/commons/validator/Msg.java b/src/share/org/apache/commons/validator/Msg.java index 241da11..c8b2887 100644 --- a/src/share/org/apache/commons/validator/Msg.java +++ b/src/share/org/apache/commons/validator/Msg.java @@ -1,7 +1,7 @@ /*
- * $Header: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Msg.java,v 1.12 2004/02/21 17:10:29 rleland Exp $
- * $Revision: 1.12 $
- * $Date: 2004/02/21 17:10:29 $
+ * $Header: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Msg.java,v 1.12.2.2 2004/11/11 15:32:03 niallp Exp $
+ * $Revision: 1.12.2.2 $
+ * $Date: 2004/11/11 15:32:03 $
*
* ====================================================================
* Copyright 2001-2004 The Apache Software Foundation
@@ -49,6 +49,14 @@ public class Msg implements Cloneable, Serializable { protected String name = null;
/**
+ * Whether or not the key is a message resource (optional). Defaults to
+ * true. If it is 'true', the value will try to be resolved as a message
+ * resource.
+ * @since Validator 1.1.4
+ */
+ protected boolean resource = true;
+
+ /**
* Returns the resource bundle name.
* @since Validator 1.1
*/
@@ -94,6 +102,24 @@ public class Msg implements Cloneable, Serializable { }
/**
+ * Tests whether or not the key is a resource key or literal value.
+ * @return <code>true</code> if key is a resource key.
+ * @since Validator 1.1.4
+ */
+ public boolean isResource() {
+ return this.resource;
+ }
+
+ /**
+ * Sets whether or not the key is a resource.
+ * @param resource If true indicates the key is a resource.
+ * @since Validator 1.1.4
+ */
+ public void setResource(boolean resource) {
+ this.resource = resource;
+ }
+
+ /**
* Creates and returns a copy of this object.
*/
public Object clone() {
@@ -115,6 +141,10 @@ public class Msg implements Cloneable, Serializable { results.append(name);
results.append(" key=");
results.append(key);
+ results.append(" resource=");
+ results.append(resource);
+ results.append(" bundle=");
+ results.append(bundle);
results.append("\n");
return results.toString();
diff --git a/xdocs/changes.xml b/xdocs/changes.xml index 9156ee1..fb93d28 100644 --- a/xdocs/changes.xml +++ b/xdocs/changes.xml @@ -38,7 +38,33 @@ The <action> type attribute can be add,update,fix,remove. </properties>
<body>
- <release version="1.1.2 (alpha)" date="in CVS">
+ <release version="1.1.4" date="2004-11-12">
+ <action dev="niallp" type="add">
+ Added getMessage(key) and getMessages() methods to Field (PR# 29452)
+ </action>
+ <action dev="niallp" type="add">
+ Added resource property (including getter/setter) to Msg to support
+ the 'resource' attribute specified in the DTD.
+ </action>
+ </release>
+
+ <release version="1.1.3" date="2004-08-25">
+ <action dev="dgraham" type="fix">
+ Fixed javascript file reading in Java WebStart environment.
+ PR# 28257
+ </action>
+ <action dev="mrdon" type="fix">
+ Fixed javascript email domain length limited to 2 or 3 chars.
+ PR# 29532
+ </action>
+ </release>
+
+ <release version="1.1.2 (alpha)" date="2004-04-03">
+ <action dev="rleland" type="fix">
+ Javascript validation doesn't work if a form field is
+ called "name".
+ PR# 27899
+ </action>
<action dev="rleland" type="update">
Allow multiple forms to be on the same page by
generating a unique variable name based on form name.
diff --git a/xdocs/downloads.xml b/xdocs/downloads.xml index 3c3c23f..5263570 100644 --- a/xdocs/downloads.xml +++ b/xdocs/downloads.xml @@ -21,37 +21,34 @@ <body>
<section name="Releases">
-
- <p><strong>Latest Release</strong></p>
+ <p><strong>Latest Stable Release</strong></p>
<ul>
- <li><a href="http://jakarta.apache.org/site/binindex.cgi#commons-validator">1.0.2 Binary</a></li>
- <li><a href="http://jakarta.apache.org/site/sourceindex.cgi#commons-validator">1.0.2 Source</a></li>
+ <li><a href="http://jakarta.apache.org/site/binindex.cgi#commons-validator">1.1.3 Binary</a></li>
+ <li><a href="http://jakarta.apache.org/site/sourceindex.cgi#commons-validator">1.1.3 Source</a></li>
</ul>
<p><strong>Latest Development Release</strong></p>
<ul>
- <li><a href="http://www.apache.org/~husted/validator/v1.1.3/">1.1.3 Binary and Source</a></li>
- <li><a href="http://www.apache.org/~martinc/validator/v1.1.2/">1.1.2 Binary and Source</a></li>
+ <li><a href="http://www.apache.org/~niallp/validator/v1.1.4/commons-validator-1.1.4.zip">1.1.4 Binary</a></li>
+ <li><a href="http://www.apache.org/~niallp/validator/v1.1.4/commons-validator-1.1.4-src.zip">1.1.4 Source</a></li>
</ul>
- <!--
- <p>
- <strong>Archived Releases</strong>
- <br/>
- Older releases are retained by the Apache Software Foundation but are
- moved into a
- <a href="http://archive.apache.org/dist/jakarta/commons/validator/">
- special archive area</a>.
- </p>
-
- <br/>
- -->
-
<p><strong>Nightly Builds</strong></p>
<ul>
<li><a href="http://cvs.apache.org/builds/jakarta-commons/nightly/commons-validator/">Binary/Source</a></li>
</ul>
+ <!--
+ <p>
+ <strong>Archived Releases</strong>
+ <br/>
+ Older releases are retained by the Apache Software Foundation but are
+ moved into a
+ <a href="http://archive.apache.org/dist/jakarta/commons/validator/">
+ special archive area</a>.
+ </p>
+ -->
+
</section>
</body>
|
