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

Quick Search    Search Deep

com.RuntimeCollective.webapps.action
Class RegisterAction  view RegisterAction download RegisterAction.java

java.lang.Object
  extended byorg.apache.struts.action.Action
      extended bycom.RuntimeCollective.webapps.action.RegisterAction

public class RegisterAction
extends org.apache.struts.action.Action

Implementation of Action that registers a new user on the system.

Version:
$Id: RegisterAction.java,v 1.7 2003/09/30 15:13:08 joe Exp $

Field Summary
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
RegisterAction()
           
 
Method Summary
 org.apache.struts.action.ActionForward perform(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Checks if the given email or username exists in the database.
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegisterAction

public RegisterAction()
Method Detail

perform

public org.apache.struts.action.ActionForward perform(org.apache.struts.action.ActionMapping mapping,
                                                      org.apache.struts.action.ActionForm form,
                                                      javax.servlet.http.HttpServletRequest request,
                                                      javax.servlet.http.HttpServletResponse response)
                                               throws java.io.IOException,
                                                      javax.servlet.ServletException
Checks if the given email or username exists in the database.

The following local Forwards are returned:
failureEmail - the email address already exists
failure - the username already exists, or there is another problem
success - the user has been registered successfully.
successLogin - the user has typed in an email address, loginName and password that all match an existing user, so they have been logged in
Alternatively, if a URL String exists on the session under com.RuntimeCollective.webapps.bean.LoginCookie.RETURN_URL_NAME, this will be returned instead of success.

Error messages:
error.db.connection - if it was not possible to connect to the database.
error.user.loginNameExists - if the loginName already exists
error.user.exist - if the email already exists
error.user.emailExists - the email exists with a *different* loginName.
error.user.userExists - if the email *and* loginName alread exist