You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by dg...@apache.org on 2003/05/22 05:28:05 UTC
cvs commit: jakarta-commons/validator/src/share/org/apache/commons/validator Arg.java ValidatorResources.java Var.java Field.java Msg.java Form.java ValidatorAction.java Constant.java FormSet.java
dgraham 2003/05/21 20:28:05
Modified: validator/src/share/org/apache/commons/validator Arg.java
ValidatorResources.java Var.java Field.java
Msg.java Form.java ValidatorAction.java
Constant.java FormSet.java
Log:
Added javadoc information on which classes mapped to which xml
elements.
Revision Changes Path
1.7 +9 -6 jakarta-commons/validator/src/share/org/apache/commons/validator/Arg.java
Index: Arg.java
===================================================================
RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Arg.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Arg.java 30 Apr 2003 21:51:05 -0000 1.6
+++ Arg.java 22 May 2003 03:28:05 -0000 1.7
@@ -66,7 +66,8 @@
/**
- * <p>A default argument or an argument for a
+ * <p>
+ * A default argument or an argument for a
* specific validator definition (ex: required)
* can be stored to pass into a message as parameters. This can be used in a
* pluggable validator for constructing locale
@@ -75,7 +76,9 @@
* used to determine if the value stored in the argument
* is a value to be retrieved from a locale sensitive
* message retrieval system like <code>java.util.PropertyResourceBundle</code>.
- * The resource field defaults to 'true'.</p>
+ * The resource field defaults to 'true'.
+ * </p>
+ * <p>Instances of this class are configured with an <arg> xml element.</p>
*
* @author David Winterfeldt
* @version $Revision$ $Date$
1.17 +9 -6 jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorResources.java
Index: ValidatorResources.java
===================================================================
RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorResources.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ValidatorResources.java 22 May 2003 03:12:18 -0000 1.16
+++ ValidatorResources.java 22 May 2003 03:28:05 -0000 1.17
@@ -80,8 +80,11 @@
import org.xml.sax.SAXException;
/**
- * <p>General purpose class for storing <code>FormSet</code> objects based
- * on their associated <code>Locale</code>.</p>
+ * <p>
+ * General purpose class for storing <code>FormSet</code> objects based
+ * on their associated <code>Locale</code>. Instances of this class are usually
+ * configured through a validation.xml file that is parsed in a constructor.
+ * </p>
*
* <p><strong>Note</strong> - Classes that extend this class
* must be Serializable so that instances may be used in distributable
1.5 +28 -25 jakarta-commons/validator/src/share/org/apache/commons/validator/Var.java
Index: Var.java
===================================================================
RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Var.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Var.java 30 Mar 2002 04:33:17 -0000 1.4
+++ Var.java 22 May 2003 03:28:05 -0000 1.5
@@ -7,7 +7,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -59,55 +59,58 @@
*
*/
-
package org.apache.commons.validator;
import java.io.Serializable;
-
/**
- * <p>A variable can be associate with a <code>Field</code> for
- * passing in information to a pluggable validator.</p>
+ * <p>
+ * A variable that can be associated with a <code>Field</code> for
+ * passing in information to a pluggable validator. Instances of this class are
+ * configured with a <var> xml element.
+ * </p>
*
* @author David Winterfeldt
* @version $Revision$ $Date$
-*/
+ */
public class Var implements Cloneable, Serializable {
/**
* Int Constant for JavaScript type. This can be used
* when auto-generating JavaScript.
- */
+ */
public final static String JSTYPE_INT = "int";
/**
* String Constant for JavaScript type. This can be used
* when auto-generating JavaScript.
- */
+ */
public final static String JSTYPE_STRING = "string";
/**
* Regular Expression Constant for JavaScript type. This can be used
* when auto-generating JavaScript.
- */
+ */
public final static String JSTYPE_REGEXP = "regexp";
/**
* The name of the variable.
- */
+ */
private String name = null;
/**
* The name of the value.
- */
+ */
private String value = null;
/**
* The optional JavaScript type of the variable.
- */
+ */
private String jsType = null;
- public Var() {}
+ public Var() {
+ super();
+ }
public Var(String name, String value, String jsType) {
this.name = name;
@@ -117,49 +120,49 @@
/**
* Gets the name of the variable.
- */
+ */
public String getName() {
return name;
}
/**
* Sets the name of the variable.
- */
+ */
public void setName(String name) {
this.name = name;
}
/**
* Gets the value of the variable.
- */
+ */
public String getValue() {
return value;
}
/**
* Sets the value of the variable.
- */
+ */
public void setValue(String value) {
this.value = value;
}
/**
* Gets the JavaScript type of the variable.
- */
+ */
public String getJsType() {
return jsType;
}
/**
* Sets the JavaScript type of the variable.
- */
+ */
public void setJsType(String jsType) {
this.jsType = jsType;
}
/**
* Creates and returns a copy of this object.
- */
+ */
public Object clone() {
try {
Var var = (Var)super.clone();
@@ -184,7 +187,7 @@
/**
* Returns a string representation of the object.
- */
+ */
public String toString() {
StringBuffer results = new StringBuffer();
1.11 +9 -7 jakarta-commons/validator/src/share/org/apache/commons/validator/Field.java
Index: Field.java
===================================================================
RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Field.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Field.java 20 May 2003 01:09:39 -0000 1.10
+++ Field.java 22 May 2003 03:28:05 -0000 1.11
@@ -72,9 +72,11 @@
import org.apache.commons.validator.util.ValidatorUtils;
/**
- * <p>This contains the list of pluggable validators to
- * run on a field and any message information and variables
- * to perform the validations and generate error messages.</p>
+ * <p>
+ * This contains the list of pluggable validators to run on a field and any message
+ * information and variables to perform the validations and generate error
+ * messages. Instances of this class are configured with a <field> xml element.
+ * </p>
*
* @author David Winterfeldt
* @version $Revision$ $Date$
1.5 +20 -19 jakarta-commons/validator/src/share/org/apache/commons/validator/Msg.java
Index: Msg.java
===================================================================
RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Msg.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Msg.java 30 Mar 2002 04:33:17 -0000 1.4
+++ Msg.java 22 May 2003 03:28:05 -0000 1.5
@@ -7,7 +7,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -59,63 +59,64 @@
*
*/
-
package org.apache.commons.validator;
import java.io.Serializable;
-
/**
- * <p>An alternative message can be associated with a <code>Field</code>
+ * <p>
+ * An alternative message can be associated with a <code>Field</code>
* and a pluggable validator instead of using the default message
- * stored in the <code>ValidatorAction</code> (aka pluggable validator).</p>
+ * stored in the <code>ValidatorAction</code> (aka pluggable validator).
+ * Instances of this class are configured with a <msg> xml element.
+ * </p>
*
* @author David Winterfeldt
* @version $Revision$ $Date$
-*/
+ */
public class Msg implements Cloneable, Serializable {
/**
* The name dependency that this argument goes with (optional).
- */
+ */
protected String name = null;
/**
* The key or value of the argument.
- */
+ */
protected String key = null;
/**
* Gets the name of the dependency.
- */
+ */
public String getName() {
return name;
}
/**
* Sets the name of the dependency.
- */
+ */
public void setName(String name) {
this.name = name;
}
- /**
+ /**
* Gets the key/value.
- */
+ */
public String getKey() {
return key;
}
/**
* Sets the key/value.
- */
+ */
public void setKey(String key) {
this.key = key;
}
/**
* Creates and returns a copy of this object.
- */
+ */
public Object clone() {
try {
Msg msg = (Msg)super.clone();
@@ -136,7 +137,7 @@
/**
* Returns a string representation of the object.
- */
+ */
public String toString() {
StringBuffer results = new StringBuffer();
1.5 +9 -6 jakarta-commons/validator/src/share/org/apache/commons/validator/Form.java
Index: Form.java
===================================================================
RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Form.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Form.java 29 Apr 2003 02:59:49 -0000 1.4
+++ Form.java 22 May 2003 03:28:05 -0000 1.5
@@ -72,8 +72,11 @@
/**
- * <p>This contains a set of validation rules for a form/JavaBean. The information is
- * contained in a list of <code>Field</code> objects.</p>
+ * <p>
+ * This contains a set of validation rules for a form/JavaBean. The information is
+ * contained in a list of <code>Field</code> objects. Instances of this class are
+ * configured with a <form> xml element.
+ * </p>
*
* @author David Winterfeldt
* @version $Revision$ $Date$
1.9 +5 -5 jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorAction.java
Index: ValidatorAction.java
===================================================================
RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorAction.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ValidatorAction.java 20 May 2003 02:00:24 -0000 1.8
+++ ValidatorAction.java 22 May 2003 03:28:05 -0000 1.9
@@ -77,7 +77,7 @@
/**
* <p>Contains the information to dynamically create and run a validation
* method. This is the class representation of a pluggable validator that can be
- * defined in an xml file.</p>
+ * defined in an xml file with the <validator> element.</p>
*
* <strong>Note</strong>: The validation method is assumed to be thread safe.
*
1.5 +14 -15 jakarta-commons/validator/src/share/org/apache/commons/validator/Constant.java
Index: Constant.java
===================================================================
RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Constant.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Constant.java 30 Apr 2003 21:51:05 -0000 1.4
+++ Constant.java 22 May 2003 03:28:05 -0000 1.5
@@ -7,7 +7,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -73,28 +73,27 @@
* the <code>Msg</code>'s key field, and the <code>Arg</code>'s
* key field can all contain constants reference for replacement.
* <br>
- * ex: <constant name="zip" value="^\d{5}$" /><br>
- * mask="${zip}" </p>
+ * ex: <constant name="zip" value="^\d{5}$" /> mask="${zip}" </p>
*
* @author David Winterfeldt
* @version $Revision$ $Date$
-*/
+ */
public class Constant implements Serializable {
/**
* The name of the constant.
- */
+ */
private String name = null;
/**
* The name of the constant.
- */
+ */
private String value = null;
/**
* Gets the name of the constant.
* @return the name o fthe constant.
- */
+ */
public String getName() {
return name;
}
@@ -102,7 +101,7 @@
/**
* Sets the name of the constant.
* @param name sets the name of the constant.
- */
+ */
public void setName(String name) {
this.name = name;
}
@@ -110,7 +109,7 @@
/**
* Gets the value of the constant.
* @return the value of the constant.
- */
+ */
public String getValue() {
return value;
}
@@ -118,7 +117,7 @@
/**
* Sets the value of the constant.
* @param value the value of the constant.
- */
+ */
public void setValue(String value) {
this.value = value;
}
@@ -126,7 +125,7 @@
/**
* Returns a string representation of the object.
* @return the string representation of the object.
- */
+ */
public String toString() {
StringBuffer results = new StringBuffer();
1.8 +9 -7 jakarta-commons/validator/src/share/org/apache/commons/validator/FormSet.java
Index: FormSet.java
===================================================================
RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/FormSet.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- FormSet.java 29 Apr 2003 02:33:17 -0000 1.7
+++ FormSet.java 22 May 2003 03:28:05 -0000 1.8
@@ -70,9 +70,11 @@
/**
- * <p>Holds a set of <code>Form</code>s
- * stored associated with a <code>Locale</code> based
- * on the country, language, and variant specified.</p>
+ * <p>
+ * Holds a set of <code>Form</code>s stored associated with a
+ * <code>Locale</code> based on the country, language, and variant specified.
+ * Instances of this class are configured with a <formset> xml element.
+ * </p>
*
* @author David Winterfeldt
* @version $Revision$ $Date$
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org