Class UserSignupManager
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.datasource.AbstractMyBatisDAO
-
- org.ametys.web.usermanagement.UserSignupManager
-
- org.ametys.plugins.userdirectory.signup.UserSignupManager
-
- org.ametys.plugins.workspaces.signup.UserSignupManager
-
- All Implemented Interfaces:
LogEnabled,PluginAware,Component,Configurable,Contextualizable,Serviceable
public class UserSignupManager extends UserSignupManager
This component overridesUserSignupManagerto handle invitations by mail for workspaces
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ametys.web.usermanagement.UserSignupManager
UserSignupManager.LostPasswordError, UserSignupManager.TempUser
-
-
Field Summary
Fields Modifier and Type Field Description private ProjectInvitationHelper_invitationHelperprivate ProjectManager_projectManager-
Fields inherited from class org.ametys.plugins.userdirectory.signup.UserSignupManager
_initWorkflowActionId, _workflowName
-
Fields inherited from class org.ametys.web.usermanagement.UserSignupManager
_i18nUtils, _pageUriResolver, _populationContextHelper, _pwdChangeTable, _resolver, _siteConf, _siteManager, _tempUsersTable, _uriResolverEP, _userManager, _userPopulationDAO, _userSignUpConfiguration, ROLE, SIGNUP_ERROR, SIGNUP_ERROR_TEMP_EMAIL_ALREADY_EXISTS, SIGNUP_ERROR_USER_ALREADY_EXISTS, SIGNUP_NO_ERROR, SIGNUP_RESET_ERROR_EMAIL_UNKNOWN, SIGNUP_TOKEN_EXPIRED, SIGNUP_TOKEN_UNKNOWN
-
Fields inherited from class org.ametys.core.datasource.AbstractMyBatisDAO
_manager
-
-
Constructor Summary
Constructors Constructor Description UserSignupManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private String_getSignupSiteName(String siteName)voidadditionalSignupOperations(User createdUser, Multimap<String,I18nizableText> errors)Process additional operations after creation of userPagegetPwdChangePage(String siteName, String language)Get the password change page in a given site and sitemap.AmetysObjectIterable<Page>getPwdChangePages(String siteName, String language)Get all the pages tagged "password change".PagegetSignupPage(String siteName, String language)Get the sign-up page in a given site and sitemap.
If more than one page are tagged "sign-up", return the first.AmetysObjectIterable<Page>getSignupPages(String siteName, String language)Get all the pages tagged "sign-up".booleanisPublicSignupAllowed(String siteName)Test if public signup is allowed in a site.voidservice(ServiceManager serviceManager)inttemporarySignup(String siteName, String language, String email, String population, String userDirectoryId)Validate and store a sign-up request and send a confirmation e-mail.-
Methods inherited from class org.ametys.plugins.userdirectory.signup.UserSignupManager
_getRequest, configure, contextualize, validationBeforeSignup
-
Methods inherited from class org.ametys.web.usermanagement.UserSignupManager
addPasswordToken, addTemporaryUser, changeUserPassword, checkPasswordToken, checkPublicSignup, checkToken, getGTUContent, getGTUPage, getSuccessContent, getSuccessPage, getTempUser, getTempUser, getToken, removeExpiredPasswordTokens, removeExpiredTokens, removePasswordToken, removeTempUser, resetPassword, resetTempSignup, sendResetPasswordMail, sendSignupConfirmMail, sendSignupValidatedMail, signup, temporarySignup, updateTempToken, userExists, validate, validatePassword
-
Methods inherited from class org.ametys.core.datasource.AbstractMyBatisDAO
_configureDatasource, _getDataSourceId, _getMyBatisConfiguration, getSession, getSession, reload, setPluginInfo
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_projectManager
private ProjectManager _projectManager
-
_invitationHelper
private ProjectInvitationHelper _invitationHelper
-
-
Constructor Detail
-
UserSignupManager
public UserSignupManager()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classUserSignupManager- Throws:
ServiceException
-
temporarySignup
public int temporarySignup(String siteName, String language, String email, String population, String userDirectoryId) throws UserManagementException
Description copied from class:UserSignupManagerValidate and store a sign-up request and send a confirmation e-mail.- Overrides:
temporarySignupin classUserSignupManager- Parameters:
siteName- the site name.language- the sitemap name.email- the user e-mail address.population- the populationuserDirectoryId- the id of the user directory of the population- Returns:
- a status code indicating success or error.
- Throws:
UserManagementException- if an error occurs.
-
additionalSignupOperations
public void additionalSignupOperations(User createdUser, Multimap<String,I18nizableText> errors) throws UserManagementException
Description copied from class:UserSignupManagerProcess additional operations after creation of user- Overrides:
additionalSignupOperationsin classUserSignupManager- Parameters:
createdUser- the created usererrors- the map of errors to fill in case of errors during additional operations- Throws:
UserManagementException- if an error occurs.
-
isPublicSignupAllowed
public boolean isPublicSignupAllowed(String siteName)
Description copied from class:UserSignupManagerTest if public signup is allowed in a site.- Overrides:
isPublicSignupAllowedin classUserSignupManager- Parameters:
siteName- the site to test.- Returns:
- true if public signup is allowed, false otherwise.
-
getSignupPage
public Page getSignupPage(String siteName, String language)
Description copied from class:UserSignupManagerGet the sign-up page in a given site and sitemap.
If more than one page are tagged "sign-up", return the first.- Overrides:
getSignupPagein classUserSignupManager- Parameters:
siteName- the site name.language- the sitemap name.- Returns:
- the sign-up page or null if not found.
-
getSignupPages
public AmetysObjectIterable<Page> getSignupPages(String siteName, String language)
Description copied from class:UserSignupManagerGet all the pages tagged "sign-up".- Overrides:
getSignupPagesin classUserSignupManager- Parameters:
siteName- the site name.language- the sitemap name.- Returns:
- an iterable on all the pages tagged "sign-up".
-
getPwdChangePage
public Page getPwdChangePage(String siteName, String language)
Description copied from class:UserSignupManagerGet the password change page in a given site and sitemap. If more than one page are tagged "password change", return the first.- Overrides:
getPwdChangePagein classUserSignupManager- Parameters:
siteName- the site name.language- the sitemap name.- Returns:
- the password change page or null if not found.
-
getPwdChangePages
public AmetysObjectIterable<Page> getPwdChangePages(String siteName, String language)
Description copied from class:UserSignupManagerGet all the pages tagged "password change".- Overrides:
getPwdChangePagesin classUserSignupManager- Parameters:
siteName- the site name.language- the sitemap name.- Returns:
- an iterable on all the pages tagged "password change".
-
_getSignupSiteName
private String _getSignupSiteName(String siteName)
-
-