|
Jive Forums API (5.5.8) Developer Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opensymphony.xwork.ActionSupport
com.jivesoftware.base.action.LoginAction
public class LoginAction
This class is an Action which encapsulates all the logic of user log-in. This action expects a username, password and optionally a flag for auto-login.
Unlike other Actions that have declared views, the views for this action largely depend on the context it's being executed from. For that reason, this Action expects to be told where to redirect to after 1) a successful login and 2) when the user cancels the login. These parameters can be set as properties of this action (parameters viewed with respect to the web), in the request as an attribute or in the user's session.
| Field Summary | |
|---|---|
protected boolean |
autoLogin
|
protected boolean |
cancel
|
protected java.lang.String |
cancelURL
|
protected boolean |
createAccount
|
static java.lang.String |
LOGIN_CANCEL_URL
The URL where a user redirects after a cancel is issued. |
static java.lang.String |
LOGIN_SUCCESS_URL
The URL where a user redirects after a successful login. |
protected java.lang.String |
password
|
protected java.lang.String |
successURL
|
protected java.lang.String |
username
|
| Fields inherited from class com.opensymphony.xwork.ActionSupport |
|---|
LOG |
| Fields inherited from interface com.opensymphony.xwork.Action |
|---|
ERROR, INPUT, LOGIN, NONE, SUCCESS |
| Constructor Summary | |
|---|---|
LoginAction()
|
|
| Method Summary | |
|---|---|
java.lang.String |
doCancel()
Deprecated. |
java.lang.String |
doDefault()
|
java.lang.String |
doWithRedirect()
Webwork command that sets the success and cancel urls to be the referer and then calls the default command. |
java.lang.String |
execute()
Attempt to log the user in. |
java.lang.String |
getCancelURL()
Returns the url that the login will redirect to upon a cancel request. |
java.lang.String |
getPassword()
Returns the password used to do a login. |
java.lang.String |
getSuccessURL()
Returns the url that the login will redirect to upon a successful login. |
java.lang.String |
getUsername()
Returns the username used to do a login. |
protected java.lang.String |
handleCancel()
|
protected java.lang.String |
handleCreateAccount()
|
protected java.lang.String |
handleLogin()
|
boolean |
isAutoLogin()
Returns true if the user wants to enable auto-login, false otherwise. |
boolean |
isCancel()
|
void |
setAutoLogin(boolean autoLogin)
Sets whether or not the user wants to automatically login. |
void |
setDoCancel(java.lang.String cancel)
|
void |
setNewaccount(java.lang.String s)
|
void |
setPassword(java.lang.String password)
Sets the password used to do a login if the password is not null and not a zero-length String. |
void |
setRegistrationManager(RegistrationManager registrationManager)
|
void |
setServletRequest(javax.servlet.http.HttpServletRequest request)
|
void |
setServletResponse(javax.servlet.http.HttpServletResponse response)
|
void |
setSession(java.util.Map session)
|
void |
setSuccessURL(java.lang.String successURL)
Sets the url that the login will redirect to upon a successful login. |
void |
setUsername(java.lang.String username)
Sets the username used to do a login if the username is not null and not a zero-length String. |
void |
validate()
|
| Methods inherited from class com.opensymphony.xwork.ActionSupport |
|---|
addActionError, addActionMessage, addFieldError, clearErrorsAndMessages, clone, doInput, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, pause, setActionErrors, setActionMessages, setFieldErrors |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String LOGIN_SUCCESS_URL
public static final java.lang.String LOGIN_CANCEL_URL
protected java.lang.String username
protected java.lang.String password
protected boolean autoLogin
protected java.lang.String successURL
protected java.lang.String cancelURL
protected boolean cancel
protected boolean createAccount
| Constructor Detail |
|---|
public LoginAction()
| Method Detail |
|---|
public void setServletRequest(javax.servlet.http.HttpServletRequest request)
setServletRequest in interface com.opensymphony.webwork.interceptor.ServletRequestAwarepublic void setServletResponse(javax.servlet.http.HttpServletResponse response)
setServletResponse in interface com.opensymphony.webwork.interceptor.ServletResponseAwarepublic void setSession(java.util.Map session)
setSession in interface com.opensymphony.webwork.interceptor.SessionAwarepublic void setRegistrationManager(RegistrationManager registrationManager)
setRegistrationManager in interface RegistrationManagerAwarepublic java.lang.String getUsername()
public void setUsername(java.lang.String username)
username - the username used to do a login.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password - the password used to do a login.public boolean isAutoLogin()
public void setAutoLogin(boolean autoLogin)
autoLogin - whether or not the user wants to automatically login.public java.lang.String getSuccessURL()
public void setSuccessURL(java.lang.String successURL)
successURL - the url that the login will redirect to upon a successful login.public java.lang.String getCancelURL()
public void setNewaccount(java.lang.String s)
public boolean isCancel()
public void setDoCancel(java.lang.String cancel)
public void validate()
validate in interface com.opensymphony.xwork.Validateablevalidate in class com.opensymphony.xwork.ActionSupportpublic java.lang.String doDefault()
doDefault in class com.opensymphony.xwork.ActionSupportpublic java.lang.String doWithRedirect()
public java.lang.String execute()
throws java.lang.Exception
execute in interface com.opensymphony.xwork.Actionexecute in class com.opensymphony.xwork.ActionSupportAction.SUCCESS view if the login attempt
was successful.
java.lang.Exceptionprotected java.lang.String handleLogin()
protected java.lang.String handleCancel()
protected java.lang.String handleCreateAccount()
public java.lang.String doCancel()
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||