Package org.ametys.web.usermanagement
Class UserSignupManager
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.datasource.AbstractMyBatisDAO
org.ametys.web.usermanagement.UserSignupManager
- All Implemented Interfaces:
- LogEnabled,- PluginAware,- Component,- Configurable,- Contextualizable,- Serviceable
- Direct Known Subclasses:
- UserSignupManager
Manages registration and password recovery of users.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumEnumeration for the different type of signupstatic classBean representing a user sign-up request.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected CurrentUserProviderThe current user providerprotected I18nUtilsThe i18n utils.protected PopulationContextHelperThe population context helper.protected StringThe password change table.protected RenderingContextHandlerThe rendering context handlerprotected AmetysObjectResolverThe ametys object resolver.protected RightManagerThe right managerprotected SiteConfigurationExtensionPointThe site configuration extension point.protected SiteManagerThe site manager.protected StringThe temporary users table.protected UserDirectoryFactoryfactory for user directory modelsprotected UserManagerThe user manager.protected UserPopulationDAOThe DAO for user populationsprotected UserSignUpConfigurationThe user sign up configurationstatic final StringId of service for signup pagesstatic final StringTag for password pagesstatic final StringThe component role.static final StringId of service for signup pagesstatic final StringTag for signup pagesstatic final StringThe Signup Service parameter : userDirectorystatic final StringThe site parameter name for signup typeFields inherited from class org.ametys.core.datasource.AbstractMyBatisDAO_manager
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidadditionalSignupOperations(User createdUser, Multimap<String, I18nizableText> errors) Process additional operations after creation of uservoidaddPasswordToken(String siteName, String login, String token, String population) Create a user password change request in the database.protected voidaddTemporaryUser(String siteName, String email, String token, String population, String userDirectoryId, String lastname, String firstname, UserSignupManager.TempUser.TempUserOrigin origin) Create a user sign-up request ("temporary" user) in the database.voidchangeUserPassword(String siteName, String login, String token, String newPassword, String population) Change the user password.voidcheckPasswordToken(String siteName, String login, String token, String population) Check the password change request token.protected voidcheckPublicSignup(String siteName) Verify that public sign-up is allowed.protected voidcheckSignupAllowed(String siteName) Verify that public sign-up is allowed.voidCheck the sign-up request token.protected voidcheckUserAllowedForInvitation(String siteName, String populationId) Verify that current user is allowed to handle invitation for a given populationvoidconfigure(Configuration configuration) getAllowedUserPopulationForInvitation(String siteName) Get the ids of user populations the current user can handle for invitationgetGTUContent(ZoneItem zoneItem) Get the GTU content Returns null if not found or emptygetGTUPage(ZoneItem zoneItem) Get the GTU page Returns null if not found or emptygetOrCreateToken(String siteName, String language, String email, String population, String userDirectoryId) Temporary sign the user in and returns the tokengetPwdChangePage(String siteName, String language) Get the password change page in a given site and sitemap.getPwdChangePages(String siteName, String language) Get all the pages tagged "password change".getResetPasswordUri(Page passwordPage, String login, String population, String token, boolean absolute) Get the URI to reset a passwordgetSignupPage(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.getSignupPage(String siteName, String language, String populationId, String userDirectoryId) Get the sign-up page in a given site and sitemap, configured for given population and user directory.
 If more than one page are tagged "sign-up", return the first.getSignupPages(String siteName, String language) Get all the pages tagged "sign-up" with signup servicegetSignupPages(String siteName, String language, String populationId, String userDirectoryId) Get all the pages tagged "sign-up" with signup service configured for given population and user directorygetSignupType(String siteName) Get the type of signup authorized for this sitegetSuccessContent(ZoneItem zoneItem) Get the success content Returns null if not found or emptygetSuccessPage(ZoneItem zoneItem) Get the GTU page Returns null if not found or emptyprotected UserSignupManager.TempUsergetTempUser(String siteName, String email, String population, String userDirectoryId) Get a temporary user from his site name and e-mail.protected UserSignupManager.TempUserGet a temporary user from his site name, e-mail and/or token.getTempUsers(String siteName, Map<String, Object> searchParameters, int offset, int limit, List<Map<String, String>> sorts) Get the temporary users from a given site matching the search parametersgetTempUsersProperties(List<String> emails, String siteName) Get temporary users propertiesGet a token for temp userintgetTotalCount(String siteName, Map<String, Object> searchParameters) Get the number of temporary users matching the search parametersgetUserDirectory(ZoneItem zoneItem) Get the user directorygetUserIfHeExists(String email, String siteName) Get the user from email if he/she exists in the populationsvoidinviteToSignup(String siteName, String language, String email, String population, String userDirectoryId, String lastname, String firstname) Validate and store a invitation to sign-up request and send a confirmation e-mail.voidinviteToSignup(String siteName, String language, String email, String population, String userDirectoryId, String lastname, String firstname, boolean sendMail, boolean resendInvitationIfExists, boolean checkRights) Validate and store a invitation to sign-up request and send a confirmation e-mail.booleanisPublicSignupAllowed(String siteName) Test if public signup is allowed in a site.booleanisPwdChangePage(Page page) Check if page is a change password pagebooleanisSignupAllowed(String siteName) Test if signup is allowed in a site, public or on invitationbooleanisSignupPage(Page page) Check if page is a signup pagevoidRemove the expired change password request tokens.voidRemove the expired sign-up request tokens (user request only)intremoveExpiredTokens(String siteName) Remove the expired sign-up request tokens (user request only)protected voidremovePasswordToken(String siteName, String login, String token, String population) Remove the password change request.protected voidremoveTempUser(String siteName, String email, String token, String population, String userDirectoryId) Remove the temporary .voidresendInvitation(String siteName, String email, String population, String userDirectoryId) Update susbcription date and resend an invitationvoidresetPassword(String siteName, String language, String loginOrEmail, String populationId) Create a reset password request and send a confirmation e-mail.voidresetTempSignup(String siteName, String language, String email, String population, String userDirectoryId) Reset a sign-up request: generate a new token and re-send the confirmation e-mail.protected voidresetTempSignup(String siteName, String language, String email, String token, String population, String userDirectoryId) Reset a sign-up request: generate a new token and re-send the confirmation e-mail.searchTempUsers(String siteName, Map<String, Object> searchParameters, int offset, int limit, List<Map<String, String>> sorts) Get the temporary users from a given site matching the search parametersprotected voidsendResetPasswordMail(String siteName, String language, User user, String token) Send a sign-up confirmation link by e-mail.protected voidsendSignupConfirmMail(UserSignupManager.TempUser tempUser, String language) Send a sign-up confirmation link by e-mail.protected voidsendSignupValidatedMail(String siteName, String language, User user) Send a sign-up confirmation link by e-mail.voidservice(ServiceManager serviceManager) voidsignup(String siteName, String language, String firstname, String lastname, String email, String token, String password, String population, String userDirectoryId, Multimap<String, I18nizableText> errors) Create the user in the FO UsersManager from his temporary request.voidtemporarySignup(String siteName, String language, String email, String population, String userDirectoryId) Validate and store a sign-up request and send a confirmation e-mail.voidtemporarySignup(String siteName, String language, String email, String population, String userDirectoryId, boolean sendMail) Validate and store a sign-up request and send a confirmation e-mail.protected voidupdateTempToken(String siteName, String email, String newToken, String population, String userDirectoryId) Update the sign-up request token: reset the date and set a new token.booleanuserExists(String email, String siteName) Tests if the user already exists in the populationsValidate the user subscription data.validatePassword(String siteName, String password, String login, String population) Validate the user password.voidDo some validation before signupMethods inherited from class org.ametys.core.datasource.AbstractMyBatisDAO_configureDatasource, _getDataSourceId, _getMyBatisConfiguration, contextualize, getSession, getSession, reload, setPluginInfoMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabledgetLogger, setLogger
- 
Field Details- 
ROLEThe component role.
- 
SITE_PARAM_SIGNUP_TYPEThe site parameter name for signup type- See Also:
 
- 
SIGNUP_SERVICE_PARAMETER_USERDIRECTORYThe Signup Service parameter : userDirectory- See Also:
 
- 
SIGNUP_PAGE_TAG_NAMETag for signup pages- See Also:
 
- 
SIGNUP_PAGE_SERVICE_IDId of service for signup pages- See Also:
 
- 
CHANGE_PASSWORD_PAGE_TAG_NAMETag for password pages- See Also:
 
- 
CHANGE_PASSWORD_PAGE_SERVICE_IDId of service for signup pages- See Also:
 
- 
_userManagerThe user manager.
- 
_userPopulationDAOThe DAO for user populations
- 
_siteManagerThe site manager.
- 
_siteConfThe site configuration extension point.
- 
_resolverThe ametys object resolver.
- 
_i18nUtilsThe i18n utils.
- 
_userSignUpConfigurationThe user sign up configuration
- 
_tempUsersTableThe temporary users table.
- 
_pwdChangeTableThe password change table.
- 
_populationContextHelperThe population context helper.
- 
_renderingContextHandlerThe rendering context handler
- 
_userDirectoryFactoryfactory for user directory models
- 
_currentUserProviderThe current user provider
- 
_rightManagerThe right manager
 
- 
- 
Constructor Details- 
UserSignupManagerpublic UserSignupManager()
 
- 
- 
Method Details- 
service- Specified by:
- servicein interface- Serviceable
- Overrides:
- servicein class- AbstractMyBatisDAO
- Throws:
- ServiceException
 
- 
configure- Specified by:
- configurein interface- Configurable
- Overrides:
- configurein class- AbstractMyBatisDAO
- Throws:
- ConfigurationException
 
- 
getSignupTypeGet the type of signup authorized for this site- Parameters:
- siteName- the site name
- Returns:
- the of signup
 
- 
isPublicSignupAllowedTest if public signup is allowed in a site.- Parameters:
- siteName- the site to test.
- Returns:
- true if public signup is allowed, false otherwise.
 
- 
isSignupAllowedTest if signup is allowed in a site, public or on invitation- Parameters:
- siteName- the site to test.
- Returns:
- true if signup is allowed, false otherwise.
 
- 
getSignupPageGet the sign-up page in a given site and sitemap.
 If more than one page are tagged "sign-up", return the first.- Parameters:
- siteName- the site name.
- language- the sitemap name.
- Returns:
- the sign-up page or null if not found.
 
- 
getSignupPagepublic Page getSignupPage(String siteName, String language, String populationId, String userDirectoryId) Get the sign-up page in a given site and sitemap, configured for given population and user directory.
 If more than one page are tagged "sign-up", return the first.- Parameters:
- siteName- the site name.
- language- the sitemap name.
- populationId- The population id. Can be null to not check population.
- userDirectoryId- The user directory id. Can be null to not check user directory.
- Returns:
- the sign-up page or null if not found.
 
- 
isSignupPageCheck if page is a signup page- Parameters:
- page- the page
- Returns:
- true if the page contains the signup service
 
- 
getSignupPagesGet all the pages tagged "sign-up" with signup service- Parameters:
- siteName- the site name.
- language- the sitemap name.
- Returns:
- an iterable on all the pages tagged "sign-up".
 
- 
getSignupPagespublic List<Page> getSignupPages(String siteName, String language, String populationId, String userDirectoryId) Get all the pages tagged "sign-up" with signup service configured for given population and user directory- Parameters:
- siteName- the site name.
- language- the sitemap name.
- populationId- The population id. Can be null to not check population.
- userDirectoryId- The user directory id. Can be null to not check user directory.
- Returns:
- an iterable on all the pages tagged "sign-up".
 
- 
getPwdChangePageGet the password change page in a given site and sitemap. If more than one page are tagged "password change", return the first.- Parameters:
- siteName- the site name.
- language- the sitemap name.
- Returns:
- the password change page or null if not found.
 
- 
getGTUPageGet the GTU page Returns null if not found or empty- Parameters:
- zoneItem- the zone item
- Returns:
- the GTU page or null.
 
- 
getUserDirectoryGet the user directory- Parameters:
- zoneItem- the zone item with signup service
- Returns:
- The user directory or null if not found
 
- 
getGTUContentGet the GTU content Returns null if not found or empty- Parameters:
- zoneItem- the zone item
- Returns:
- the GTU content or null.
 
- 
getSuccessPageGet the GTU page Returns null if not found or empty- Parameters:
- zoneItem- the zone item
- Returns:
- the success page or null.
 
- 
getSuccessContentGet the success content Returns null if not found or empty- Parameters:
- zoneItem- the zone item
- Returns:
- the success content or null.
 
- 
getPwdChangePagesGet all the pages tagged "password change".- Parameters:
- siteName- the site name.
- language- the sitemap name.
- Returns:
- an iterable on all the pages tagged "password change".
 
- 
isPwdChangePageCheck if page is a change password page- Parameters:
- page- the page
- Returns:
- true if the page contains the change password service
 
- 
getUserIfHeExistspublic Optional<User> getUserIfHeExists(String email, String siteName) throws UserManagementException, NotUniqueUserException Get the user from email if he/she exists in the populations- Parameters:
- email- the e-mail to test.
- siteName- The site name
- Returns:
- the user if the user exists, empty otherwise.
- Throws:
- UserManagementException- if an error occurs.
- NotUniqueUserException- if several user respond to the email
 
- 
userExistsTests if the user already exists in the populations- Parameters:
- email- the e-mail to test.
- siteName- The site name
- Returns:
- true if the user exists, false otherwise.
- Throws:
- UserManagementException- if an error occurs.
 
- 
validatepublic Map<String,Errors> validate(String siteName, String email, Map<String, String> additionalValues) throws UserManagementExceptionValidate the user subscription data.- Parameters:
- siteName- the site name.
- email- the user e-mail.
- additionalValues- the additional user values.
- Returns:
- a Map of the Errors by field.
- Throws:
- UserManagementException- if an error occurs.
 
- 
validatePasswordpublic Map<String,Errors> validatePassword(String siteName, String password, String login, String population) throws UserManagementException Validate the user password.- Parameters:
- siteName- the site name.
- password- the password to validate.
- login- the login of the user
- population- The id of the population
- Returns:
- a Map of the Errors by field.
- Throws:
- UserManagementException- if an error occurs.
 
- 
getOrCreateTokenpublic String getOrCreateToken(String siteName, String language, String email, String population, String userDirectoryId) throws UserManagementException Temporary sign the user in and returns the token- Parameters:
- siteName- The site's name
- language- The page's language
- email- The email of the user
- population- The population ID
- userDirectoryId- The userDirectory ID
- Returns:
- The sign-up token
- Throws:
- UserManagementException- If an error occurs
 
- 
temporarySignuppublic void temporarySignup(String siteName, String language, String email, String population, String userDirectoryId) throws UserManagementException Validate and store a sign-up request and send a confirmation e-mail.- Parameters:
- siteName- the site name.
- language- the sitemap name.
- email- the user e-mail address.
- population- the population
- userDirectoryId- the id of the user directory of the population
- Throws:
- UserManagementException- if an error occurs.
 
- 
temporarySignuppublic void temporarySignup(String siteName, String language, String email, String population, String userDirectoryId, boolean sendMail) throws UserManagementException Validate and store a sign-up request and send a confirmation e-mail.- Parameters:
- siteName- the site name.
- language- the sitemap name.
- email- the user e-mail address.
- population- the population
- userDirectoryId- the id of the user directory of the population
- sendMail- Set to false to not send mail at end of process
- Throws:
- UserManagementException- if an error occurs.
 
- 
inviteToSignuppublic void inviteToSignup(String siteName, String language, String email, String population, String userDirectoryId, String lastname, String firstname) throws UserManagementException Validate and store a invitation to sign-up request and send a confirmation e-mail.- Parameters:
- siteName- the site name.
- language- the sitemap name.
- email- the user e-mail address.
- population- the population
- userDirectoryId- the id of the user directory of the population
- lastname- The guest last name. Can be null.
- firstname- The guest first name. Can be null.
- Throws:
- UserManagementException- if an error occurs.
 
- 
inviteToSignuppublic void inviteToSignup(String siteName, String language, String email, String population, String userDirectoryId, String lastname, String firstname, boolean sendMail, boolean resendInvitationIfExists, boolean checkRights) throws UserManagementException Validate and store a invitation to sign-up request and send a confirmation e-mail.- Parameters:
- siteName- the site name.
- language- the sitemap name.
- email- the user e-mail address.
- population- the population
- userDirectoryId- the id of the user directory of the population
- lastname- The guest last name. Can be null.
- firstname- The guest first name. Can be null.
- sendMail- Set to false to not send mail at end of process
- resendInvitationIfExists- Set to false to not resend invitation if the email already exists as a user waiting signup
- checkRights- set to false to ignore rights
- Throws:
- UserManagementException- if an error occurs.
 
- 
getTokenpublic String getToken(String siteName, String email, String population, String userDirectoryId) throws UserManagementException Get a token for temp user- Parameters:
- siteName- the site name.
- email- the user e-mail address.
- population- The id of the population
- userDirectoryId- The id of the user directory of the population
- Returns:
- the user token or null if not found
- Throws:
- UserManagementException- if an error occurs.
 
- 
resendInvitationpublic void resendInvitation(String siteName, String email, String population, String userDirectoryId) throws UserManagementException Update susbcription date and resend an invitation- Parameters:
- siteName- the site name
- email- the email
- population- the population id
- userDirectoryId- the user directory id
- Throws:
- UserManagementException- if an error occurred
 
- 
resetTempSignuppublic void resetTempSignup(String siteName, String language, String email, String population, String userDirectoryId) throws UserManagementException Reset a sign-up request: generate a new token and re-send the confirmation e-mail.- Parameters:
- siteName- the site name.
- language- the sitemap name.
- email- the user e-mail address.
- population- The id of the population
- userDirectoryId- The id of the user directory of the population
- Throws:
- UserManagementException- if an error occurs.
 
- 
resetTempSignupprotected void resetTempSignup(String siteName, String language, String email, String token, String population, String userDirectoryId) throws UserManagementException Reset a sign-up request: generate a new token and re-send the confirmation e-mail.- Parameters:
- siteName- the site name.
- language- the sitemap name.
- email- the user e-mail address.
- token- the token. Can be null to not re-generate token.
- population- The id of the population
- userDirectoryId- The id of the user directory of the population
- Throws:
- UserManagementException- if an error occurs.
 
- 
signuppublic void signup(String siteName, String language, String firstname, String lastname, String email, String token, String password, String population, String userDirectoryId, Multimap<String, I18nizableText> errors) throws UserManagementExceptionCreate the user in the FO UsersManager from his temporary request.- Parameters:
- siteName- the site name.
- language- the current language
- firstname- the user firstname
- lastname- the user lastname
- email- the user e-mail address.
- token- the request token.
- password- the user password.
- population- The id of the population
- userDirectoryId- The id of the user directory of the population
- errors- the errors
- Throws:
- UserManagementException- if an error occurs.
 
- 
validationBeforeSignupDo some validation before signup- Parameters:
- errors- the map of errors to fill in cause of errors during validation
 
- 
additionalSignupOperationspublic void additionalSignupOperations(User createdUser, Multimap<String, I18nizableText> errors) throws UserManagementExceptionProcess additional operations after creation of user- Parameters:
- createdUser- the created user
- errors- the map of errors to fill in case of errors during additional operations
- Throws:
- UserManagementException- if an error occurs.
 
- 
resetPasswordpublic void resetPassword(String siteName, String language, String loginOrEmail, String populationId) throws UserManagementException Create a reset password request and send a confirmation e-mail.- Parameters:
- siteName- the site name.
- language- the sitemap name.
- loginOrEmail- the user login or email.
- populationId- the population
- Throws:
- UserManagementException- if an error occurs.
 
- 
changeUserPasswordpublic void changeUserPassword(String siteName, String login, String token, String newPassword, String population) throws UserManagementException Change the user password.- Parameters:
- siteName- the site name.
- login- the user login.
- token- the password change request token.
- newPassword- the new password.
- population- the population
- Throws:
- UserManagementException- if an error occurs.
 
- 
checkTokenpublic void checkToken(String siteName, String email, String token, String population, String userDirectoryId) throws UserManagementException Check the sign-up request token.- Parameters:
- siteName- the site name.
- email- the user e-mail.
- token- the sign-up request token.
- population- The id of the population
- userDirectoryId- The id of the user directory of the population
- Throws:
- UserManagementException- if an error occurs.
 
- 
checkPasswordTokenpublic void checkPasswordToken(String siteName, String login, String token, String population) throws UserManagementException Check the password change request token.- Parameters:
- siteName- the site name.
- login- the user login.
- token- the password change request token.
- population- the population
- Throws:
- UserManagementException- if an error occurs.
 
- 
removeExpiredTokensRemove the expired sign-up request tokens (user request only)- Throws:
- UserManagementException- if an error occurs.
 
- 
removeExpiredTokensRemove the expired sign-up request tokens (user request only)- Parameters:
- siteName- the site name. Can be null.
- Returns:
- the number of deleted tokens
- Throws:
- UserManagementException- if an error occurs.
 
- 
removeExpiredPasswordTokensRemove the expired change password request tokens.- Throws:
- UserManagementException- if an error occurs.
 
- 
checkPublicSignupVerify that public sign-up is allowed. If not, throw an exception.- Parameters:
- siteName- the site name.
- Throws:
- UserManagementException- if public sign-up is not enabled.
 
- 
checkSignupAllowedVerify that public sign-up is allowed. If not, throw an exception.- Parameters:
- siteName- the site name.
- Throws:
- UserManagementException- if public sign-up is not enabled.
 
- 
addTemporaryUserprotected void addTemporaryUser(String siteName, String email, String token, String population, String userDirectoryId, String lastname, String firstname, UserSignupManager.TempUser.TempUserOrigin origin) throws UserManagementException Create a user sign-up request ("temporary" user) in the database.- Parameters:
- siteName- the site name.
- email- the user e-mail.
- token- the generated token.
- population- the population
- userDirectoryId- the id of the user directory of the population
- lastname- The guest last name. Can be null.
- firstname- The guest first name. Can be null.
- origin- true if this signup request origin
- Throws:
- UserManagementException- if an error occurs.
 
- 
sendSignupConfirmMailprotected void sendSignupConfirmMail(UserSignupManager.TempUser tempUser, String language) throws UserManagementException Send a sign-up confirmation link by e-mail.- Parameters:
- tempUser- the temp user
- language- the e-mail language.
- Throws:
- UserManagementException- if an error occurs.
 
- 
sendSignupValidatedMailprotected void sendSignupValidatedMail(String siteName, String language, User user) throws UserManagementException Send a sign-up confirmation link by e-mail.- Parameters:
- siteName- the site name.
- language- the e-mail language.
- user- the created user
- Throws:
- UserManagementException- if an error occurs.
 
- 
updateTempTokenprotected void updateTempToken(String siteName, String email, String newToken, String population, String userDirectoryId) throws UserManagementException Update the sign-up request token: reset the date and set a new token.- Parameters:
- siteName- the site name.
- email- the user e-mail.
- newToken- the new token.
- population- The id of the population
- userDirectoryId- The id of the user directory of the population
- Throws:
- UserManagementException- if an error occurs.
 
- 
addPasswordTokenpublic void addPasswordToken(String siteName, String login, String token, String population) throws UserManagementException Create a user password change request in the database.- Parameters:
- siteName- the site name.
- login- the user login.
- token- the generated token.
- population- the population
- Throws:
- UserManagementException- if an error occurs.
 
- 
getTempUserprotected UserSignupManager.TempUser getTempUser(String siteName, String email, String population, String userDirectoryId) throws UserManagementException Get a temporary user from his site name and e-mail.- Parameters:
- siteName- the site name.
- email- The temporary user e-mail. Cannot be null.
- population- the population
- userDirectoryId- the id of the user directory of the population
- Returns:
- the temporary user or null if not found.
- Throws:
- UserManagementException- if an error occurs.
 
- 
getTempUsersPropertiespublic Map<String,Object> getTempUsersProperties(List<String> emails, String siteName) throws UserManagementException Get temporary users properties- Parameters:
- emails- the emails of temporary users
- siteName- the site name of temporary users
- Returns:
- The temporary users properties
- Throws:
- UserManagementException- if an error occurs.
 
- 
searchTempUserspublic Map<String,Object> searchTempUsers(String siteName, Map<String, Object> searchParameters, int offset, int limit, List<Map<String, throws UserManagementExceptionString>> sorts) Get the temporary users from a given site matching the search parameters- Parameters:
- siteName- the site name
- searchParameters- the search parameters
- offset- index of the start of search
- limit- the maximum number of results
- sorts- The sorters
- Returns:
- the temporary users as JSON object
- Throws:
- UserManagementException- if an error occurs.
 
- 
checkUserAllowedForInvitationprotected void checkUserAllowedForInvitation(String siteName, String populationId) throws UserManagementException Verify that current user is allowed to handle invitation for a given population- Parameters:
- siteName- the site name.
- populationId- The population id
- Throws:
- UserManagementException- if user is not allowed
 
- 
getAllowedUserPopulationForInvitationGet the ids of user populations the current user can handle for invitation- Parameters:
- siteName- the site name
- Returns:
- the ids of user populations handled by current users
 
- 
getTempUserspublic List<UserSignupManager.TempUser> getTempUsers(String siteName, Map<String, Object> searchParameters, int offset, int limit, List<Map<String, throws UserManagementExceptionString>> sorts) Get the temporary users from a given site matching the search parameters- Parameters:
- siteName- the site name. Can not be null
- searchParameters- The search parameters
- offset- index of the start of search
- limit- the maximum number of results
- sorts- The sorters. Can be null or empty
- Returns:
- the temporary users
- Throws:
- UserManagementException- if an error occurs.
 
- 
getTotalCountpublic int getTotalCount(String siteName, Map<String, Object> searchParameters) throws UserManagementExceptionGet the number of temporary users matching the search parameters- Parameters:
- siteName- the site name. Can not be null
- searchParameters- The search parameters
- Returns:
- the total number of results
- Throws:
- UserManagementException- if an error occurs.
 
- 
getTempUserprotected UserSignupManager.TempUser getTempUser(String siteName, String email, String token, String population, String userDirectoryId) throws UserManagementException Get a temporary user from his site name, e-mail and/or token. At least one of e-mail and token must be provided.- Parameters:
- siteName- the site name.
- email- The temporary user e-mail. Can be null.
- token- The temporary user token. Can be null.
- population- the population. Must be not null if email is not null
- userDirectoryId- the id of the user directory of the population. Must be not null if email is not null
- Returns:
- the temporary user or null if not found.
- Throws:
- UserManagementException- if an error occurs.
 
- 
removeTempUserprotected void removeTempUser(String siteName, String email, String token, String population, String userDirectoryId) throws UserManagementException Remove the temporary .- Parameters:
- siteName- the site name.
- email- the user e-mail address.
- token- the request token.
- population- the population
- userDirectoryId- the id of the user directory of the population
- Throws:
- UserManagementException- if an error occurs.
 
- 
removePasswordTokenprotected void removePasswordToken(String siteName, String login, String token, String population) throws UserManagementException Remove the password change request.- Parameters:
- siteName- the site name.
- login- the user login.
- token- the request token.
- population- the population
- Throws:
- UserManagementException- if an error occurs.
 
- 
sendResetPasswordMailprotected void sendResetPasswordMail(String siteName, String language, User user, String token) throws UserManagementException Send a sign-up confirmation link by e-mail.- Parameters:
- siteName- the site name.
- language- the e-mail language.
- user- the user object.
- token- the generated token.
- Throws:
- UserManagementException- if an error occurs.
 
- 
getResetPasswordUripublic String getResetPasswordUri(Page passwordPage, String login, String population, String token, boolean absolute) Get the URI to reset a password- Parameters:
- passwordPage- The passwodr page. Can not be null.
- login- the user login
- population- the user population
- token- the generated token
- absolute- true to get absolute uri
- Returns:
- the computed uri
 
 
-