public class SignUpConfiguration
extends java.lang.Object
SignUpAssistantComponent
Modifier and Type | Class and Description |
---|---|
static class |
SignUpConfiguration.EmailConfig
Configures the options related to sending an email response, after a successful user registration.
|
static class |
SignUpConfiguration.PasswordRecovery
Configures the Password Recovery feature of the SignUp Assistant.
|
Modifier and Type | Field and Description |
---|---|
java.lang.String |
activationCodeField
(Optional) The name of the field used to store the auto-generate activation code.
|
int |
activationCodeLength
(Optional) If the activationCodeField is used this property will indicate
the length of the activation hash code.
|
boolean |
checkForDuplicateEmails
Checks that a user is not registering with an existing email address.
|
boolean |
checkForDuplicateUserNames
Checks that a user is not registering with an existing user name.
|
IDBManager |
customDbManager
(Optional) A custom Database Manager in case you don't want to use the default Zone's DB Manager.
|
java.lang.String |
emailField
The name of the field used to store the user's email.
|
SignUpConfiguration.EmailConfig |
emailResponse
Configure the automated email responses
|
java.util.Map<SignUpErrorCodes,java.lang.String> |
errorMessages
A map of customizable error messages associated with the the SignUpAssistant default error codes.
|
java.util.List<java.lang.String> |
extraFields
(Optional) A list of other field names to be stored in the user account.
|
java.lang.String |
idField
The name of the field used as the main table Id.
|
boolean |
isEmailRequired
Determines whether or not an email address is mandatory for signing up.
|
boolean |
logSQL
(Debug Only) logs every SQL query for testing / debugging purposes.
|
int |
maxEmailLength
Maximum length of the email field.
|
int |
maxPasswordLength
Maximum length of the user password.
|
int |
maxUserNameLength
Maximum length of the user name.
|
int |
minPasswordLength
Minimum length of the user password.
|
int |
minUserNameLength
Minimum length of the user name.
|
java.lang.String |
passwordField
The name of the field used to store the user password.
|
PasswordMode |
passwordMode
Indicates how the password should be stored in the database
|
SignUpConfiguration.PasswordRecovery |
passwordRecovery
Configures the Password Recovery service
|
ISignUpAssistantPlugin |
postProcessPlugin
ADVANCED
Allows developers to add and extra plugin class in the SignUp process to manipulate objects
AFTER the SignUo data has been stored and before the client email is sent.
|
ISignUpAssistantPlugin |
preProcessPlugin
ADVANCED
Allows developers to add and extra plugin class in the SignUp process to manipulate objects
BEFORE the SignUp data is verified and stored in the database.
|
java.lang.String |
signUpTable
The name of the Database table used for storing the user registrations.
|
java.lang.String |
userIsActiveField
(Optional) If the activationCodeField is used this property will indicate which field to use
to keep track of the User's account activation.
|
java.lang.String |
usernameField
The name of the field used to store the user name.
|
Constructor and Description |
---|
SignUpConfiguration() |
public final java.util.Map<SignUpErrorCodes,java.lang.String> errorMessages
NOTE: It is important to maintain the same exact number of place holders ( %s ) in the translated messages so that parameters are correctly inserted at runtime. Failing to do this will cause unexpected runtime exceptions.
The CUSTOM_ERROR code can be used by pre/post process Plugins to throw custom errors.
Error code | Default message |
---|---|
MISSING_USERNAME | User name is required |
USERNAME_TOO_SHORT | User name is too short, min. amount of characters is %s |
USERNAME_TOO_LONG | User name is too long, max. amount of characters is %s |
USERNAME_ALREADY_IN_USE | Username: %s is already in use |
MISSING_PASSWORD | Password is required |
PASSWORD_TOO_SHORT | Password is too short, min. amount of characters is %s |
PASSWORD_TOO_LONG | Password is too long, max. amount of characters is %s |
MISSING_EMAIL | An email is required |
INVALID_EMAIL | Email address: %s is invalid |
EMAIL_ALREADY_IN_USE | Email address: %s is already in use |
RECOVER_NO_USER | Password recovery error, username %s was not found |
ACTIVATION_NO_ID | Invalid Activation. Session doesn't contain a database ID |
ACTIVATION_INVALID_CODE | Invalid Activation Code received |
GENERIC_DB_ERROR | Unexpected Database Error. Please contact our support |
CUSTOM_ERROR | %s |
SignUpErrorCodes
public IDBManager customDbManager
SFSDBManager
public java.lang.String signUpTable
public java.lang.String idField
public java.lang.String usernameField
public java.lang.String passwordField
public java.lang.String emailField
public PasswordMode passwordMode
PasswordMode
public java.lang.String activationCodeField
By setting this field the Activation process will generate a unique activation code that will be sent via email to the User. The client will be able to activate his account by providing the secret code. Without an activation the login will be forbidden.
See also: userIsActiveField
public int activationCodeLength
public java.lang.String userIsActiveField
public java.util.List<java.lang.String> extraFields
Supposing you specify three extra fields called "Country", "Avatar" and "Language" you will need to send those parameters from the client by using the same field names as the keys of the SFSObject sent to the Extension.
public ISignUpAssistantPlugin preProcessPlugin
Allows developers to add and extra plugin class in the SignUp process to manipulate objects BEFORE the SignUp data is verified and stored in the database. This can be useful to add custom validations for extra fields or enforcing other signup rules.
Default is null (no pre-processing is done)
ISignUpAssistantPlugin
public ISignUpAssistantPlugin postProcessPlugin
Allows developers to add and extra plugin class in the SignUp process to manipulate objects AFTER the SignUo data has been stored and before the client email is sent. This can be useful to add customizations to the email text or add extra parameters to the client's response object.
Default is null (no post-processing is done)
ISignUpAssistantPlugin
public boolean checkForDuplicateUserNames
public boolean checkForDuplicateEmails
public boolean isEmailRequired
public SignUpConfiguration.EmailConfig emailResponse
SignUpConfiguration.EmailConfig
public int minUserNameLength
public int maxUserNameLength
public int minPasswordLength
public int maxPasswordLength
public int maxEmailLength
public boolean logSQL
public SignUpConfiguration.PasswordRecovery passwordRecovery
SignUpConfiguration.PasswordRecovery