FileDocCategorySizeDatePackage
ClientValidator.javaAPI DocExample826Fri Apr 11 18:42:20 BST 2003com.jspservletcookbook

ClientValidator

public class ClientValidator extends Object implements Serializable

Fields Summary
String
email
String
password
boolean
valid
Constructors Summary
public ClientValidator()


    this.valid=false;
Methods Summary
public java.lang.StringgetEmail()


    return email; 
public java.lang.StringgetPassword()


    return password; 
public booleanisValid()


	/* Use a Data Access Object to validate the email and password.
        If the validation does not fail then set this.valid to true*/
   this.valid=true;
   return valid;
   
   
public voidsetEmail(java.lang.String _email)


     if(_email != null && _email.length() > 0)
        email = _email;
    else
         email = "Unknown";
public voidsetPassword(java.lang.String _password)


     if(_password != null && _password.length() > 0)
        password = _password;
    else
         password = "Unknown";