com.gisgraphy.webapp.action
Class SignupAction

java.lang.Object
  extended by com.opensymphony.xwork2.ActionSupport
      extended by com.gisgraphy.webapp.action.BaseAction
          extended by com.gisgraphy.webapp.action.SignupAction
All Implemented Interfaces:
com.opensymphony.xwork2.Action, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, com.opensymphony.xwork2.ValidationAware, Serializable

public class SignupAction
extends BaseAction

Action to allow new users to sign up.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.gisgraphy.webapp.action.BaseAction
CANCEL, delete, from, log, mailEngine, mailMessage, roleManager, save, templateName, userManager
 
Fields inherited from class com.opensymphony.xwork2.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork2.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
SignupAction()
           
 
Method Summary
 String doDefault()
          Returns "input"
 String execute()
          When method=GET, "input" is returned.
 User getUser()
          Return an instance of the user - to display when validation errors occur
 String save()
          Save the user, encrypting their passwords if necessary
 void setCancel(String cancel)
           
 void setUser(User user)
           
 
Methods inherited from class com.gisgraphy.webapp.action.BaseAction
cancel, getConfiguration, getRequest, getResponse, getSession, saveMessage, sendUserMessage, setDelete, setFrom, setMailEngine, setMailMessage, setRoleManager, setSave, setTemplateName, setUserManager
 
Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, 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
 

Constructor Detail

SignupAction

public SignupAction()
Method Detail

setCancel

public void setCancel(String cancel)

setUser

public void setUser(User user)

getUser

public User getUser()
Return an instance of the user - to display when validation errors occur

Returns:
a populated user

execute

public String execute()
When method=GET, "input" is returned. Otherwise, "success" is returned.

Specified by:
execute in interface com.opensymphony.xwork2.Action
Overrides:
execute in class com.opensymphony.xwork2.ActionSupport
Returns:
cancel, input or success

doDefault

public String doDefault()
Returns "input"

Overrides:
doDefault in class com.opensymphony.xwork2.ActionSupport
Returns:
"input" by default

save

public String save()
            throws Exception
Save the user, encrypting their passwords if necessary

Returns:
success when good things happen
Throws:
Exception - when bad things happen


Copyright © 2012. All Rights Reserved.