Package org.ametys.web.usermanagement
Class UserSignupAction
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.ametys.web.usermanagement.UserSignupAction
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,Action
Handle the user sign-up actions.
-
Field Summary
Modifier and TypeFieldDescriptionprotected PageHelper
Page helperprotected URIPrefixHandler
The URI prefix handlerprotected RenderingContextHandler
The rendering contextprotected AmetysObjectResolver
The Ametys Resolverprotected SiteConfigurationExtensionPoint
The site configuration EP.protected UserManager
The user manager.protected UserPopulationDAO
The DAO for user populationsprotected UserSignupManager
The user signup manager.The UsersManager standard fields.Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionact
(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) protected void
checkToken
(Request request, String siteName, String email, String token, String populationId, String userDirectoryId, Multimap<String, I18nizableText> errors) Check that a token is valid.protected void
doSignup
(Request request, Parameters parameters, String siteName, String language, String firstname, String lastname, String email, String token, String populationId, String userDirectoryId, Multimap<String, I18nizableText> errors) Sign-up the user: create a real user from his temporary information.getAdditionalValues
(Request request, ModifiableUserDirectory userDirectory) Get FO user manager's custom field values.protected void
resetTempSignup
(Request request, String siteName, String language, String populationId, String userDirectoryId, Multimap<String, I18nizableText> errors) Reset a user's sign-up request.void
service
(ServiceManager serviceManager) protected void
temporarySignup
(Request request, Parameters parameters, String siteName, String language, String populationId, String userDirectoryId, Multimap<String, I18nizableText> errors) Store a user's sign-up request.Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
STANDARD_FIELDS
The UsersManager standard fields. -
_userSignupManager
The user signup manager. -
_userManager
The user manager. -
_userPopulationDAO
The DAO for user populations -
_siteConfiguration
The site configuration EP. -
_resolver
The Ametys Resolver -
_pageHelper
Page helper -
_renderingContextHandler
The rendering context -
_prefixHandler
The URI prefix handler
-
-
Constructor Details
-
UserSignupAction
public UserSignupAction()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableAction
- Throws:
ServiceException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception - Throws:
Exception
-
temporarySignup
protected void temporarySignup(Request request, Parameters parameters, String siteName, String language, String populationId, String userDirectoryId, Multimap<String, I18nizableText> errors) throws UserManagementExceptionStore a user's sign-up request.- Parameters:
request
- the user request.parameters
- the action parameters.siteName
- the site name.language
- the language.populationId
- The id of the populationuserDirectoryId
- The id of the user directory of the populationerrors
- the Map to fill with errors to display to the user.- Throws:
UserManagementException
- if an error occurs.
-
resetTempSignup
protected void resetTempSignup(Request request, String siteName, String language, String populationId, String userDirectoryId, Multimap<String, I18nizableText> errors) throws UserManagementExceptionReset a user's sign-up request.- Parameters:
request
- the user request.siteName
- the site name.language
- the language.populationId
- The id of the populationuserDirectoryId
- The id of the user directory of the populationerrors
- the Map to fill with errors to display to the user.- Throws:
UserManagementException
- if an error occurs.
-
checkToken
protected void checkToken(Request request, String siteName, String email, String token, String populationId, String userDirectoryId, Multimap<String, I18nizableText> errors) throws UserManagementExceptionCheck that a token is valid.- Parameters:
request
- the user request.siteName
- the site name.email
- the user e-mail.token
- the sign-up token that was sent to the user.populationId
- The id of the populationuserDirectoryId
- The id of the user directory of the populationerrors
- the Map to fill with errors to display to the user.- Throws:
UserManagementException
- if an error occurs.
-
doSignup
protected void doSignup(Request request, Parameters parameters, String siteName, String language, String firstname, String lastname, String email, String token, String populationId, String userDirectoryId, Multimap<String, I18nizableText> errors) throws UserManagementExceptionSign-up the user: create a real user from his temporary information.- Parameters:
request
- the user request.parameters
- the action parameters.siteName
- the site name.language
- the current language.firstname
- the user firstname.lastname
- the user lastname.email
- the user e-mail.token
- the sign-up token that was sent to the user.populationId
- The id of the populationuserDirectoryId
- The id of the user directory of the populationerrors
- the Map to fill with errors to display to the user.- Throws:
UserManagementException
- if an error occurs.
-
getAdditionalValues
protected Map<String,String> getAdditionalValues(Request request, ModifiableUserDirectory userDirectory) throws UserManagementException Get FO user manager's custom field values.- Parameters:
request
- the request.userDirectory
- the user directory- Returns:
- the custom field values.
- Throws:
UserManagementException
- if an error occurs.
-