Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.registration
Class RegistrationManagerImpl

java.lang.Object
  extended by com.jivesoftware.base.registration.RegistrationManagerImpl
All Implemented Interfaces:
RegistrationManager

public class RegistrationManagerImpl
extends java.lang.Object
implements RegistrationManager

Database implementation of the RegistrationManager interface. Support for validating user accounts can be enabled by setting the validation.enabled property to true. When validation is enabled, new user will have to verify their account before being allowed to access the system. An email will be sent to the account's email address containing a link that will validate their account.


Field Summary
 
Fields inherited from interface com.jivesoftware.base.registration.RegistrationManager
PROPERTY_EMAIL_ADDRESS, PROPERTY_EMAIL_BODY, PROPERTY_EMAIL_NAME, PROPERTY_EMAIL_SUBJECT, PROPERTY_HUMAN_VALIDATION_ENABLED, PROPERTY_TERMS_ENABLED, PROPERTY_TERMS_URL, PROPERTY_USER_VALIDATION_KEY, PROPERTY_VALIDATION_ENABLED
 
Method Summary
 java.lang.String getEmailAddress()
          Gets the email address that validation emails will appear to be from
 java.lang.String getEmailBody(java.util.Locale locale)
          Gets the text for the body of the validation emails.
 java.lang.String getEmailName()
          Gets the name that validation emails will appear to be from
 java.lang.String getEmailSubject(java.util.Locale locale)
          Gets the text for the subject of validation emails
static RegistrationManager getInstance()
          Provides access to the single RegistrationManager instance
 java.lang.String getTermsURL()
          Gets the string url representing the terms and conditions page
 boolean isAccountValidated(long userID)
          Checks if a user account has been validated
 boolean isHumanValidationEnabled()
          Returns true if the human input validation feature is turned on.
 boolean isTermsEnabled()
          Returns true if terms and conditions is enabled
 boolean isValidationEnabled()
          Returns true if the validation feature is turned on.
 void markAccountForValidation(User user)
          Marks the user account for validation and sends a validation request to the user.
 void setEmailAddress(java.lang.String emailAddress)
          Sets the email address that validation emails will appear to be from
 void setEmailBody(java.lang.String emailBody, java.util.Locale locale)
          Sets the text for the body of of validation emails.
 void setEmailName(java.lang.String emailName)
          Sets The name that validation emails will appear to be from
 void setEmailSubject(java.lang.String emailSubject, java.util.Locale locale)
          Sets the text for the subject of validation emails
 void setHumanValidationEnabled(boolean humanValidationEnabled)
          Enables or disables the human input validation feature.
 void setTermsEnabled(boolean termsEnabled)
          Sets terms and conditions to be enabled / disabled
 void setTermsURL(java.lang.String termsURL)
          Sets the string url representing the terms and conditions page
 void setValidationEnabled(boolean enabled)
          Enables or disables the validation feature.
 boolean validateAccount(long userID, java.lang.String validationKey)
          Validates a user account using a unique validation key
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static RegistrationManager getInstance()
Provides access to the single RegistrationManager instance

Returns:
the RegistrationManager instance

isValidationEnabled

public boolean isValidationEnabled()
Description copied from interface: RegistrationManager
Returns true if the validation feature is turned on. When validation is disabled, all accounts will be created without any validation.

Specified by:
isValidationEnabled in interface RegistrationManager
Returns:
true if the validation is enabled.

setValidationEnabled

public void setValidationEnabled(boolean enabled)
Description copied from interface: RegistrationManager
Enables or disables the validation feature. When validation is disabled, all accounts will be created without any validation.

Specified by:
setValidationEnabled in interface RegistrationManager
Parameters:
enabled - true to enable the validation feature, false to disable.

isHumanValidationEnabled

public boolean isHumanValidationEnabled()
Description copied from interface: RegistrationManager
Returns true if the human input validation feature is turned on. When human input validation is disabled, all accounts will be created without any human input validation.

Specified by:
isHumanValidationEnabled in interface RegistrationManager
Returns:
true if the human input validation is enabled.

setHumanValidationEnabled

public void setHumanValidationEnabled(boolean humanValidationEnabled)
Description copied from interface: RegistrationManager
Enables or disables the human input validation feature. When human input validation is disabled, all accounts will be created without any human input validation.

Specified by:
setHumanValidationEnabled in interface RegistrationManager
Parameters:
humanValidationEnabled - true to enable the human input validation feature, false to disable.

getEmailName

public java.lang.String getEmailName()
Description copied from interface: RegistrationManager
Gets the name that validation emails will appear to be from

Specified by:
getEmailName in interface RegistrationManager
Returns:
The name that validation emails will appear to be from

setEmailName

public void setEmailName(java.lang.String emailName)
Description copied from interface: RegistrationManager
Sets The name that validation emails will appear to be from

Specified by:
setEmailName in interface RegistrationManager
Parameters:
emailName - the name that validation emails will appear to be from

getEmailAddress

public java.lang.String getEmailAddress()
Description copied from interface: RegistrationManager
Gets the email address that validation emails will appear to be from

Specified by:
getEmailAddress in interface RegistrationManager
Returns:
the email address that validation emails will appear to be from

setEmailAddress

public void setEmailAddress(java.lang.String emailAddress)
Description copied from interface: RegistrationManager
Sets the email address that validation emails will appear to be from

Specified by:
setEmailAddress in interface RegistrationManager
Parameters:
emailAddress - the email address that validation emails will appear to be from

getEmailSubject

public java.lang.String getEmailSubject(java.util.Locale locale)
Description copied from interface: RegistrationManager
Gets the text for the subject of validation emails

Specified by:
getEmailSubject in interface RegistrationManager
Returns:
the text for the subject of validation emails

setEmailSubject

public void setEmailSubject(java.lang.String emailSubject,
                            java.util.Locale locale)
Description copied from interface: RegistrationManager
Sets the text for the subject of validation emails

Specified by:
setEmailSubject in interface RegistrationManager
Parameters:
emailSubject - the text for the subject of validation emails

getEmailBody

public java.lang.String getEmailBody(java.util.Locale locale)
Description copied from interface: RegistrationManager
Gets the text for the body of the validation emails. The body text should have a special token ${link} indicating where the validation link should be included in the body. The token will be dynamically replaced with a real value when emails are sent. If there is no ${link} token specified, the link will be included at the end of the email.

Specified by:
getEmailBody in interface RegistrationManager
Returns:
the text for the body of the validation emails

setEmailBody

public void setEmailBody(java.lang.String emailBody,
                         java.util.Locale locale)
Description copied from interface: RegistrationManager
Sets the text for the body of of validation emails. The body text should have a special token ${link} indicating where the validation link should be included in the body. The token will be dynamically replaced with a real value when emails are sent. If there is no ${link} token specified, the link will be included at the end of the email.

Specified by:
setEmailBody in interface RegistrationManager
Parameters:
emailBody - the text for the body of the validation emails

isTermsEnabled

public boolean isTermsEnabled()
Description copied from interface: RegistrationManager
Returns true if terms and conditions is enabled

Specified by:
isTermsEnabled in interface RegistrationManager
Returns:
true if terms and condiations is enabled; false otherwise

setTermsEnabled

public void setTermsEnabled(boolean termsEnabled)
Description copied from interface: RegistrationManager
Sets terms and conditions to be enabled / disabled

Specified by:
setTermsEnabled in interface RegistrationManager
Parameters:
termsEnabled - true to enavled terms and conditions; false to disabled

getTermsURL

public java.lang.String getTermsURL()
Description copied from interface: RegistrationManager
Gets the string url representing the terms and conditions page

Specified by:
getTermsURL in interface RegistrationManager
Returns:
the string url of the terms and conditions page

setTermsURL

public void setTermsURL(java.lang.String termsURL)
Description copied from interface: RegistrationManager
Sets the string url representing the terms and conditions page

Specified by:
setTermsURL in interface RegistrationManager
Parameters:
termsURL - the string url of the terms and conditions page

markAccountForValidation

public void markAccountForValidation(User user)
Description copied from interface: RegistrationManager
Marks the user account for validation and sends a validation request to the user. The user account will not be activated until a response validating the account is received.

Specified by:
markAccountForValidation in interface RegistrationManager

validateAccount

public boolean validateAccount(long userID,
                               java.lang.String validationKey)
                        throws UserNotFoundException
Description copied from interface: RegistrationManager
Validates a user account using a unique validation key

Specified by:
validateAccount in interface RegistrationManager
Parameters:
userID - the userID representing the user account to validate
validationKey - the unique validation key
Returns:
true if the user account was validated; false otherwise
Throws:
UserNotFoundException - if the user object can not be found

isAccountValidated

public boolean isAccountValidated(long userID)
                           throws UserNotFoundException
Description copied from interface: RegistrationManager
Checks if a user account has been validated

Specified by:
isAccountValidated in interface RegistrationManager
Parameters:
userID - the userID to check
Returns:
true if the user account has been validated; false otherwise
Throws:
UserNotFoundException - if the user object can not be found

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.