You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2007/09/14 16:41:15 UTC

svn commit: r575705 [1/2] - in /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation: ./ validator/

Author: ivaynberg
Date: Fri Sep 14 07:41:14 2007
New Revision: 575705

URL: http://svn.apache.org/viewvc?rev=575705&view=rev
Log:
WICKET-970: Wicket Javadoc Standardization: org.apache.wicket.validation.*

Added:
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/package.html   (with props)
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/package.html   (with props)
Modified:
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/CompoundValidator.java
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IErrorMessageSource.java
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/INullAcceptingValidator.java
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidatable.java
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidationError.java
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidator.java
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidatorAddListener.java
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/Validatable.java
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/ValidationError.java
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/AbstractValidator.java
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/CreditCardValidator.java
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/DateValidator.java
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/EmailAddressValidator.java
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/NumberValidator.java
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/PatternValidator.java
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/StringValidator.java
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/UrlValidator.java

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/CompoundValidator.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/CompoundValidator.java?rev=575705&r1=575704&r2=575705&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/CompoundValidator.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/CompoundValidator.java Fri Sep 14 07:41:14 2007
@@ -26,6 +26,7 @@
  * ignored.
  * 
  * @author Igor Vaynberg (ivaynberg)
+ * @since 1.2.6
  */
 public class CompoundValidator implements IValidator
 {
@@ -34,17 +35,18 @@
 	private final List validators = new ArrayList(2);
 
 	/**
-	 * Constructor
+	 * Constructor.
 	 */
 	public CompoundValidator()
 	{
 	}
 
 	/**
-	 * Adds a validator to the chain of validators
+	 * Adds an <code>IValidator</code> to the chain of validators.
 	 * 
 	 * @param validator
-	 * @return this for chaining
+	 *            an <code>IValidator</code> to be added
+	 * @return this <code>ValidationError</code> for chaining purposes
 	 */
 	public final CompoundValidator add(IValidator validator)
 	{
@@ -57,7 +59,7 @@
 	}
 
 	/**
-	 * @see org.apache.wicket.validation.IValidator#validate(org.apache.wicket.validation.IValidatable)
+	 * @see IValidator#validate(IValidatable)
 	 */
 	public final void validate(IValidatable validatable)
 	{

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IErrorMessageSource.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IErrorMessageSource.java?rev=575705&r1=575704&r2=575705&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IErrorMessageSource.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IErrorMessageSource.java Fri Sep 14 07:41:14 2007
@@ -20,10 +20,11 @@
 
 
 /**
- * Represents a message source that stores messages by a <code>key</code> and
- * can perform variable substitution.
+ * Interface representing a message source that stores messages by key and can
+ * perform variable substitution.
  * 
- * @author ivaynberg
+ * @author Igor Vaynberg (ivaynberg)
+ * @since 1.2.6
  */
 public interface IErrorMessageSource
 {
@@ -31,25 +32,28 @@
 	 * Retrieves a message with the given <code>key</code>.
 	 * 
 	 * @param key
-	 *            message key
+	 *            a message key
 	 * @return message or null if not found
 	 */
 	String getMessage(String key);
 
 	/**
-	 * Performs variable substitution on the specified <code>string</code>
-	 * using variables declared in the <code>vars</code> map.
-	 * 
-	 * Variables in the message are identified using ${varname} syntax
+	 * Performs variable substitution on the given <code>String</code> using
+	 * variables declared in the <code>vars</code> <code>Map</code>.
+	 * <p>
+	 * Variables in the message are identified using <code>${varname}</code>
+	 * syntax.
 	 * 
 	 * @param string
+	 *            a <code>String</code> to be altered
 	 * @param vars
+	 *            a <code>Map</code> of variables to process
 	 * 
 	 * @throws IllegalStateException
-	 *             if a variable defined in the string cannot be found in the
-	 *             <code>vars</code> map
+	 *             if a variable defined in the given <code>String</code>
+	 *             cannot be found in the <code>vars</code> <code>Map</code>
 	 * 
-	 * @return string with variables subsituted
+	 * @return the given <code>String</code> with the variables substituted
 	 */
 	String substitute(String string, Map vars) throws IllegalStateException;
 }

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/INullAcceptingValidator.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/INullAcceptingValidator.java?rev=575705&r1=575704&r2=575705&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/INullAcceptingValidator.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/INullAcceptingValidator.java Fri Sep 14 07:41:14 2007
@@ -16,19 +16,21 @@
  */
 package org.apache.wicket.validation;
 
+import org.apache.wicket.markup.html.form.FormComponent;
+
 /**
- * Marker interface for validators that will accept <code>null</code> value.
- * Without implementing this interface wicket will never pass <code>null</code>
- * value to {@link IValidator#validate(IValidatable)}.
+ * Marker interface for validators that will accept a <code>null</code> value.
+ * Without implementing this interface Wicket will never pass <code>null</code>
+ * values to {@link IValidator#validate(IValidatable)}.
  * <p>
- * Keep in mind that the form component must have set the required property to
- * <code>false</code>, otherwise wicket will not permit the validator to
- * process the <code>null</code> value.
- * 
- * @see IValidator
- * @see org.apache.wicket.markup.html.form.FormComponent#setRequired(boolean)
+ * Keep in mind that the {@link FormComponent} must have set the required
+ * property to <code>false</code>, otherwise Wicket will not permit the
+ * validator to process the <code>null</code> value.
  * 
  * @author Matej Knopp
+ * @since 1.2.6
+ * @see IValidator
+ * @see FormComponent#setRequired(boolean)
  */
 public interface INullAcceptingValidator extends IValidator
 {

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidatable.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidatable.java?rev=575705&r1=575704&r2=575705&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidatable.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidatable.java Fri Sep 14 07:41:14 2007
@@ -18,31 +18,36 @@
 
 
 /**
- * Represents any object that can be validated
+ * Interface representing any object that can be validated.
  * 
  * @author Igor Vaynberg (ivaynberg)
+ * @since 1.2.6
  */
 public interface IValidatable
 {
 	/**
+	 * Retrieves the value to be validated.
+	 * 
 	 * @return the value to be validated
 	 */
 	Object getValue();
 
 	/**
-	 * Reports an error against the validatable value. Multiple errors can be
-	 * reported by calling this method multiple times.
+	 * Reports an error against this <code>IValidatable</code>'s value.
+	 * Multiple errors can be reported by calling this method multiple times.
 	 * 
 	 * @param error
-	 *            reported error
+	 *            an <code>IValidationError</code> to be reported
 	 */
 	void error(IValidationError error);
 
 	/**
-	 * Queries the current state of the validatable object. Validatables should
-	 * assume they are valid until {@link #error(IValidationError)} is called.
+	 * Queries the current state of this <code>IValidatable</code> instance.
+	 * <code>IValidatable</code>s should assume they are valid until
+	 * {@link #error(IValidationError)} is called.
 	 * 
-	 * @return true if the object is in a valid state, false otherwise.
+	 * @return <code>true</code> if the object is in a valid state,
+	 *         <code>false</code> if otherwise
 	 */
 	boolean isValid();
 }

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidationError.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidationError.java?rev=575705&r1=575704&r2=575705&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidationError.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidationError.java Fri Sep 14 07:41:14 2007
@@ -17,17 +17,19 @@
 package org.apache.wicket.validation;
 
 /**
- * A validation error
+ * Interface representing a validation error.
  * 
- * @author ivaynberg
+ * @author Igor Vaynberg (ivaynberg)
+ * @since 1.2.6
  */
 public interface IValidationError
 {
 	/**
-	 * Retrieves error message (usually user-facing)
+	 * Retrieves the error message (usually user-facing).
 	 * 
 	 * @param messageSource
-	 * @return error message
+	 *            the message source
+	 * @return the error message <code>String</code>
 	 */
 	String getErrorMessage(IErrorMessageSource messageSource);
 }

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidator.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidator.java?rev=575705&r1=575704&r2=575705&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidator.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidator.java Fri Sep 14 07:41:14 2007
@@ -19,23 +19,25 @@
 import org.apache.wicket.IClusterable;
 
 /**
- * A validator that can validate a {@link IValidatable} object.
+ * Interface representing a validator that can validate an {@link IValidatable} object.
  * <p>
- * Unless the validator implements also the {@link INullAcceptingValidator}
- * interface, wicket will not pass null value to the
+ * Unless the validator implements the {@link INullAcceptingValidator}
+ * interface as well, Wicket will not pass <code>null</code> values to the
  * {@link IValidator#validate(IValidatable)} method.
  * 
- * 
  * @author Jonathan Locke
  * @author Igor Vaynberg (ivaynberg)
+ * @since 1.2.6
  */
 public interface IValidator extends IClusterable
 {
 	/**
-	 * Validates the <code>validatable</code> object. Validation errors should
-	 * be reported using {@link IValidatable#error(IValidationError)} method.
+	 * Validates the <code>IValidatable</code> instance. Validation errors
+	 * should be reported using the {@link IValidatable#error(IValidationError)}
+	 * method.
 	 * 
 	 * @param validatable
+	 *            the <code>IValidatable</code> instance being validated
 	 */
 	void validate(IValidatable validatable);
 }

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidatorAddListener.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidatorAddListener.java?rev=575705&r1=575704&r2=575705&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidatorAddListener.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/IValidatorAddListener.java Fri Sep 14 07:41:14 2007
@@ -18,35 +18,39 @@
 
 import org.apache.wicket.Component;
 import org.apache.wicket.IClusterable;
+import org.apache.wicket.behavior.IBehavior;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.form.FormComponent;
 import org.apache.wicket.markup.html.form.validation.IFormValidator;
 
 /**
  * Optional interface for validators ({@link IValidator} and
- * {@link IFormValidator}) that can react to validators being added to a
- * component.
+ * {@link IFormValidator}) that can react when validators are added to a
+ * <code>Component</code>.
  * <p>
- * Implementation note: currently we keep this case simple stupid non-generic.
- * In future versions we may revisit this and support removal events (WHEN
- * removal of validators is ever allowed, which justifies it's own discussion).
- * Also, we may look at whether this is a common event to support for behaviors
- * as well. This raises additional questions that need to be answered, hence
- * we'll start by supporting just the use case when validators are added to
- * forms or form components.
- * </p>
+ * Implementation note: currently we keep this case simple, stupid, and
+ * non-generic. In future versions we may revisit this and support removal
+ * events (<i>IF</i> removal of validators is ever allowed, which justifies
+ * its own discussion). Also, we may look at whether this is a common event to
+ * support for {@link IBehavior}s as well. This raises additional questions
+ * that need to be answered, hence we'll start by supporting just the use case
+ * when validators are added to forms or form components.
+ * 
+ * @author Eelco Hillenius
+ * @since 1.3
  */
 public interface IValidatorAddListener extends IClusterable
 {
 	/**
-	 * Called right after a validator was added to a {@link Form} or
+	 * Called right after a validator is added to a {@link Form} or
 	 * {@link FormComponent}. A common use case for implementing this interface
-	 * is for validators to add behaviors to implement client side validation
+	 * is for validators to add behaviors to implement client-side validation
 	 * capabilities, e.g. through JavaScript, Ajax or just by adding a simple
-	 * attribute modifier that sets a maxlength attribute.
+	 * attribute modifier that sets a "maxlength" attribute.
 	 * 
 	 * @param component
-	 *            component to which the validator was just added.
+	 *            a <code>Component</code> to which the validator was just
+	 *            added
 	 */
 	void onAdded(Component component);
 }

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/Validatable.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/Validatable.java?rev=575705&r1=575704&r2=575705&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/Validatable.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/Validatable.java Fri Sep 14 07:41:14 2007
@@ -22,10 +22,11 @@
 
 /**
  * This implementation of {@link IValidatable} is meant to be used outside of
- * wicket. It allows other parts of the application to utilize
- * {@link IValidator}s to validate values.
- * 
- * Example: <code>
+ * Wicket. It allows other parts of the application to utilize
+ * {@link IValidator}s for validation.
+ * <p>
+ * Example: 
+ * <code><pre>
  * class WebService {
  *   public void addUser(String firstName, String lastName) {
  *     Validatable standin=new Validatable();
@@ -41,27 +42,31 @@
  *     }
  *   }
  * }
- * </code>
+ * </pre></code>
  * 
  * @author Igor Vaynberg (ivaynberg)
+ * @since 1.2.6
  */
 public class Validatable implements IValidatable
 {
-
+	/** the value object */
 	private Object value;
+	
+	/** the list of errors */
 	private ArrayList errors;
 
 	/**
-	 * Constructor
+	 * Constructor.
 	 */
 	public Validatable()
 	{
 	}
 
 	/**
-	 * Sets the value object that will be returned by {@link #getValue()}
+	 * Sets the value object that will be returned by {@link #getValue()}.
 	 * 
 	 * @param value
+	 *            the value object
 	 */
 	public void setValue(Object value)
 	{
@@ -69,7 +74,7 @@
 	}
 
 	/**
-	 * @see org.apache.wicket.validation.IValidatable#getValue()
+	 * @see IValidatable#getValue()
 	 */
 	public Object getValue()
 	{
@@ -77,7 +82,7 @@
 	}
 
 	/**
-	 * @see org.apache.wicket.validation.IValidatable#error(org.apache.wicket.validation.IValidationError)
+	 * @see IValidatable#error(IValidationError)
 	 */
 	public void error(IValidationError error)
 	{
@@ -89,8 +94,10 @@
 	}
 
 	/**
-	 * @return umodifiable list of any errors reported against this validatable
-	 *         instance
+	 * Retrieves an unmodifiable list of any errors reported against this
+	 * <code>IValidatable</code> instance.
+	 * 
+	 * @return an unmodifiable list of errors
 	 */
 	public List getErrors()
 	{
@@ -105,7 +112,7 @@
 	}
 
 	/**
-	 * @see org.apache.wicket.validation.IValidatable#isValid()
+	 * @see IValidatable#isValid()
 	 */
 	public boolean isValid()
 	{

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/ValidationError.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/ValidationError.java?rev=575705&r1=575704&r2=575705&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/ValidationError.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/ValidationError.java Fri Sep 14 07:41:14 2007
@@ -33,31 +33,32 @@
  * 
  * The final error message is constructed via the following process:
  * <ol>
- * <li>Try all keys added by calls to {@link #addMessageKey(String)} via
- * provided {@link IErrorMessageSource}</li>
+ * <li>Try all keys added by calls to {@link #addMessageKey(String)} via the
+ * provided <code>IErrorMessageSource</code>.</li>
  * <li>If none of the keys yielded a message, use the message set by
- * {@link #setMessage(String)} if any</li>
- * <li>Perform variable subsitution on the message if any</li>
+ * {@link #setMessage(String)}, if any.</li>
+ * <li>Perform variable substitution on the message, if any.</li>
  * </ol>
  * 
- * @author ivaynberg
+ * @author Igor Vaynberg (ivaynberg)
+ * @since 1.2.6
  */
 public class ValidationError implements IValidationError, IClusterable
 {
 	private static final long serialVersionUID = 1L;
 
 	// XXX 2.0: optimization - keys can be null by default until a key is added
-	/** List of message keys to try against the {@link IErrorMessageSource} */
+	/** list of message keys to try against the <code>IErrorMessageSource</code> */
 	private final List keys = new ArrayList(1);
 
-	/** Variable map to use in variable substitution */
+	/** variables map to use in variable substitution */
 	private Map vars;
 
-	/** Default message used when all keys yield no message */
+	/** default message used when all keys yield no message */
 	private String message;
 
 	/**
-	 * Constructor
+	 * Constructor.
 	 */
 	public ValidationError()
 	{
@@ -66,10 +67,11 @@
 
 	/**
 	 * Adds a key to the list of keys that will be tried against
-	 * {@link IErrorMessageSource} to locate the error message string
+	 * <code>IErrorMessageSource</code> to locate the error message string.
 	 * 
 	 * @param key
-	 * @return this for chaining
+	 *            a message key to be added
+	 * @return this <code>ValidationError</code> for chaining purposes
 	 */
 	public ValidationError addMessageKey(String key)
 	{
@@ -82,13 +84,13 @@
 	}
 
 	/**
-	 * Sets a variable that will be used in substitution
+	 * Sets a key and value in the variables map for use in substitution.
 	 * 
 	 * @param name
-	 *            variable name
+	 *            a variable name
 	 * @param value
-	 *            variable value
-	 * @return this for chaining
+	 *            a variable value
+	 * @return this <code>ValidationError</code> for chaining purposes
 	 */
 	public ValidationError setVariable(String name, Object value)
 	{
@@ -109,10 +111,10 @@
 	}
 
 	/**
-	 * Returns the map of variables for this error. User is free to modify the
-	 * contents.
+	 * Retrieves the variables map for this error. The caller is free to modify
+	 * the contents.
 	 * 
-	 * @return map of variables for this error
+	 * @return a <code>Map</code> of variables for this error
 	 */
 	public final Map getVariables()
 	{
@@ -124,11 +126,11 @@
 	}
 
 	/**
-	 * Sets the variable map for this error
+	 * Sets the variables map for this error.
 	 * 
 	 * @param vars
-	 *            variable map
-	 * @return this for chaining
+	 *            a variables map
+	 * @return this <code>ValidationError</code> for chaining purposes
 	 */
 	public final ValidationError setVariables(Map vars)
 	{
@@ -141,7 +143,7 @@
 	}
 
 	/**
-	 * @see org.apache.wicket.validation.IValidationError#getErrorMessage(org.apache.wicket.validation.IErrorMessageSource)
+	 * @see IValidationError#getErrorMessage(IErrorMessageSource)
 	 */
 	public final String getErrorMessage(IErrorMessageSource messageSource)
 	{
@@ -172,12 +174,11 @@
 		return errorMessage;
 	}
 
-
 	/**
-	 * Gets message that will be used when no message could be located via
-	 * message keys
+	 * Gets the default message that will be used when no message could be
+	 * located via message keys.
 	 * 
-	 * @return message
+	 * @return message the default message used when all keys yield no message
 	 */
 	public final String getMessage()
 	{
@@ -186,12 +187,12 @@
 
 	/**
 	 * Sets message that will be used when no message could be located via
-	 * message keys
+	 * message keys.
 	 * 
 	 * @param message
-	 *            the message
+	 *            a default message to be used when all keys yield no message
 	 * 
-	 * @return this for chaining
+	 * @return this <code>ValidationError</code> for chaining purposes
 	 */
 	public final ValidationError setMessage(String message)
 	{

Added: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/package.html
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/package.html?rev=575705&view=auto
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/package.html (added)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/package.html Fri Sep 14 07:41:14 2007
@@ -0,0 +1,30 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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.
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 3.2 Final//NL">
+<html>
+	<head>
+		<title>
+			org.apache.wicket.validation package
+		</title>
+	</head>
+	<body>
+		<p>
+			This package provides interfaces for Wicket's 
+			validation support.
+		</p>
+	</body>
+</html>

Propchange: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/package.html
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/AbstractValidator.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/AbstractValidator.java?rev=575705&r1=575704&r2=575705&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/AbstractValidator.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/AbstractValidator.java Fri Sep 14 07:41:14 2007
@@ -29,35 +29,35 @@
 
 
 /**
- * Convinience base class for {@link IValidator}s. This class is thread-safe
+ * Convenience base class for {@link IValidator}s. This class is thread-safe
  * and therefore it is safe to share validators across sessions/threads.
  * <p>
- * Error messages can be registered by calling one of the error(IValidatable
- * ...) overloads.
- * <p>
- * By default this class will skip validation if the
- * {@link IValidatable#getValue()} returns null, validators that wish to
- * validate the null value need to override {@link #validateOnNullValue()} and
- * return <code>true</code>.
+ * Error messages can be registered by calling one of the error (<code>IValidatable</code>)
+ * overloads. By default this class will skip validation if the
+ * {@link IValidatable#getValue()} returns <code>null</code>. Validators that
+ * wish to validate the <code>null</code> value need to override
+ * {@link #validateOnNullValue()} and return <code>true</code>.
  * 
  * 
  * @author Jonathan Locke
  * @author Eelco Hillenius
- * @author Igor Vaynberg (ivaynbeg)
- * 
+ * @author Igor Vaynberg (ivaynberg)
+ * @since 1.2.6
  */
 public abstract class AbstractValidator implements INullAcceptingValidator, IClusterable
 {
 	private static final long serialVersionUID = 1L;
 
 	/**
-	 * Whether or not to validate the value if it is null. It is usually
-	 * desirable to skip validation if the value is null - unless we want to
-	 * make sure the value is in fact null which is a rare usecase. Validators
-	 * that extend this and wish to validate that the value is null should
-	 * override this method and return <code>true</code>.
+	 * Indicates whether or not to validate the value if it is <code>null</code>.
+	 * It is usually desirable to skip validation if the value is
+	 * <code>null</code>, unless we want to make sure the value is in fact
+	 * <code>null</code> (a rare use case). Validators that extend this and
+	 * wish to ensure the value is <code>null</code> should override this
+	 * method and return <code>true</code>.
 	 * 
-	 * @return true to validate on null value, false to skip validation on null
+	 * @return <code>true</code> to validate on <code>null</code> value,
+	 *         <code>false</code> to skip validation on <code>null</code>
 	 *         value
 	 */
 	public boolean validateOnNullValue()
@@ -66,14 +66,14 @@
 	}
 
 	/**
-	 * Method used to validate the validatable instance
+	 * Validates the <code>IValidatable</code> instance.
 	 * 
-	 * @param validatable
+	 * @param validatable the given <code>IValidatable</code> instance
 	 */
 	protected abstract void onValidate(IValidatable validatable);
 
 	/**
-	 * @see org.apache.wicket.validation.IValidator#validate(org.apache.wicket.validation.IValidatable)
+	 * @see IValidator#validate(IValidatable)
 	 */
 	public final void validate(IValidatable validatable)
 	{
@@ -83,14 +83,14 @@
 		}
 	}
 
-
 	/**
-	 * Reports an error against validatable using the map returned by
-	 * {@link #variablesMap(IValidatable)}for variable interpolations and
-	 * message key returned by {@link #resourceKey()}.
+	 * Reports an error against an <code>IValidatable</code> instance using
+	 * the <code>Map</code> returned by {@link #variablesMap(IValidatable)}
+	 * for variable interpolations and the message resource key returned by
+	 * {@link #resourceKey()}.
 	 * 
 	 * @param validatable
-	 *            validatble being validated
+	 *            the <code>IValidatable</code> instance being validated
 	 * 
 	 */
 	public void error(final IValidatable validatable)
@@ -99,12 +99,12 @@
 	}
 
 	/**
-	 * Reports an error against validatable using the map returned by
-	 * {@link #variablesMap(IValidatable)}for variable interpolations and the
-	 * specified resourceKey
+	 * Reports an error against an <code>IValidatable</code> instance using
+	 * the <code>Map</code> returned by {@link #variablesMap(IValidatable)}
+	 * for variable interpolations and the given message resource key.
 	 * 
 	 * @param validatable
-	 *            validatble being validated
+	 *            the <code>IValidatable</code> instance being validated
 	 * @param resourceKey
 	 *            the message resource key to use
 	 * 
@@ -119,14 +119,14 @@
 	}
 
 	/**
-	 * Reports an error against the validatalbe using the given map for variable
-	 * interpolations and message resource key provided by
-	 * {@link #resourceKey()}
+	 * Reports an error against an <code>IValidatable</code> instance using
+	 * the given <code>Map</code> for variable interpolations and message
+	 * resource key provided by {@link #resourceKey()}.
 	 * 
 	 * @param validatable
-	 *            validatble being validated
+	 *            the <code>IValidatable</code> instance being validated
 	 * @param vars
-	 *            variables for variable interpolation
+	 *            <code>Map</code> of variables for variable interpolation
 	 */
 	public void error(final IValidatable validatable, final Map vars)
 	{
@@ -138,15 +138,16 @@
 	}
 
 	/**
-	 * Reports an error against the validatable using the specified resource key
-	 * and variable map
+	 * Reports an error against an <code>IValidatable</code> instance using
+	 * the given message resource key and <code>Map</code> for variable
+	 * interpolations.
 	 * 
 	 * @param validatable
-	 *            validatble being validated
+	 *            the <code>IValidatable</code> instance being validated
 	 * @param resourceKey
-	 *            The message resource key to use
+	 *            the message resource key to use
 	 * @param vars
-	 *            The model for variable interpolation
+	 *            <code>Map</code> of variables for variable interpolation
 	 */
 	public void error(final IValidatable validatable, final String resourceKey,
 			Map vars)
@@ -177,12 +178,12 @@
 	}
 
 	/**
-	 * Gets the resource key for validator's error message from the
-	 * ApplicationSettings class.
+	 * Gets the message resource key for this validator's error message from the
+	 * <code>ApplicationSettings</code> class.
 	 * 
-	 * <strong>NOTE</strong>: THIS METHOD SHOULD NEVER RETURN NULL
+	 * <strong>NOTE</strong>: THIS METHOD SHOULD NEVER RETURN <code>null</code>.
 	 * 
-	 * @return the resource key for the validator
+	 * @return the message resource key for this validator
 	 */
 	protected String resourceKey()
 	{
@@ -190,14 +191,14 @@
 	}
 
 	/**
-	 * Gets the default variable map
+	 * Gets the default <code>Map</code> of variables.
 	 * 
-	 * <strong>NOTE</strong>: THIS METHOD SHOULD NEVER RETURN NULL
+	 * <strong>NOTE</strong>: THIS METHOD SHOULD NEVER RETURN <code>null</code>.
 	 * 
 	 * @param validatable
-	 *            validatable being validated
+	 *            the <code>IValidatable</code> instance being validated
 	 * 
-	 * @return a map with the variables for interpolation
+	 * @return a <code>Map</code> of variables for variable interpolation
 	 */
 	protected Map variablesMap(IValidatable validatable)
 	{
@@ -207,7 +208,6 @@
 
 	// deprecated methods
 
-
 	/**
 	 * DEPRECATED/UNSUPPORTED
 	 * 
@@ -215,8 +215,8 @@
 	 * <ul>
 	 * <li>${input}: the user's input</li>
 	 * <li>${name}: the name of the component</li>
-	 * <li>${label}: the label of the component - either comes from
-	 * FormComponent.labelModel or resource key [form-id].[form-component-id] in
+	 * <li>${label}: the label of the <code>Component</code> - either comes from
+	 * <code>FormComponent.labelModel</code> or resource key [form-id].[form-component-id] in
 	 * that order</li>
 	 * </ul>
 	 * 

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/CreditCardValidator.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/CreditCardValidator.java?rev=575705&r1=575704&r2=575705&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/CreditCardValidator.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/CreditCardValidator.java Fri Sep 14 07:41:14 2007
@@ -19,20 +19,22 @@
 import org.apache.wicket.validation.IValidatable;
 
 /**
- * Performs the so called "mod 10" algorithm to check the validity of credit
+ * Performs the so-called "mod 10" algorithm to check the validity of credit
  * card numbers such as VISA.
- * 
  * <p>
  * In addition to this, the credit card number can be further validated by its
- * length and prefix, but those properties are depended on the credit card type
- * and such validation is not performed by this validation rule.
+ * length and prefix, but those properties depend upon the credit card type, and
+ * such validation is not performed by this validator.
+ * 
+ * @author Johan Compagner
+ * @since 1.2.6
  */
 public class CreditCardValidator extends AbstractValidator
 {
 	private static final long serialVersionUID = 1L;
 
 	/**
-	 * @see org.apache.wicket.validation.validator.AbstractValidator#onValidate(org.apache.wicket.validation.IValidatable)
+	 * @see AbstractValidator#onValidate(IValidatable)
 	 */
 	protected void onValidate(IValidatable validatable)
 	{

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/DateValidator.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/DateValidator.java?rev=575705&r1=575704&r2=575705&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/DateValidator.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/DateValidator.java Fri Sep 14 07:41:14 2007
@@ -23,39 +23,41 @@
 
 
 /**
- * A validator for dates that can be used for subclassing or use one of the
- * static factory methods to get the default date validators as range, maximum
- * or minimum.
+ * Validator for checking dates. This validator can be extended or can be used
+ * for one of its static factory methods to get the default
+ * <code>DateValidator</code> as a range, maximum, or minimum type.
  * 
  * @author Jonathan Locke
  * @author Johan Compagner
  * @author Igor Vaynberg (ivaynberg)
+ * @since 1.2.6
  */
 public abstract class DateValidator extends AbstractValidator
 {
 
 	/**
-	 * Gets a Date range validator to check if the date is between the minimum
-	 * and maximum dates.
-	 * 
-	 * If that is not the case then an error message will be generated with the
-	 * key "DateValidator.range" and the messages keys that can be used are:
+	 * Gets a <code>Date</code> range validator for checking if the
+	 * <code>Date</code> value falls between the minimum and maximum
+	 * <code>Date</code> values. If that is not the case, an error message
+	 * will be generated with the key "DateValidator.range". The message keys
+	 * that can be used are:
+	 * <p>
 	 * <ul>
-	 * <li>${minimum}: The minimum date</li>
-	 * <li>${maximum}: The maximum date</li>
-	 * <li>${input}: the input the user did give</li>
-	 * <li>${name}: the name of the component that failed</li>
-	 * <li>${label}: the label of the component - either comes from
-	 * FormComponent.labelModel or resource key [form-id].[form-component-id] in
-	 * that order</li>
+	 * <li>${minimum}: the minimum date</li>
+	 * <li>${maximum}: the maximum date</li>
+	 * <li>${input}: the input the user gave</li>
+	 * <li>${name}: the name of the <code>Component</code> that failed</li>
+	 * <li>${label}: the label of the <code>Component</code> - either comes
+	 * from <code>FormComponent.labelModel</code> or resource key
+	 * [form-id].[form-component-id] in that order</li>
 	 * </ul>
 	 * 
 	 * @param minimum
-	 *            The minimum date.
+	 *            the minimum <code>Date</code>
 	 * @param maximum
-	 *            The maximum date.
+	 *            the maximum <code>Date</code>
 	 * 
-	 * @return The DateValidator
+	 * @return the requested <code>DateValidator</code>
 	 */
 	public static DateValidator range(Date minimum, Date maximum)
 	{
@@ -63,24 +65,25 @@
 	}
 
 	/**
-	 * Gets a Date minimum validator to check if a date is greater then the
-	 * given minimum value.
-	 * 
-	 * If that is not the case then an error message will be generated with the
-	 * key "DateValidator.minimum" and the messages keys that can be used are:
+	 * Gets a <code>Date</code> minimum validator for checking if a
+	 * <code>Date</code> value is greater than the given minimum
+	 * <code>Date</code> value. If that is not the case, an error message will
+	 * be generated with the key "DateValidator.minimum". The message keys that
+	 * can be used are:
+	 * <p>
 	 * <ul>
-	 * <li>${minimum}: The minimal date</li>
-	 * <li>${input}: the input the user did give</li>
-	 * <li>${name}: the name of the component that failed</li>
-	 * <li>${label}: the label of the component - either comes from
-	 * FormComponent.labelModel or resource key [form-id].[form-component-id] in
-	 * that order</li>
+	 * <li>${minimum}: the minimum date</li>
+	 * <li>${input}: the input the user gave</li>
+	 * <li>${name}: the name of the <code>Component</code> that failed</li>
+	 * <li>${label}: the label of the <code>Component</code> - either comes
+	 * from <code>FormComponent.labelModel</code> or resource key
+	 * [form-id].[form-component-id] in that order</li>
 	 * </ul>
 	 * 
 	 * @param minimum
-	 *            The minimum length of the string.
+	 *            the minimum <code>Date</code>
 	 * 
-	 * @return The DateValidator
+	 * @return the requested <code>DateValidator</code>
 	 */
 	public static DateValidator minimum(Date minimum)
 	{
@@ -88,24 +91,24 @@
 	}
 
 	/**
-	 * Gets a Date maximum validator to check if a date is smaller then the
-	 * given maximum value.
-	 * 
-	 * If that is not the case then an error message will be generated with the
-	 * key "DateValidator.maximum" and the messages keys that can be used are:
+	 * Gets a <code>Date</code> maximum validator for checking if a
+	 * <code>Date</code> value is smaller than the given maximum value. If
+	 * that is not the case, an error message will be generated with the key
+	 * "DateValidator.maximum". The message keys that can be used are:
+	 * <p>
 	 * <ul>
-	 * <li>${maximum}: The maximum date</li>
-	 * <li>${input}: the input the user did give</li>
-	 * <li>${name}: the name of the component that failed</li>
-	 * <li>${label}: the label of the component - either comes from
-	 * FormComponent.labelModel or resource key [form-id].[form-component-id] in
-	 * that order</li>
+	 * <li>${maximum}: the maximum date</li>
+	 * <li>${input}: the input the user gave</li>
+	 * <li>${name}: the name of the <code>Component</code> that failed</li>
+	 * <li>${label}: the label of the <code>Component</code> - either comes
+	 * from <code>FormComponent.labelModel</code> or resource key
+	 * [form-id].[form-component-id] in that order</li>
 	 * </ul>
 	 * 
 	 * @param maximum
-	 *            The maximum date.
+	 *            the maximum <code>Date</code>
 	 * 
-	 * @return The DateValidator
+	 * @return the requested <code>DateValidator</code>
 	 */
 	public static DateValidator maximum(Date maximum)
 	{
@@ -135,7 +138,7 @@
 		}
 
 		/**
-		 * @see org.apache.wicket.validation.validator.AbstractValidator#resourceKey(org.apache.wicket.markup.html.form.FormComponent)
+		 * @see AbstractValidator#resourceKey(FormComponent)
 		 */
 		protected String resourceKey()
 		{

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/EmailAddressValidator.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/EmailAddressValidator.java?rev=575705&r1=575704&r2=575705&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/EmailAddressValidator.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/EmailAddressValidator.java Fri Sep 14 07:41:14 2007
@@ -32,11 +32,13 @@
 {
 	private static final long serialVersionUID = 1L;
 
-	/** Singleton instance */
+	/** singleton instance */
 	private static final EmailAddressValidator INSTANCE = new EmailAddressValidator();
 
 	/**
-	 * @return Instance of emailadress validator
+	 * Retrieves the singleton instance of <code>EmailAddressValidator</code>.
+	 * 
+	 * @return the singleton instance of <code>EmailAddressValidator</code>
 	 */
 	public static EmailAddressValidator getInstance()
 	{
@@ -44,8 +46,8 @@
 	}
 
 	/**
-	 * Protected constructor to force use of static singleton accessor method.
-	 * Or override it to implement resourceKey(Component)
+	 * Protected constructor to force use of static singleton accessor. Override
+	 * this constructor to implement resourceKey(Component).
 	 */
 	protected EmailAddressValidator()
 	{

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/NumberValidator.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/NumberValidator.java?rev=575705&r1=575704&r2=575705&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/NumberValidator.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/NumberValidator.java Fri Sep 14 07:41:14 2007
@@ -20,53 +20,50 @@
 
 import org.apache.wicket.validation.IValidatable;
 
-
+// FIXME 2.0: ivaynberg: look over javadoc
 /**
- * FIXME 2.0: ivaynberg: look over javadoc
- * 
- * 
- * A validator for numbers. See the static factory methods to make range/minimum
- * or maximum validators for doubles or longs
+ * Validator for checking numbers. Use the static factory methods to make range/minimum
+ * or maximum validators for <code>double</code>s or <code>long</code>s.
  * 
  * @author Jonathan Locke
  * @author Johan Compagner
- * @author Igor Vaynberg(ivaynberg)
+ * @author Igor Vaynberg (ivaynberg)
+ * @since 1.2.6
  */
 public abstract class NumberValidator extends AbstractValidator
 {
 	/**
-	 * A validatior for testing if it is a positive number value
+	 * a validator for ensuring for a positive number value
 	 */
 	public static final NumberValidator POSITIVE = minimum(0);
 
 	/**
-	 * A validatior for testing if it is a positive number value
+	 * a validator for ensuring a positive number value
 	 */
 	public static final NumberValidator NEGATIVE = maximum(0);
 
-
 	/**
-	 * Gets a Integer range validator to check if a number is between the
-	 * mininum and maximum value.
-	 * 
-	 * If that is not the case then an error message will be generated with the
-	 * key "NumberValidator.range" and the messages keys that can be used are:
+	 * Gets an Integer range validator for checking if a number falls between
+	 * the minimum and maximum values. If that is not the case, an error message
+	 * will be generated with the key "NumberValidator.range". The message keys
+	 * that can be used are:
+	 * <p>
 	 * <ul>
-	 * <li>${minimum}: the minimal value</li>
+	 * <li>${minimum}: the minimum value</li>
 	 * <li>${maximum}: the maximum value</li>
-	 * <li>${input}: the input the user did give</li>
-	 * <li>${name}: the name of the component that failed</li>
-	 * <li>${label}: the label of the component - either comes from
-	 * FormComponent.labelModel or resource key [form-id].[form-component-id] in
-	 * that order</li>
+	 * <li>${input}: the input the user gave</li>
+	 * <li>${name}: the name of the <code>Component</code> that failed</li>
+	 * <li>${label}: the label of the <code>Component</code> - either comes
+	 * from <code>FormComponent.labelModel</code> or resource key
+	 * [form-id].[form-component-id] in that order</li>
 	 * </ul>
 	 * 
 	 * @param minimum
-	 *            The minimum value.
+	 *            the minimum value
 	 * @param maximum
-	 *            The maximum value.
+	 *            the maximum value
 	 * 
-	 * @return The NumberValidator
+	 * @return the request <code>NumberValidator</code>
 	 */
 	public static NumberValidator range(long minimum, long maximum)
 	{
@@ -74,24 +71,24 @@
 	}
 
 	/**
-	 * Gets a Integer minimum validator to check if a integer value is greater
-	 * then the given minimum value.
-	 * 
-	 * If that is not the case then an error message will be generated with the
-	 * key "NumberValidator.minimum" and the messages keys that can be used are:
+	 * Gets an Integer minimum validator for checking if a number is greater
+	 * than the given minimum value. If that is not the case, an error message
+	 * will be generated with the key "NumberValidator.minimum". The message
+	 * keys that can be used are:
+	 * <p>
 	 * <ul>
-	 * <li>${minimum}: the minimal value</li>
-	 * <li>${input}: the input the user did give</li>
-	 * <li>${name}: the name of the component that failed</li>
-	 * <li>${label}: the label of the component - either comes from
-	 * FormComponent.labelModel or resource key [form-id].[form-component-id] in
-	 * that order</li>
+	 * <li>${minimum}: the minimum value</li>
+	 * <li>${input}: the input the user gave</li>
+	 * <li>${name}: the name of the <code>Component</code> that failed</li>
+	 * <li>${label}: the label of the <code>Component</code> - either comes
+	 * from <code>FormComponent.labelModel</code> or resource key
+	 * [form-id].[form-component-id] in that order</li>
 	 * </ul>
 	 * 
 	 * @param minimum
-	 *            The minimum value.
+	 *            the minimum value
 	 * 
-	 * @return The NumberValidator
+	 * @return the requested <code>NumberValidator</code>
 	 */
 	public static NumberValidator minimum(long minimum)
 	{
@@ -99,25 +96,25 @@
 	}
 
 	/**
-	 * Gets a Integer range validator to check if an integer value is smaller
-	 * then the given maximum value.
-	 * 
-	 * If that is not the case then an error message will be generated with the
-	 * key "StringValidator.maximum" and the messages keys that can be used are:
+	 * Gets an Integer range validator for checking if a number is smaller than
+	 * the given maximum value. If that is not the case, an error message will
+	 * be generated with the key "StringValidator.maximum". The message keys
+	 * that can be used are:
+	 * <p>
 	 * <ul>
 	 * <li>${maximum}: the maximum value</li>
 	 * <li>${length}: the length of the user input</li>
-	 * <li>${input}: the input the user did give</li>
-	 * <li>${name}: the name of the component that failed</li>
-	 * <li>${label}: the label of the component - either comes from
-	 * FormComponent.labelModel or resource key [form-id].[form-component-id] in
-	 * that order</li>
+	 * <li>${input}: the input the user gave</li>
+	 * <li>${name}: the name of the <code>Component</code> that failed</li>
+	 * <li>${label}: the label of the <code>Component</code> - either comes
+	 * from <code>FormComponent.labelModel</code> or resource key
+	 * [form-id].[form-component-id] in that order</li>
 	 * </ul>
 	 * 
 	 * @param maximum
-	 *            The maximum value.
+	 *            the maximum value
 	 * 
-	 * @return The NumberValidator
+	 * @return the requested <code>NumberValidator</code>
 	 */
 	public static NumberValidator maximum(long maximum)
 	{
@@ -125,27 +122,27 @@
 	}
 
 	/**
-	 * Gets a Double range validator to check if a number is between the mininum
-	 * and maximum value.
-	 * 
-	 * If that is not the case then an error message will be generated with the
-	 * key "NumberValidator.range" and the messages keys that can be used are:
+	 * Gets a Double range validator for checking if a number falls between the
+	 * minimum and maximum values. If that is not the case, an error message
+	 * will be generated with the key "NumberValidator.range". The message keys
+	 * that can be used are:
+	 * <p>
 	 * <ul>
-	 * <li>${minimum}: the minimal value</li>
+	 * <li>${minimum}: the minimum value</li>
 	 * <li>${maximum}: the maximum value</li>
-	 * <li>${input}: the input the user did give</li>
-	 * <li>${name}: the name of the component that failed</li>
-	 * <li>${label}: the label of the component - either comes from
-	 * FormComponent.labelModel or resource key [form-id].[form-component-id] in
-	 * that order</li>
+	 * <li>${input}: the input the user gave</li>
+	 * <li>${name}: the name of the <code>Component</code> that failed</li>
+	 * <li>${label}: the label of the <code>Component</code> - either comes
+	 * from <code>FormComponent.labelModel</code> or resource key
+	 * [form-id].[form-component-id] in that order</li>
 	 * </ul>
 	 * 
 	 * @param minimum
-	 *            The minimum value.
+	 *            the minimum value
 	 * @param maximum
-	 *            The maximum value.
+	 *            the maximum value
 	 * 
-	 * @return The NumberValidator
+	 * @return the requested <code>NumberValidator</code>
 	 */
 	public static NumberValidator range(double minimum, double maximum)
 	{
@@ -153,24 +150,24 @@
 	}
 
 	/**
-	 * Gets a Double minimum validator to check if a integer value is greater
-	 * then the given minimum value.
-	 * 
-	 * If that is not the case then an error message will be generated with the
-	 * key "NumberValidator.minimum" and the messages keys that can be used are:
+	 * Gets a Double minimum validator for checking if number is greater then
+	 * the given minimum value. If that is not the case, an error message will
+	 * be generated with the key "NumberValidator.minimum". The message keys
+	 * that can be used are:
+	 * <p>
 	 * <ul>
-	 * <li>${minimum}: the minimal value</li>
-	 * <li>${input}: the input the user did give</li>
-	 * <li>${name}: the name of the component that failed</li>
-	 * <li>${label}: the label of the component - either comes from
-	 * FormComponent.labelModel or resource key [form-id].[form-component-id] in
-	 * that order</li>
+	 * <li>${minimum}: the minimum value</li>
+	 * <li>${input}: the input the user gave</li>
+	 * <li>${name}: the name of the <code>Component</code> that failed</li>
+	 * <li>${label}: the label of the <code>Component</code> - either comes
+	 * from <code>FormComponent.labelModel</code> or resource key
+	 * [form-id].[form-component-id] in that order</li>
 	 * </ul>
 	 * 
 	 * @param minimum
-	 *            The minimum value.
+	 *            the minimum value
 	 * 
-	 * @return The NumberValidator
+	 * @return the requested <code>NumberValidator</code>
 	 */
 	public static NumberValidator minimum(double minimum)
 	{
@@ -178,24 +175,24 @@
 	}
 
 	/**
-	 * Gets a Double range validator to check if an integer value is smaller
-	 * then the given maximum value.
-	 * 
-	 * If that is not the case then an error message will be generated with the
-	 * key "StringValidator.maximum" and the messages keys that can be used are:
+	 * Gets a Double maximum validator for checking if an number is smaller than
+	 * the given maximum value. If that is not the case, an error message will
+	 * be generated with the key "StringValidator.maximum". The message keys
+	 * that can be used are:
+	 * <p>
 	 * <ul>
 	 * <li>${maximum}: the maximum value</li>
-	 * <li>${input}: the input the user did give</li>
-	 * <li>${name}: the name of the component that failed</li>
-	 * <li>${label}: the label of the component - either comes from
-	 * FormComponent.labelModel or resource key [form-id].[form-component-id] in
-	 * that order</li>
+	 * <li>${input}: the input the user gave</li>
+	 * <li>${name}: the name of the <code>Component</code> that failed</li>
+	 * <li>${label}: the label of the <code>Component</code> - either comes
+	 * from <code>FormComponent.labelModel</code> or resource key
+	 * [form-id].[form-component-id] in that order</li>
 	 * </ul>
 	 * 
 	 * @param maximum
-	 *            The maximum value.
+	 *            the maximum value
 	 * 
-	 * @return The NumberValidator
+	 * @return the requested <code>NumberValidator</code>
 	 */
 	public static NumberValidator maximum(double maximum)
 	{
@@ -203,7 +200,7 @@
 	}
 
 	/**
-	 * Validator to check the number is within the specified range
+	 * Validator for checking if a given number is within the specified range.
 	 */
 	public static class RangeValidator extends NumberValidator
 	{
@@ -212,10 +209,12 @@
 		private final long maximum;
 
 		/**
-		 * Construct.
+		 * Constructor that sets the minimum and maximum values.
 		 * 
 		 * @param minimum
+		 *            the minimum value
 		 * @param maximum
+		 *            the maximum value
 		 */
 		public RangeValidator(long minimum, long maximum)
 		{
@@ -224,6 +223,9 @@
 
 		}
 
+		/**
+		 * @see AbstractValidator#variablesMap(IValidatable)
+		 */
 		protected Map variablesMap(IValidatable validatable)
 		{
 			final Map map = super.variablesMap(validatable);
@@ -233,13 +235,16 @@
 		}
 
 		/**
-		 * @see AbstractValidator#resourceKey(org.apache.wicket.markup.html.form.FormComponent)
+		 * @see AbstractValidator#resourceKey(FormComponent)
 		 */
 		protected String resourceKey()
 		{
 			return "NumberValidator.range";
 		}
 
+		/**
+		 * @see AbstractValidator#onValidate(IValidatable)
+		 */
 		protected void onValidate(IValidatable validatable)
 		{
 			Number value = (Number)validatable.getValue();
@@ -252,7 +257,8 @@
 	}
 
 	/**
-	 * Validator to check the number meets the minimum requirement
+	 * Validator for checking if a given number number meets the minimum
+	 * requirement.
 	 */
 	public static class MinimumValidator extends NumberValidator
 	{
@@ -260,15 +266,19 @@
 		private final long minimum;
 
 		/**
-		 * Construct.
+		 * Constructor that sets the minimum value.
 		 * 
 		 * @param minimum
+		 *            the minimum value
 		 */
 		public MinimumValidator(long minimum)
 		{
 			this.minimum = minimum;
 		}
 
+		/**
+		 * @see AbstractValidator#variablesMap(IValidatable)
+		 */
 		protected Map variablesMap(IValidatable validatable)
 		{
 			final Map map = super.variablesMap(validatable);
@@ -277,13 +287,16 @@
 		}
 
 		/**
-		 * @see AbstractValidator#resourceKey(org.apache.wicket.markup.html.form.FormComponent)
+		 * @see AbstractValidator#resourceKey(FormComponent)
 		 */
 		protected String resourceKey()
 		{
 			return "NumberValidator.minimum";
 		}
 
+		/**
+		 * @see AbstractValidator#onValidate(IValidatable)
+		 */
 		protected void onValidate(IValidatable validatable)
 		{
 			if (((Number)validatable.getValue()).longValue() < minimum)
@@ -296,18 +309,27 @@
 	}
 
 	/**
-	 * Validator to check the number meets the maximum requirement
+	 * Validator for checking if a given number meets the maximum requirement.
 	 */
 	public static class MaximumValidator extends NumberValidator
 	{
 		private static final long serialVersionUID = 1L;
 		private final long maximum;
-
+		
+		/**
+		 * Constructor that sets the maximum value.
+		 * 
+		 * @param maximum
+		 *            the maximum value
+		 */
 		public MaximumValidator(long maximum)
 		{
 			this.maximum = maximum;
 		}
 
+		/**
+		 * @see AbstractValidator#variablesMap(IValidatable)
+		 */
 		protected Map variablesMap(IValidatable validatable)
 		{
 			final Map map = super.variablesMap(validatable);
@@ -316,13 +338,16 @@
 		}
 
 		/**
-		 * @see AbstractValidator#resourceKey(org.apache.wicket.markup.html.form.FormComponent)
+		 * @see AbstractValidator#resourceKey(FormComponent)
 		 */
 		protected String resourceKey()
 		{
 			return "NumberValidator.maximum";
 		}
 
+		/**
+		 * @see AbstractValidator#onValidate(IValidatable)
+		 */
 		protected void onValidate(IValidatable validatable)
 		{
 			if (((Number)validatable.getValue()).longValue() > maximum)
@@ -333,7 +358,8 @@
 	}
 
 	/**
-	 * Validator to check the double is within the specified range
+	 * Validator for checking if a given <code>double</code> is within the
+	 * specified range.
 	 */
 	public static class DoubleRangeValidator extends NumberValidator
 	{
@@ -342,10 +368,12 @@
 		private final double maximum;
 
 		/**
-		 * Construct.
+		 * Constructor that sets the maximum and minimum values.
 		 * 
 		 * @param minimum
+		 *            the minimum value
 		 * @param maximum
+		 *            the maximum value
 		 */
 		public DoubleRangeValidator(double minimum, double maximum)
 		{
@@ -354,6 +382,9 @@
 
 		}
 
+		/**
+		 * @see AbstractValidator#variablesMap(IValidatable)
+		 */
 		protected Map variablesMap(IValidatable validatable)
 		{
 			final Map map = super.variablesMap(validatable);
@@ -362,11 +393,17 @@
 			return map;
 		}
 
+		/**
+		 * @see AbstractValidator#resourceKey(FormComponent)
+		 */
 		protected String resourceKey()
 		{
 			return "NumberValidator.range";
 		}
 
+		/**
+		 * @see AbstractValidator#onValidate(IValidatable)
+		 */
 		protected void onValidate(IValidatable validatable)
 		{
 			Number value = (Number)validatable.getValue();
@@ -379,7 +416,8 @@
 	}
 
 	/**
-	 * Validator to check the double meets the minimum requirement
+	 * Validator for checking if a given <code>double</code> meets the minimum
+	 * requirement.
 	 */
 	public static class DoubleMinimumValidator extends NumberValidator
 	{
@@ -387,14 +425,19 @@
 		private final double minimum;
 
 		/**
-		 * Construct.
+		 * Constructor that sets the minimum value.
+		 * 
 		 * @param minimum
+		 *            the minimum value
 		 */
 		public DoubleMinimumValidator(double minimum)
 		{
 			this.minimum = minimum;
 		}
 
+		/**
+		 * @see AbstractValidator#variablesMap(IValidatable)
+		 */
 		protected Map variablesMap(IValidatable validatable)
 		{
 			final Map map = super.variablesMap(validatable);
@@ -403,13 +446,16 @@
 		}
 
 		/**
-		 * @see AbstractValidator#resourceKey(org.apache.wicket.markup.html.form.FormComponent)
+		 * @see AbstractValidator#resourceKey(FormComponent)
 		 */
 		protected String resourceKey()
 		{
 			return "NumberValidator.minimum";
 		}
 
+		/**
+		 * @see AbstractValidator#onValidate(IValidatable)
+		 */
 		protected void onValidate(IValidatable validatable)
 		{
 			if (((Number)validatable.getValue()).doubleValue() < minimum)
@@ -421,7 +467,8 @@
 	}
 
 	/**
-	 * Validator to check the double meets a maximum requirement
+	 * Validator for checking if a given <code>double</code> meets a maximum
+	 * requirement.
 	 */
 	public static class DoubleMaximumValidator extends NumberValidator
 	{
@@ -429,14 +476,19 @@
 		private final double maximum;
 
 		/**
-		 * Construct.
+		 * Constructor that sets the maximum value.
+		 * 
 		 * @param maximum
+		 *            the maximum value
 		 */
 		public DoubleMaximumValidator(double maximum)
 		{
 			this.maximum = maximum;
 		}
 
+		/**
+		 * @see AbstractValidator#variablesMap(IValidatable)
+		 */
 		protected Map variablesMap(IValidatable validatable)
 		{
 			final Map map = super.variablesMap(validatable);
@@ -444,11 +496,17 @@
 			return map;
 		}
 
+		/**
+		 * @see AbstractValidator#resourceKey(FormComponent)
+		 */
 		protected String resourceKey()
 		{
 			return "NumberValidator.maximum";
 		}
 
+		/**
+		 * @see AbstractValidator#onValidate(IValidatable)
+		 */
 		protected void onValidate(IValidatable validatable)
 		{
 			if (((Number)validatable.getValue()).doubleValue() > maximum)

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/PatternValidator.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/PatternValidator.java?rev=575705&r1=575704&r2=575705&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/PatternValidator.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/PatternValidator.java Fri Sep 14 07:41:14 2007
@@ -22,54 +22,58 @@
 import org.apache.wicket.util.parse.metapattern.MetaPattern;
 import org.apache.wicket.validation.IValidatable;
 
-
+// FIXME 2.0: ivaynberg: look over javadoc
 /**
- * FIXME 2.0: ivaynberg: look over javadoc
- * 
- * Validates component by matching the component's value against a regular
- * expression pattern. A PatternValidator can be constructed with either a Java
- * regular expression (compiled or not) or a MetaPattern. If the pattern matches
- * against the value of the component it is attached to when validate() is
+ * Validates a <code>Component</code> by matching the component's value
+ * against a regular expression pattern. A <code>PatternValidator</code> can
+ * be constructed with either a Java regular expression (compiled or not) or a
+ * <code>MetaPattern</code>. If the pattern matches against the value of the
+ * <code>Component</code> it is attached to when <code>validate</code> is
  * called by the framework, then that input value is considered valid. If the
- * pattern does not match, the errorMessage() method will be called.
+ * pattern does not match, the <code>errorMessage</code> method will be
+ * called.
  * <p>
  * For example, to restrict a field to only digits, you might add a
- * PatternValidator constructed with the pattern "\d+". Another way to do the
- * same thing would be to construct the PatternValidator passing in
- * MetaPattern.DIGITS. The advantages of using MetaPattern over straight Java
- * regular expressions are that the patterns are easier to construct and easier
- * to combine into complex patterns. They are also more readable and more
- * reusable. See {@link org.apache.wicket.util.parse.metapattern.MetaPattern}for details.
+ * <code>PatternValidator</code> constructed with the pattern "\d+". Another
+ * way to do the same thing would be to construct the
+ * <code>PatternValidator</code> passing in <code>MetaPattern.DIGITS</code>.
+ * The advantages of using <code>MetaPattern</code> over straight Java regular
+ * expressions are that the patterns are easier to construct and easier to
+ * combine into complex patterns. They are also more readable and more reusable.
+ * See {@link org.apache.wicket.util.parse.metapattern.MetaPattern MetaPattern}
+ * for details.
  * <p>
  * The error message will be generated with the key "PatternValidator" and the
- * messages keys that can be used are:
+ * message keys that can be used are:
+ * <p>
  * <ul>
  * <li>${pattern}: the pattern which failed to match</li>
- * <li>${input}: the input the user did give</li>
- * <li>${name}: the name of the component that failed</li>
- * <li>${label}: the label of the component - either comes from
- * FormComponent.labelModel or resource key [form-id].[form-component-id] in
- * that order</li>
+ * <li>${input}: the input the user gave</li>
+ * <li>${name}: the name of the <code>Component</code> that failed</li>
+ * <li>${label}: the label of the <code>Component</code> - either comes from
+ * <code>FormComponent.labelModel</code> or resource key
+ * [form-id].[form-component-id] in that order</li>
  * </ul>
  * 
+ * @author Jonathan Locke
+ * @author Igor Vaynberg (ivaynberg)
+ * @since 1.2.6
  * @see java.util.regex.Pattern
  * @see org.apache.wicket.util.parse.metapattern.MetaPattern
- * @author Jonathan Locke *
- * @author Igor Vaynberg(ivaynberg)
- * 
  */
 public class PatternValidator extends StringValidator
 {
 	private static final long serialVersionUID = 1L;
 
-	/** The regexp pattern. */
+	/** the <code>java.util.regex.Pattern</code> */
 	private final Pattern pattern;
 
 	/**
-	 * Constructor.
+	 * Constructor that accepts a <code>String</code> regular expression
+	 * pattern.
 	 * 
 	 * @param pattern
-	 *            Regular expression pattern
+	 *            a regular expression pattern
 	 */
 	public PatternValidator(final String pattern)
 	{
@@ -77,12 +81,13 @@
 	}
 
 	/**
-	 * Constructor.
+	 * Constructor that accepts a <code>String</code> pattern and Java
+	 * <code>regex</code> compile flags as arguments.
 	 * 
 	 * @param pattern
-	 *            Regular expression pattern
+	 *            a regular expression pattern
 	 * @param flags
-	 *            Compile flags for java.util.regex.Pattern
+	 *            compile flags for <code>java.util.regex.Pattern</code>
 	 */
 	public PatternValidator(final String pattern, final int flags)
 	{
@@ -90,10 +95,11 @@
 	}
 
 	/**
-	 * Constructor.
+	 * Constructor that accepts a Java <code>regex</code> <code>Pattern</code>
+	 * argument.
 	 * 
 	 * @param pattern
-	 *            Java regex pattern
+	 *            a Java <code>regex</code> <code>Pattern</code>
 	 */
 	public PatternValidator(final Pattern pattern)
 	{
@@ -101,10 +107,10 @@
 	}
 
 	/**
-	 * Constructor.
+	 * Constructor that accepts a <code>MetaPattern</code> argument.
 	 * 
 	 * @param pattern
-	 *            MetaPattern pattern
+	 *            a <code>MetaPattern</code>
 	 */
 	public PatternValidator(final MetaPattern pattern)
 	{
@@ -122,7 +128,13 @@
 		return pattern;
 	}
 
-
+	/**
+	 * Checks a value against this <code>PatternValidator</code>'s
+	 * {@link Pattern}.
+	 * 
+	 * @param validatable
+	 *            the <code>IValidatable</code> to check
+	 */
 	protected Map variablesMap(IValidatable validatable)
 	{
 		final Map map = super.variablesMap(validatable);
@@ -138,6 +150,13 @@
 		return "[PatternValidator pattern = " + pattern + "]";
 	}
 
+	/**
+	 * Checks a value against this <code>PatternValidator</code>'s
+	 * {@link Pattern}.
+	 * 
+	 * @param validatable
+	 *            the <code>IValidatable</code> to check
+	 */
 	protected void onValidate(IValidatable validatable)
 	{
 		// Check value against pattern

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/StringValidator.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/StringValidator.java?rev=575705&r1=575704&r2=575705&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/StringValidator.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/validation/validator/StringValidator.java Fri Sep 14 07:41:14 2007
@@ -22,20 +22,21 @@
 
 
 /**
- * Validator for dealing with string lengths. Usually this validator is used
- * through the static factory methods, but it and its inner classes can also be
- * subclassed directly.
+ * Validator for checking <code>String</code> lengths. Usually this validator
+ * is used through the static factory methods, but it and its inner classes can
+ * also be subclassed directly.
  * 
  * @author Jonathan Locke
  * @author Johan Compagner
  * @author Igor Vaynberg (ivaynberg)
+ * @since 1.2.6
  */
 public abstract class StringValidator extends AbstractValidator
 {
 
 	/**
-	 * Validator to check if the length of the string is exactly the specified
-	 * length
+	 * Validator for checking if the length of a <code>String</code> is
+	 * exactly the specified length.
 	 */
 	public static class ExactLengthValidator extends StringValidator
 	{
@@ -43,9 +44,10 @@
 		private final int length;
 
 		/**
-		 * Construct.
+		 * Constructor.
 		 * 
 		 * @param length
+		 *            the length value
 		 */
 		public ExactLengthValidator(int length)
 		{
@@ -53,15 +55,18 @@
 		}
 
 		/**
-		 * Gets length.
+		 * Retrieves the length value.
 		 * 
-		 * @return length
+		 * @return the length value
 		 */
 		public final int getLength()
 		{
 			return length;
 		}
 
+		/**
+		 * see AbstractValidator#onValidate(IValidatable)
+		 */
 		protected void onValidate(IValidatable validatable)
 		{
 			if (((String)validatable.getValue()).length() != length)
@@ -71,13 +76,16 @@
 		}
 
 		/**
-		 * @see AbstractValidator#resourceKey(org.apache.wicket.markup.html.form.FormComponent)
+		 * @see AbstractValidator#resourceKey()
 		 */
 		protected String resourceKey()
 		{
 			return "StringValidator.exact";
 		}
 
+		/**
+		 * @see AbstractValidator#variablesMap(IValidatable)
+		 */
 		protected Map variablesMap(IValidatable validatable)
 		{
 			final Map map = super.variablesMap(validatable);
@@ -89,7 +97,8 @@
 	}
 
 	/**
-	 * Validator to check if the length of the string is within some range
+	 * Validator for checking if the length of a <code>String</code> is within
+	 * the specified range.
 	 */
 	public static class LengthBetweenValidator extends StringValidator
 	{
@@ -98,10 +107,12 @@
 		private final int minimum;
 
 		/**
-		 * Construct.
+		 * Constructor that sets the minimum and maximum values.
 		 * 
 		 * @param minimum
+		 *            the minimum value
 		 * @param maximum
+		 *            the maximum value
 		 */
 		public LengthBetweenValidator(int minimum, int maximum)
 		{
@@ -111,9 +122,9 @@
 		}
 
 		/**
-		 * Gets maximum.
+		 * Retrieves the maximum value.
 		 * 
-		 * @return maximum
+		 * @return the maximum value
 		 */
 		public final int getMaximum()
 		{
@@ -121,15 +132,18 @@
 		}
 
 		/**
-		 * Gets minimum.
+		 * Retrieves the minimum value.
 		 * 
-		 * @return minimum
+		 * @return the minimum value
 		 */
 		public final int getMinimum()
 		{
 			return minimum;
 		}
 
+		/**
+		 * see AbstractValidator#onValidate(IValidatable)
+		 */
 		protected void onValidate(IValidatable validatable)
 		{
 			final String value = (String)validatable.getValue();
@@ -141,7 +155,7 @@
 		}
 
 		/**
-		 * @see AbstractValidator#resourceKey(org.apache.wicket.markup.html.form.FormComponent)
+		 * @see AbstractValidator#resourceKey()
 		 */
 		protected String resourceKey()
 		{
@@ -149,7 +163,7 @@
 		}
 
 		/**
-		 * @see org.apache.wicket.validation.validator.AbstractValidator#variablesMap(org.apache.wicket.validation.IValidatable)
+		 * @see AbstractValidator#variablesMap(IValidatable)
 		 */
 		protected Map variablesMap(IValidatable validatable)
 		{
@@ -163,8 +177,8 @@
 	}
 
 	/**
-	 * Validator to check if the length of the string meets a maximum
-	 * requirement
+	 * Validator for checking if the length of a <code>String</code> meets the
+	 * maximum length requirement.
 	 */
 	public static class MaximumLengthValidator extends StringValidator
 	{
@@ -172,9 +186,10 @@
 		private final int maximum;
 
 		/**
-		 * Construct.
+		 * Constructor that sets a maximum length value.
 		 * 
 		 * @param maximum
+		 *            the maximum length value
 		 */
 		public MaximumLengthValidator(int maximum)
 		{
@@ -182,15 +197,18 @@
 		}
 
 		/**
-		 * Gets maximum.
+		 * Retrieves the maximum length value.
 		 * 
-		 * @return maximum
+		 * @return the maximum length value
 		 */
 		public final int getMaximum()
 		{
 			return maximum;
 		}
 
+		/**
+		 * see AbstractValidator#onValidate(IValidatable)
+		 */
 		protected void onValidate(IValidatable validatable)
 		{
 			if (((String)validatable.getValue()).length() > maximum)
@@ -200,7 +218,7 @@
 		}
 
 		/**
-		 * @see AbstractValidator#resourceKey(org.apache.wicket.markup.html.form.FormComponent)
+		 * @see AbstractValidator#resourceKey()
 		 */
 		protected String resourceKey()
 		{
@@ -208,7 +226,7 @@
 		}
 
 		/**
-		 * @see org.apache.wicket.validation.validator.AbstractValidator#variablesMap(org.apache.wicket.validation.IValidatable)
+		 * @see AbstractValidator#variablesMap(IValidatable)
 		 */
 		protected Map variablesMap(IValidatable validatable)
 		{
@@ -220,8 +238,8 @@
 	}
 
 	/**
-	 * Validator to check if the length of the string meets a minumum
-	 * requirement
+	 * Validator for checking if the length of a <code>String</code> meets the
+	 * minimum length requirement.
 	 */
 	public static class MinimumLengthValidator extends StringValidator
 	{
@@ -229,9 +247,10 @@
 		private final int minimum;
 
 		/**
-		 * Construct.
+		 * Constructor that sets a minimum length value.
 		 * 
 		 * @param minimum
+		 *            the minimum length value
 		 */
 		public MinimumLengthValidator(int minimum)
 		{
@@ -239,15 +258,18 @@
 		}
 
 		/**
-		 * Gets minimum.
+		 * Retrieves the minimum length value.
 		 * 
-		 * @return minimum
+		 * @return the minimum length value
 		 */
 		public final int getMinimum()
 		{
 			return minimum;
 		}
 
+		/**
+		 * see AbstractValidator#onValidate(IValidatable)
+		 */
 		protected void onValidate(IValidatable validatable)
 		{
 			if (((String)validatable.getValue()).length() < minimum)
@@ -257,7 +279,7 @@
 		}
 
 		/**
-		 * @see AbstractValidator#resourceKey(org.apache.wicket.markup.html.form.FormComponent)
+		 * @see AbstractValidator#resourceKey()
 		 */
 		protected String resourceKey()
 		{
@@ -265,7 +287,7 @@
 		}
 
 		/**
-		 * @see org.apache.wicket.validation.validator.AbstractValidator#variablesMap(org.apache.wicket.validation.IValidatable)
+		 * @see AbstractValidator#variablesMap(IValidatable)
 		 */
 		protected Map variablesMap(IValidatable validatable)
 		{
@@ -278,25 +300,25 @@
 	}
 
 	/**
-	 * Gets a String exact length validator to check if a string length is
-	 * exactly the same as the given value
-	 * 
-	 * If that is not the case then an error message will be generated with the
-	 * key "StringValidator.exact" and the messages keys that can be used are:
+	 * Gets a <code>String</code> exact length validator for checking if a
+	 * string length is exactly the same as the given length value. If that is
+	 * not the case, then an error message will be generated with the key
+	 * "StringValidator.exact". The message keys that can be used are:
+	 * <p>
 	 * <ul>
 	 * <li>${exact}: the maximum length</li>
 	 * <li>${length}: the length of the user input</li>
-	 * <li>${input}: the input the user did give</li>
-	 * <li>${name}: the name of the component that failed</li>
-	 * <li>${label}: the label of the component - either comes from
-	 * FormComponent.labelModel or resource key [form-id].[form-component-id] in
-	 * that order</li>
+	 * <li>${input}: the input the user gave</li>
+	 * <li>${name}: the name of the <code>Component</code> that failed</li>
+	 * <li>${label}: the label of the <code>Component</code> - either comes
+	 * from <code>FormComponent.labelModel</code> or resource key
+	 * [form-id].[form-component-id] in that order</li>
 	 * </ul>
 	 * 
 	 * @param length
-	 *            The required length of the string.
+	 *            the required length of the string
 	 * 
-	 * @return The StringValidator
+	 * @return the requested <code>StringValidator</code>
 	 */
 	public static StringValidator exactLength(int length)
 	{
@@ -304,28 +326,28 @@
 	}
 
 	/**
-	 * Gets a String range validator to check if a string length is between min
-	 * and max.
-	 * 
-	 * If that is not the case then an error message will be generated with the
-	 * key "StringValidator.range" and the messages keys that can be used are:
+	 * Gets a <code>String</code> range validator for checking if a string
+	 * length falls between the minimum and and maximum lengths. If that is not
+	 * the case, then an error message will be generated with the key
+	 * "StringValidator.range". The message keys that can be used are:
+	 * <p>
 	 * <ul>
 	 * <li>${minimum}: the minimum length</li>
 	 * <li>${maximum}: the maximum length</li>
 	 * <li>${length}: the length of the user input</li>
-	 * <li>${input}: the input the user did give</li>
-	 * <li>${name}: the name of the component that failed</li>
-	 * <li>${label}: the label of the component - either comes from
-	 * FormComponent.labelModel or resource key [form-id].[form-component-id] in
-	 * that order</li>
+	 * <li>${input}: the input the user gave</li>
+	 * <li>${name}: the name of the <code>Component</code> that failed</li>
+	 * <li>${label}: the label of the <code>Component</code> - either comes
+	 * from <code>FormComponent.labelModel</code> or resource key
+	 * [form-id].[form-component-id] in that order</li>
 	 * </ul>
 	 * 
 	 * @param minimum
-	 *            The minimum length of the string.
+	 *            the minimum length of the string
 	 * @param maximum
-	 *            The maximum length of the string.
+	 *            the maximum length of the string
 	 * 
-	 * @return The StringValidator
+	 * @return the requested <code>StringValidator</code>
 	 */
 	public static StringValidator lengthBetween(int minimum, int maximum)
 	{
@@ -333,25 +355,25 @@
 	}
 
 	/**
-	 * Gets a String maximum validator to check if a string length is smaller
-	 * then the given maximum value.
-	 * 
-	 * If that is not the case then an error message will be generated with the
-	 * key "StringValidator.maximum" and the messages keys that can be used are:
+	 * Gets a <code>String</code> maximum validator for checking if a string
+	 * length is smaller than the given maximum value. If that is not the case,
+	 * then an error message will be generated with the key
+	 * "StringValidator.maximum". The message keys that can be used are:
+	 * <p>
 	 * <ul>
 	 * <li>${maximum}: the maximum length</li>
 	 * <li>${length}: the length of the user input</li>
-	 * <li>${input}: the input the user did give</li>
-	 * <li>${name}: the name of the component that failed</li>
-	 * <li>${label}: the label of the component - either comes from
-	 * FormComponent.labelModel or resource key [form-id].[form-component-id] in
-	 * that order</li>
+	 * <li>${input}: the input the user gave</li>
+	 * <li>${name}: the name of the <code>Component</code> that failed</li>
+	 * <li>${label}: the label of the <code>Component</code> - either comes
+	 * from <code>FormComponent.labelModel</code> or resource key
+	 * [form-id].[form-component-id] in that order</li>
 	 * </ul>
 	 * 
 	 * @param maximum
-	 *            The maximum length of the string.
+	 *            the maximum length of the string
 	 * 
-	 * @return The StringValidator
+	 * @return the requested <code>StringValidator</code>
 	 */
 	public static StringValidator maximumLength(int maximum)
 	{
@@ -359,25 +381,25 @@
 	}
 
 	/**
-	 * Gets a String minimum validator to check if a string length is greater
-	 * then the given minimum value.
-	 * 
-	 * If that is not the case then an error message will be generated with the
-	 * key "StringValidator.minimum" and the messages keys that can be used are:
+	 * Gets a <code>String</code> minimum validator for checking if a string
+	 * length is greater than the given minimum value. If that is not the case,
+	 * then an error message will be generated with the key
+	 * "StringValidator.minimum". The message keys that can be used are:
+	 * <p>
 	 * <ul>
 	 * <li>${minimum}: the minimum length</li>
 	 * <li>${length}: the length of the user input</li>
-	 * <li>${input}: the input the user did give</li>
-	 * <li>${name}: the name of the component that failed</li>
-	 * <li>${label}: the label of the component - either comes from
-	 * FormComponent.labelModel or resource key [form-id].[form-component-id] in
-	 * that order</li>
+	 * <li>${input}: the input the user gave</li>
+	 * <li>${name}: the name of the <code>Component</code> that failed</li>
+	 * <li>${label}: the label of the <code>Component</code> - either comes
+	 * from <code>FormComponent.labelModel</code> or resource key
+	 * [form-id].[form-component-id] in that order</li>
 	 * </ul>
 	 * 
 	 * @param minimum
-	 *            The minimum length of the string.
+	 *            the minimum length of the string
 	 * 
-	 * @return The StringValidator
+	 * @return the requested <code>StringValidator</code>
 	 */
 	public static StringValidator minimumLength(int minimum)
 	{