org.jscience.sociology.forms.util
Class PasswordGroup

java.lang.Object
  extended by org.jscience.sociology.forms.util.PasswordGroup
All Implemented Interfaces:
java.io.Serializable, GroupValidator

public class PasswordGroup
extends java.lang.Object
implements GroupValidator

This class is a typical implementation of GroupValidator interface. The criteria of validation here is well known - two password fields must have the same value.

See Also:
GroupValidator, Serialized Form

Constructor Summary
PasswordGroup()
           
 
Method Summary
 java.util.Hashtable getErrorMessages(java.util.Hashtable nameValuePairs)
          Implements the same method of GroupValidator interface.
 void setGroupErrorMessage(java.lang.String groupErrorMessage)
          Implements the same method of GroupValidator interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordGroup

public PasswordGroup()
Method Detail

setGroupErrorMessage

public void setGroupErrorMessage(java.lang.String groupErrorMessage)
Implements the same method of GroupValidator interface.

Specified by:
setGroupErrorMessage in interface GroupValidator
Parameters:
groupErrorMessage - an error message for both password fields of this group.

getErrorMessages

public java.util.Hashtable getErrorMessages(java.util.Hashtable nameValuePairs)
Implements the same method of GroupValidator interface.

Specified by:
getErrorMessages in interface GroupValidator
Parameters:
nameValuePairs - name-value pairs to be tested.
Returns:
a Hashtable of name-errormessage pairs.