Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.action
Class EmailResetPasswordToken

java.lang.Object
  extended by com.opensymphony.xwork.ActionSupport
      extended by com.jivesoftware.base.action.JiveActionSupport
          extended by com.jivesoftware.forum.action.ForumActionSupport
              extended by com.jivesoftware.forum.action.EmailResetPasswordToken
All Implemented Interfaces:
AuthTokenAware, EntityAware, UserAware, ForumFactoryAware, com.opensymphony.webwork.interceptor.ServletRequestAware, com.opensymphony.webwork.interceptor.ServletResponseAware, com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware, com.uwyn.rife.continuations.ContinuableObject, java.io.Serializable, java.lang.Cloneable

public class EmailResetPasswordToken
extends ForumActionSupport
implements com.opensymphony.xwork.Validateable

This class is an Action which encapsulates all the logic needed for resetting a user's password.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.jivesoftware.forum.action.ForumActionSupport
CANCEL, DISABLED, FATAL, NOTFOUND, SESSION_REFERRER_KEY, UNAUTHORIZED
 
Fields inherited from class com.jivesoftware.base.action.JiveActionSupport
pageUser, request, response
 
Fields inherited from class com.opensymphony.xwork.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
EmailResetPasswordToken()
           
 
Method Summary
 java.lang.String doDefault()
          WW default command.
 java.lang.String execute()
          This method will send the user specified an email with instructions on how to reset their password.
 java.lang.String getDoCancel()
           
 java.lang.String getUsername()
          Returns the username as entered by the user.
 void setDoCancel(java.lang.String doCancel)
           
 void setUsername(java.lang.String username)
          Sets the username.
 void validate()
          WW validation method.
 
Methods inherited from class com.jivesoftware.forum.action.ForumActionSupport
getCanAttach, getCanCreateMessage, getCanCreatePoll, getCanCreatePoll, getCanCreateThread, getCanCreateThread, getCanEdit, getCanEditAttach, getCanEditPoll, getCanEditPoll, getCanEditProfile, getCanEditTags, getCanPostAnnounce, getCanPostAnnounce, getCanRead, getCanRead, getEntityDescriptor, getForumFactory, getPageUser, getReadStatus, getSkinProperty, getThemeName, isAdmin, isAdmin, isAuthor, isAuthor, isMessageModerationOn, isModerator, isModerator, isResourceInTheme, isSystemAdmin, isThreadModerationOn, setForumFactory, setUser
 
Methods inherited from class com.jivesoftware.base.action.JiveActionSupport
getAuthToken, getGuestProperty, getJiveProperty, getLocales, getPageURL, getSession, getText, getText, getTimeZone, getTimeZones, isFailedLookup, isGuest, setAuthToken, setGuestProperty, setLoginAttributes, setPageUser, setServletRequest, setServletResponse
 
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, 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
 

Constructor Detail

EmailResetPasswordToken

public EmailResetPasswordToken()
Method Detail

getUsername

public java.lang.String getUsername()
Returns the username as entered by the user.


setUsername

public void setUsername(java.lang.String username)
Sets the username.


getDoCancel

public java.lang.String getDoCancel()

setDoCancel

public void setDoCancel(java.lang.String doCancel)

validate

public void validate()
WW validation method. This method checks to see if the username is null and whether it exists in the system, adding error messages if not.

Specified by:
validate in interface com.opensymphony.xwork.Validateable
Overrides:
validate in class com.opensymphony.xwork.ActionSupport

doDefault

public java.lang.String doDefault()
WW default command. Returns the "disabled" view if password resetting has been disabled by setting the passwordReset.enabled property to false. Otherwise, the INPUT view is returned.

Overrides:
doDefault in class com.opensymphony.xwork.ActionSupport

execute

public java.lang.String execute()
This method will send the user specified an email with instructions on how to reset their password. Included in the instructions is a 'token' string which is good for 72 hours. By following the instructions given in the email the user will be able to reset their password.

If the user has already been sent a password reset email in the last 72 hours, the token will not be regenerated but will instead be reused in the instructional email. Conversely, if the user has been sent an email prior to the last 72 hours, the token will be regenerated and saved. In either case, no more than 1 email every 24 hours will be sent. Attempts to send more than 1 email per 24 hours will result in this method returning an error.

You can insert the following tokens into the subject or body of the email message and they'll be dynamically replaced with the appropriate values when the email is sent: {userID}, {username}, {name}, {email}, {token}, {requestIP}, {jiveURL}.

The details of the email can be changed using the Jive admin skin, the default email is below:

Password reset request.

{name},

We have received a request from ${requestIP} to reset your password.
If you have requested to reset your password, please follow the instructions below. If you do not wish to reset your password, please simply disregard this message.

To reset your Jive password you can either:

- Click the following url:
{jiveURL}/resetPassword!default.jspa?userid={userID}&token={token}

- Goto
{jiveURL}/resetPassword!default.jspa and enter the following information into the fields provided:

UserID: {userID}
Token: {token}

Specified by:
execute in interface com.opensymphony.xwork.Action
Overrides:
execute in class ForumActionSupport
Returns:
True if the email was send successfully, false otherwise

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.