org.chorem.bow.action
Class RegisterAction

java.lang.Object
  extended by com.opensymphony.xwork2.ActionSupport
      extended by org.chorem.bow.action.BowBaseAction
          extended by org.chorem.bow.action.RegisterAction
All Implemented Interfaces:
com.opensymphony.xwork2.Action, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, com.opensymphony.xwork2.ValidationAware, Serializable, org.apache.struts2.interceptor.ServletRequestAware, org.apache.struts2.interceptor.SessionAware

public class RegisterAction
extends BowBaseAction
implements org.apache.struts2.interceptor.ServletRequestAware

Enregistre un nouvel utilisateur

Author:
poussin
See Also:
Serialized Form

Field Summary
protected  String email
           
protected  String password
           
protected  String repeatPassword
           
protected  javax.servlet.http.HttpServletRequest request
           
 
Fields inherited from class org.chorem.bow.action.BowBaseAction
CONTEXT_ACTION_KEY, log, session, UNTRANSLATED_MARKER
 
Fields inherited from class com.opensymphony.xwork2.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork2.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
RegisterAction()
           
 
Method Summary
protected  boolean alreadyRegistered(String passwordMD5)
           
 String execute()
          Registers the new user and sends an email to confirm registration
 String getEmail()
           
 String getPassword()
           
 String getRepeatPassword()
           
 void setEmail(String email)
           
 void setPassword(String password)
           
 void setRepeatPassword(String repeatPassword)
           
 void setServletRequest(javax.servlet.http.HttpServletRequest request)
           
 
Methods inherited from class org.chorem.bow.action.BowBaseAction
getBowProxy, getBowSession, getSafeText, getText, getText, getText, getText, getText, getText, getText, getText, getText, setSession
 
Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, doDefault, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, pause, setActionErrors, setActionMessages, setFieldErrors, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

email

protected String email

password

protected String password

repeatPassword

protected String repeatPassword

request

protected javax.servlet.http.HttpServletRequest request
Constructor Detail

RegisterAction

public RegisterAction()
Method Detail

getEmail

public String getEmail()
Returns:
the email

setEmail

public void setEmail(String email)
Parameters:
email - the email to set

getPassword

public String getPassword()
Returns:
the password

setPassword

public void setPassword(String password)
Parameters:
password - the password to set

getRepeatPassword

public String getRepeatPassword()
Returns:
the repeatPassword

setRepeatPassword

public void setRepeatPassword(String repeatPassword)
Parameters:
repeatPassword - the repeatPassword to set

setServletRequest

public void setServletRequest(javax.servlet.http.HttpServletRequest request)
Specified by:
setServletRequest in interface org.apache.struts2.interceptor.ServletRequestAware

alreadyRegistered

protected boolean alreadyRegistered(String passwordMD5)
Parameters:
passwordMD5 - the user password hashed in md5
Returns:
false if the email address isn't already registered, true otherwise

execute

public String execute()
Registers the new user and sends an email to confirm registration

Specified by:
execute in interface com.opensymphony.xwork2.Action
Overrides:
execute in class com.opensymphony.xwork2.ActionSupport


Copyright © 2010-2011 CodeLutin. All Rights Reserved.