public class UserSignupAction extends ServiceableAction
Modifier and Type | Field and Description |
---|---|
private static String |
__SIGNUP_SERVICE_PARAMETER_USERDIRECTORY |
protected PageHelper |
_pageHelper
Page helper
|
protected AmetysObjectResolver |
_resolver
The Ametys Resolver
|
protected SiteConfigurationExtensionPoint |
_siteConfiguration
The site configuration EP.
|
protected UserManager |
_userManager
The user manager.
|
protected UserPopulationDAO |
_userPopulationDAO
The DAO for user populations
|
protected UserSignupManager |
_userSignupManager
The user signup manager.
|
static Set<String> |
STANDARD_FIELDS
The UsersManager standard fields.
|
manager
EMPTY_MAP
Constructor and Description |
---|
UserSignupAction() |
Modifier and Type | Method and Description |
---|---|
Map |
act(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,
String siteName,
String email,
String token,
String populationId,
String userDirectoryId,
Multimap<String,I18nizableText> errors)
Sign-up the user: create a real user from his temporary information.
|
protected Map<String,String> |
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.
|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
public static final Set<String> STANDARD_FIELDS
private static final String __SIGNUP_SERVICE_PARAMETER_USERDIRECTORY
protected UserSignupManager _userSignupManager
protected UserManager _userManager
protected UserPopulationDAO _userPopulationDAO
protected SiteConfigurationExtensionPoint _siteConfiguration
protected AmetysObjectResolver _resolver
protected PageHelper _pageHelper
public UserSignupAction()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableAction
ServiceException
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
Exception
protected void temporarySignup(Request request, Parameters parameters, String siteName, String language, String populationId, String userDirectoryId, Multimap<String,I18nizableText> errors) throws UserManagementException
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.UserManagementException
- if an error occurs.protected void resetTempSignup(Request request, String siteName, String language, String populationId, String userDirectoryId, Multimap<String,I18nizableText> errors) throws UserManagementException
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.UserManagementException
- if an error occurs.protected void checkToken(Request request, String siteName, String email, String token, String populationId, String userDirectoryId, Multimap<String,I18nizableText> errors) throws UserManagementException
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.UserManagementException
- if an error occurs.protected void doSignup(Request request, String siteName, String email, String token, String populationId, String userDirectoryId, Multimap<String,I18nizableText> errors) throws UserManagementException
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.UserManagementException
- if an error occurs.protected Map<String,String> getAdditionalValues(Request request, ModifiableUserDirectory userDirectory) throws UserManagementException
request
- the request.userDirectory
- the user directoryUserManagementException
- if an error occurs.