Package org.ametys.web.usermanagement
Class UserPasswordAction
- java.lang.Object
 - 
- org.apache.avalon.framework.logger.AbstractLogEnabled
 - 
- org.apache.cocoon.acting.AbstractAction
 - 
- org.apache.cocoon.acting.ServiceableAction
 - 
- org.ametys.web.usermanagement.UserPasswordAction
 
 
 
 
 
- 
- All Implemented Interfaces:
 Component,LogEnabled,Serviceable,Action
public class UserPasswordAction extends ServiceableAction
Handle the lost password and change password actions. 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected CurrentUserProvider_currentUserProviderThe current user providerprotected RenderingContextHandler_renderingContextHandlerThe rendering context handler.protected UserSignupManager_userSignupManagerThe user signup manager.- 
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager 
- 
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP 
 - 
 
- 
Constructor Summary
Constructors Constructor Description UserPasswordAction() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mapact(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters)protected voidchangeUserPassword(Request request, String siteName, String token, Multimap<String,I18nizableText> errors)Sign-up the user: create a real user from his temporary information.protected voidcheckPasswordToken(Request request, String siteName, String login, String token, String populationId, Multimap<String,I18nizableText> errors)Check that a token is valid.protected voidresetConnectedUserPassword(Request request, String siteName, String language, Multimap<String,I18nizableText> errors)Reset a connected user password.protected voidresetPassword(Request request, String siteName, String language, Multimap<String,I18nizableText> errors)Reset a user's sign-up request.voidservice(ServiceManager serviceManager)protected voidsetGlobalError(UserSignupManager.LostPasswordError error, Multimap<String,I18nizableText> errors, String login, String populationId)Set the global error if there is one.- 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger 
 - 
 
 - 
 
- 
- 
Field Detail
- 
_userSignupManager
protected UserSignupManager _userSignupManager
The user signup manager. 
- 
_renderingContextHandler
protected RenderingContextHandler _renderingContextHandler
The rendering context handler. 
- 
_currentUserProvider
protected CurrentUserProvider _currentUserProvider
The current user provider 
 - 
 
- 
Constructor Detail
- 
UserPasswordAction
public UserPasswordAction()
 
 - 
 
- 
Method Detail
- 
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
 servicein interfaceServiceable- Overrides:
 servicein classServiceableAction- Throws:
 ServiceException
 
- 
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
- Throws:
 Exception
 
- 
resetPassword
protected void resetPassword(Request request, String siteName, String language, Multimap<String,I18nizableText> errors) throws UserManagementException
Reset a user's sign-up request.- Parameters:
 request- the user request.siteName- the site name.language- the language.errors- the Map to fill with errors to display to the user.- Throws:
 UserManagementException- if an error occurs.
 
- 
resetConnectedUserPassword
protected void resetConnectedUserPassword(Request request, String siteName, String language, Multimap<String,I18nizableText> errors) throws UserManagementException
Reset a connected user password.- Parameters:
 request- the user request.siteName- the site name.language- the language.errors- the Map to fill with errors to display to the user.- Throws:
 UserManagementException- if an error occurs.
 
- 
checkPasswordToken
protected void checkPasswordToken(Request request, String siteName, String login, String token, String populationId, Multimap<String,I18nizableText> errors) throws UserManagementException
Check that a token is valid.- Parameters:
 request- the user request.siteName- the site name.login- the user login.token- the sign-up token that was sent to the user.populationId- The id of the populationerrors- the Map to fill with errors to display to the user.- Throws:
 UserManagementException- if an error occurs.
 
- 
changeUserPassword
protected void changeUserPassword(Request request, String siteName, String token, Multimap<String,I18nizableText> errors) throws UserManagementException
Sign-up the user: create a real user from his temporary information.- Parameters:
 request- the user request.siteName- the site name.token- the sign-up token that was sent to the user.errors- the Map to fill with errors to display to the user.- Throws:
 UserManagementException- if an error occurs.
 
- 
setGlobalError
protected void setGlobalError(UserSignupManager.LostPasswordError error, Multimap<String,I18nizableText> errors, String login, String populationId)
Set the global error if there is one.- Parameters:
 error- The error to add (can be null)errors- The errors maplogin- The login of the user (can be null)populationId- The population of the user (can be null)
 
 - 
 
 -