Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.webapps.form
Class NewUserEmailForm  view NewUserEmailForm download NewUserEmailForm.java

java.lang.Object
  extended byorg.apache.struts.action.ActionForm
      extended bycom.RuntimeCollective.webapps.form.NewUserEmailForm
All Implemented Interfaces:
java.io.Serializable

public class NewUserEmailForm
extends org.apache.struts.action.ActionForm

Form used for a new user to type his email. The email is checked for validity, and that it's not used already.

Version:
$Id: NewUserEmailForm.java,v 1.3 2003/09/30 15:13:14 joe Exp $

Field Summary
protected  java.lang.String email
          The email address of the user.
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
NewUserEmailForm()
           
 
Method Summary
 java.lang.String getEmail()
          Get the email address of the user.
 com.RuntimeCollective.webapps.bean.EntityBean populateBean(com.RuntimeCollective.webapps.bean.EntityBean bean)
          Populate a User bean from this form.
 void populateForm(com.RuntimeCollective.webapps.bean.EntityBean bean)
          Populate this form from a User bean.
 void reset(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
          Reset all properties to default values.
 void setEmail(java.lang.String email)
          Set the email address of the user.
 org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
          Validate logon field entries.
static boolean validEmail(java.lang.String email)
          Validate an email address.
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

email

protected java.lang.String email
The email address of the user. Also used as the unique login identifier.

Constructor Detail

NewUserEmailForm

public NewUserEmailForm()
Method Detail

getEmail

public java.lang.String getEmail()
Get the email address of the user. Also used as the unique login identifier.


setEmail

public void setEmail(java.lang.String email)
Set the email address of the user. Also used as the unique login identifier.


validate

public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
                                                      javax.servlet.http.HttpServletRequest request)
Validate logon field entries.

Error codes returned:

  • error.logon.null - if either the email or password is "".
  • error.logon.invalidEmail - if the email address is not valid.
  • error.user.confirm - if the confirmation does not match the password.
  • error.logon.passwordShort - if the password was < 6 letters


  • validEmail

    public static boolean validEmail(java.lang.String email)
    Validate an email address.


    reset

    public void reset(org.apache.struts.action.ActionMapping mapping,
                      javax.servlet.http.HttpServletRequest request)
    Reset all properties to default values.


    populateBean

    public com.RuntimeCollective.webapps.bean.EntityBean populateBean(com.RuntimeCollective.webapps.bean.EntityBean bean)
                                                               throws java.sql.SQLException
    Populate a User bean from this form.


    populateForm

    public void populateForm(com.RuntimeCollective.webapps.bean.EntityBean bean)
    Populate this form from a User bean. Sets formAction to "edit".