|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.user.DefaultSignupManager
public class DefaultSignupManager
Handles easy-user creation in its myriad forms.
Field Summary | |
---|---|
static java.lang.String |
NOTIFY_ON_SIGNUP_TOKEN
|
static java.lang.String |
PREVIOUS_SIGNUP_TOKEN
|
static java.lang.String |
SIGNUP_TOKEN
|
Constructor Summary | |
---|---|
DefaultSignupManager(com.atlassian.bandana.BandanaManager bandanaManager,
com.atlassian.security.random.SecureTokenGenerator secureTokenGenerator,
UserAccessor userAccessor,
UserVerificationTokenManager userVerificationTokenManager,
com.atlassian.crowd.embedded.api.CrowdService crowdService,
SettingsManager settingsManager,
com.atlassian.renderer.WikiStyleRenderer wikiStyleRenderer,
EmailService notificationsService,
NotificationsSender notificationsSender,
com.atlassian.event.api.EventPublisher eventPublisher,
UserChecker userChecker,
PersonalInformationManager personalInformationManager,
com.atlassian.core.task.MultiQueueTaskManager taskManager,
I18NBeanFactory i18NBeanFactory,
DataSourceFactory dataSourceFactory)
|
Method Summary | |
---|---|
boolean |
canSignUpWith(java.lang.String token)
Return true if the given token is valid for a user to self-sign-up. |
java.lang.String |
createUserPendingConfirmation(com.atlassian.user.User user,
java.lang.String password)
Creates a new user and marks her disabled pending her email confirmation? |
boolean |
doesUserHaveOutdatedSignupToken(com.atlassian.user.User user)
|
void |
enableConfirmedUser(com.atlassian.user.User user)
Enable previously disabled user who signed up and confirmed her email. |
java.lang.String |
getRelativeSignupURL()
|
java.lang.String |
getRestrictedDomains()
Returns comma separated list of domains. |
java.lang.String |
getSignUpToken()
Gets the current sign-up token, or creates a new one and returns it. |
java.lang.String |
getSignupURL()
|
boolean |
isDomainRestrictedSignupEnabled()
|
boolean |
isEmailOnRestrictedDomain(java.lang.String email)
Checks if the given email address is on one of the configured restricted domains. |
boolean |
isEmailSentOnInviteSignUp()
|
boolean |
isPendingConfirmation(com.atlassian.user.User user)
Is given user tried to sign up but hasn't confirmed her email yet? |
boolean |
isPublicSignupPermitted()
Returns true if users can sign themselves for this instance. |
boolean |
isTokenForUserValid(com.atlassian.user.User user,
java.lang.String token)
|
java.lang.String |
refreshAndGetToken()
Creates a new sign-up token and returns it. |
java.lang.String |
restorePreviousToken()
Restore the previous private-signup token and returns it. |
void |
sendConfirmationEmail(java.lang.String token,
com.atlassian.user.User user)
Sends a confirmation email to the given new user. |
NotificationSendResult |
sendInvites(SendUserInviteEvent event)
Send invitation emails with a message to a list of email addresses. |
void |
sendWelcomeEmail(ConfluenceUser user)
Sends a welcome email to the given new user. |
void |
setDomainRestrictedSignupMode(java.lang.String allowedDomains)
Set the domains that user's email address should belong to to be able to sign up. |
void |
setEmailSentOnInviteSignUp(boolean notify)
|
void |
setPrivateSignupMode()
|
void |
setPublicSignupMode()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SIGNUP_TOKEN
public static final java.lang.String PREVIOUS_SIGNUP_TOKEN
public static final java.lang.String NOTIFY_ON_SIGNUP_TOKEN
Constructor Detail |
---|
public DefaultSignupManager(com.atlassian.bandana.BandanaManager bandanaManager, com.atlassian.security.random.SecureTokenGenerator secureTokenGenerator, UserAccessor userAccessor, UserVerificationTokenManager userVerificationTokenManager, com.atlassian.crowd.embedded.api.CrowdService crowdService, SettingsManager settingsManager, com.atlassian.renderer.WikiStyleRenderer wikiStyleRenderer, EmailService notificationsService, NotificationsSender notificationsSender, com.atlassian.event.api.EventPublisher eventPublisher, UserChecker userChecker, PersonalInformationManager personalInformationManager, com.atlassian.core.task.MultiQueueTaskManager taskManager, I18NBeanFactory i18NBeanFactory, DataSourceFactory dataSourceFactory)
Method Detail |
---|
public java.lang.String refreshAndGetToken()
SignupManager
refreshAndGetToken
in interface SignupManager
public boolean canSignUpWith(java.lang.String token)
SignupManager
canSignUpWith
in interface SignupManager
token
- a sign-up token from a URL given to an invited userpublic boolean isEmailSentOnInviteSignUp()
isEmailSentOnInviteSignUp
in interface SignupManager
public boolean isPublicSignupPermitted()
SignupManager
isPublicSignupPermitted
in interface SignupManager
public java.lang.String getRelativeSignupURL()
getRelativeSignupURL
in interface SignupManager
public java.lang.String getSignupURL()
getSignupURL
in interface SignupManager
public void setEmailSentOnInviteSignUp(boolean notify)
setEmailSentOnInviteSignUp
in interface SignupManager
notify
- true if notification emails should be sent to admins when a user signs themselves up, false if notpublic java.lang.String restorePreviousToken()
SignupManager
restorePreviousToken
in interface SignupManager
public java.lang.String getSignUpToken()
SignupManager
getSignUpToken
in interface SignupManager
public NotificationSendResult sendInvites(SendUserInviteEvent event)
SignupManager
sendInvites
in interface SignupManager
public void sendConfirmationEmail(java.lang.String token, com.atlassian.user.User user)
SignupManager
sendConfirmationEmail
in interface SignupManager
token
- the token that the user must validate againstuser
- the new userpublic void sendWelcomeEmail(ConfluenceUser user)
SignupManager
sendWelcomeEmail
in interface SignupManager
user
- the new userpublic void setPublicSignupMode()
setPublicSignupMode
in interface SignupManager
public void setPrivateSignupMode()
setPrivateSignupMode
in interface SignupManager
public void setDomainRestrictedSignupMode(java.lang.String allowedDomains)
SignupManager
setDomainRestrictedSignupMode
in interface SignupManager
allowedDomains
- comma separated list of domainspublic java.lang.String getRestrictedDomains()
SignupManager
getRestrictedDomains
in interface SignupManager
public boolean isEmailOnRestrictedDomain(java.lang.String email)
SignupManager
isEmailOnRestrictedDomain
in interface SignupManager
email
- the email address. Can be null.
public boolean isPendingConfirmation(com.atlassian.user.User user)
SignupManager
isPendingConfirmation
in interface SignupManager
public boolean isTokenForUserValid(com.atlassian.user.User user, java.lang.String token)
isTokenForUserValid
in interface SignupManager
public boolean doesUserHaveOutdatedSignupToken(com.atlassian.user.User user)
doesUserHaveOutdatedSignupToken
in interface SignupManager
public void enableConfirmedUser(com.atlassian.user.User user) throws com.atlassian.crowd.exception.runtime.UserNotFoundException, com.atlassian.crowd.exception.runtime.OperationFailedException, com.atlassian.crowd.exception.InvalidUserException, com.atlassian.crowd.exception.OperationNotPermittedException
SignupManager
enableConfirmedUser
in interface SignupManager
com.atlassian.crowd.exception.runtime.UserNotFoundException
com.atlassian.crowd.exception.runtime.OperationFailedException
com.atlassian.crowd.exception.InvalidUserException
com.atlassian.crowd.exception.OperationNotPermittedException
public java.lang.String createUserPendingConfirmation(com.atlassian.user.User user, java.lang.String password) throws com.atlassian.crowd.exception.runtime.OperationFailedException, com.atlassian.crowd.exception.InvalidUserException, com.atlassian.crowd.exception.InvalidCredentialException, com.atlassian.crowd.exception.OperationNotPermittedException
SignupManager
createUserPendingConfirmation
in interface SignupManager
user
- the new userpassword
- the password for the new user
com.atlassian.crowd.exception.runtime.OperationFailedException
com.atlassian.crowd.exception.InvalidUserException
com.atlassian.crowd.exception.InvalidCredentialException
com.atlassian.crowd.exception.OperationNotPermittedException
public boolean isDomainRestrictedSignupEnabled()
isDomainRestrictedSignupEnabled
in interface SignupManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |