org.apache.jetspeed.portlets.registration
Class ForgottenPasswordPortlet

java.lang.Object
  extended by javax.portlet.GenericPortlet
      extended by org.apache.portals.bridges.common.GenericServletPortlet
          extended by org.apache.portals.bridges.velocity.GenericVelocityPortlet
              extended by org.apache.portals.bridges.velocity.AbstractVelocityMessagingPortlet
                  extended by org.apache.jetspeed.portlets.registration.ForgottenPasswordPortlet
All Implemented Interfaces:
javax.portlet.Portlet, javax.portlet.PortletConfig

public class ForgottenPasswordPortlet
extends org.apache.portals.bridges.velocity.AbstractVelocityMessagingPortlet

This portlet allows a logged on user to change its password.

Version:
$Id: $
Author:
David Sean Taylor, Chris Schaefer

Field Summary
private  org.apache.jetspeed.administration.PortalAdministration admin
           
private static String CTX_CHANGEDPW_MSG
           
private static String CTX_EMAIL_ADDRESS
           
private static String CTX_MESSAGE
           
private static String CTX_NEW_PASSWORD
           
private static String CTX_RETURN_URL
           
private static String CTX_USER_NAME
           
private  String emailSubject
          localized emailSubject
private static String IP_REDIRECT_PATH
           
private static String IP_RETURN_URL
           
private static String IP_TEMPLATE_LOCATION
           
private static String IP_TEMPLATE_NAME
           
private static String MSG_CHANGEDPW_MSG
           
private static String MSG_MESSAGE
           
private static String PATH_SEPARATOR
           
private static String RB_EMAIL_SUBJECT
           
private  String redirectPath
          path where to redirect to after pressing submit on the form
private  String returnUrlPath
          servlet path of the return url to be printed and href'd in email template
private static String RP_EMAIL_ADDRESS
           
private  String templateLocation
          email template to use for merging
private  org.apache.jetspeed.locator.JetspeedTemplateLocator templateLocator
           
private  String templateName
           
private  org.apache.jetspeed.security.UserManager userManager
           
 
Fields inherited from class org.apache.portals.bridges.velocity.AbstractVelocityMessagingPortlet
STATUS_MESSAGE
 
Fields inherited from class org.apache.portals.bridges.velocity.GenericVelocityPortlet
PORTLET_BRIDGE_CONTEXT
 
Fields inherited from class org.apache.portals.bridges.common.GenericServletPortlet
PARAM_ACTION_PAGE, PARAM_ALLOW_PREFERENCES, PARAM_CUSTOM_PAGE, PARAM_EDIT_PAGE, PARAM_HELP_PAGE, PARAM_MAX_PAGE, PARAM_VIEW_PAGE
 
Constructor Summary
ForgottenPasswordPortlet()
           
 
Method Summary
 void doView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
           
protected  String generateRedirectURL(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response)
           
protected  String generateReturnURL(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response, String urlGUID)
           
protected  String getEmailSubject(javax.portlet.PortletRequest request)
           
protected  String getPassword(org.apache.jetspeed.security.User user)
           
protected  String getTemplatePath(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
           
protected  String getUserName(org.apache.jetspeed.security.User user)
           
 void init(javax.portlet.PortletConfig config)
           
private  boolean isValidGUID(String guid)
           
static String makeGUID(String user, String newpw)
           
protected  List makeMessage(String msg)
           
 void processAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
           
private  boolean updatePasswordFromGUID(String guid)
           
 
Methods inherited from class org.apache.portals.bridges.velocity.AbstractVelocityMessagingPortlet
cancelRenderMessage, consumeRenderMessage, getTopic, isEmpty, publishRenderMessage, receiveRenderMessage, setTopic
 
Methods inherited from class org.apache.portals.bridges.velocity.GenericVelocityPortlet
doCustom, doEdit, doHelp, doPreferencesEdit, getContext, getContext, render, setupPreferencesEdit
 
Methods inherited from class org.apache.portals.bridges.common.GenericServletPortlet
getDefaultActionPage, getDefaultCustomPage, getDefaultEditPage, getDefaultHelpPage, getDefaultViewPage, processPreferencesAction, setDefaultActionPage, setDefaultCustomPage, setDefaultEditPage, setDefaultHelpPage, setDefaultViewPage
 
Methods inherited from class javax.portlet.GenericPortlet
destroy, doDispatch, getInitParameter, getInitParameterNames, getPortletConfig, getPortletContext, getPortletName, getResourceBundle, getTitle, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

admin

private org.apache.jetspeed.administration.PortalAdministration admin

userManager

private org.apache.jetspeed.security.UserManager userManager

RP_EMAIL_ADDRESS

private static final String RP_EMAIL_ADDRESS
See Also:
Constant Field Values

MSG_MESSAGE

private static final String MSG_MESSAGE
See Also:
Constant Field Values

MSG_CHANGEDPW_MSG

private static final String MSG_CHANGEDPW_MSG
See Also:
Constant Field Values

CTX_EMAIL_ADDRESS

private static final String CTX_EMAIL_ADDRESS
See Also:
Constant Field Values

CTX_RETURN_URL

private static final String CTX_RETURN_URL
See Also:
Constant Field Values

CTX_NEW_PASSWORD

private static final String CTX_NEW_PASSWORD
See Also:
Constant Field Values

CTX_USER_NAME

private static final String CTX_USER_NAME
See Also:
Constant Field Values

CTX_MESSAGE

private static final String CTX_MESSAGE
See Also:
Constant Field Values

CTX_CHANGEDPW_MSG

private static final String CTX_CHANGEDPW_MSG
See Also:
Constant Field Values

IP_REDIRECT_PATH

private static final String IP_REDIRECT_PATH
See Also:
Constant Field Values

IP_RETURN_URL

private static final String IP_RETURN_URL
See Also:
Constant Field Values

IP_TEMPLATE_LOCATION

private static final String IP_TEMPLATE_LOCATION
See Also:
Constant Field Values

IP_TEMPLATE_NAME

private static final String IP_TEMPLATE_NAME
See Also:
Constant Field Values

RB_EMAIL_SUBJECT

private static final String RB_EMAIL_SUBJECT
See Also:
Constant Field Values

PATH_SEPARATOR

private static final String PATH_SEPARATOR
See Also:
Constant Field Values

templateLocation

private String templateLocation
email template to use for merging


templateName

private String templateName

templateLocator

private org.apache.jetspeed.locator.JetspeedTemplateLocator templateLocator

returnUrlPath

private String returnUrlPath
servlet path of the return url to be printed and href'd in email template


redirectPath

private String redirectPath
path where to redirect to after pressing submit on the form


emailSubject

private String emailSubject
localized emailSubject

Constructor Detail

ForgottenPasswordPortlet

public ForgottenPasswordPortlet()
Method Detail

init

public void init(javax.portlet.PortletConfig config)
          throws javax.portlet.PortletException
Specified by:
init in interface javax.portlet.Portlet
Overrides:
init in class org.apache.portals.bridges.velocity.GenericVelocityPortlet
Throws:
javax.portlet.PortletException

isValidGUID

private boolean isValidGUID(String guid)

updatePasswordFromGUID

private boolean updatePasswordFromGUID(String guid)

doView

public void doView(javax.portlet.RenderRequest request,
                   javax.portlet.RenderResponse response)
            throws javax.portlet.PortletException,
                   IOException
Overrides:
doView in class org.apache.portals.bridges.velocity.GenericVelocityPortlet
Throws:
javax.portlet.PortletException
IOException

makeGUID

public static String makeGUID(String user,
                              String newpw)

processAction

public void processAction(javax.portlet.ActionRequest request,
                          javax.portlet.ActionResponse response)
                   throws javax.portlet.PortletException,
                          IOException
Specified by:
processAction in interface javax.portlet.Portlet
Overrides:
processAction in class org.apache.portals.bridges.velocity.GenericVelocityPortlet
Throws:
javax.portlet.PortletException
IOException

getEmailSubject

protected String getEmailSubject(javax.portlet.PortletRequest request)

generateReturnURL

protected String generateReturnURL(javax.portlet.PortletRequest request,
                                   javax.portlet.PortletResponse response,
                                   String urlGUID)

generateRedirectURL

protected String generateRedirectURL(javax.portlet.PortletRequest request,
                                     javax.portlet.PortletResponse response)

getUserName

protected String getUserName(org.apache.jetspeed.security.User user)

getPassword

protected String getPassword(org.apache.jetspeed.security.User user)

makeMessage

protected List makeMessage(String msg)

getTemplatePath

protected String getTemplatePath(javax.portlet.ActionRequest request,
                                 javax.portlet.ActionResponse response)


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.