com.atlassian.confluence.plugins.easyuser
Class DefaultEasyUserManager

java.lang.Object
  extended by com.atlassian.confluence.plugins.easyuser.DefaultEasyUserManager
All Implemented Interfaces:
EasyUserManager

public class DefaultEasyUserManager
extends Object
implements EasyUserManager

Handles easy-user creation in its myriad forms.

Since:
v4.2

Constructor Summary
DefaultEasyUserManager(com.atlassian.bandana.BandanaManager bandanaManager, com.atlassian.security.random.SecureTokenGenerator secureTokenGenerator, SettingsManager settingsManager, EasyUserNotificationBuilder easyUserNotificationBuilder, NotificationsService notificationsService, com.atlassian.event.api.EventPublisher eventPublisher)
           
 
Method Summary
 boolean canSignUpWith(String token)
          Return true if the given token is valid for a user to self-sign-up.
 String getRelativeSignupURL()
           
 SignupMode getSignupMode()
          Returns the sign-up mode for this instance.
 String getSignUpToken()
          Gets the current sign-up token, or creates a new one and returns it.
 String getSignupURL()
           
 boolean isEmailSentOnInviteSignUp()
           
 boolean isPublicSignupPermitted()
          Returns true if users can sign themselves for this instance.
 String refreshAndGetToken()
          Creates a new sign-up token and returns it.
 String restorePreviousToken()
          Restore the previous private-signup token and returns it.
 NotificationSendResult sendInvites(SendUserInviteEvent event)
          Send invitation emails with a message to a list of email addresses.
 void setEmailSentOnInviteSignUp(boolean notify)
           
 void setSignupMode(SignupMode signupMode)
          Sets the sign-up mode for this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultEasyUserManager

public DefaultEasyUserManager(com.atlassian.bandana.BandanaManager bandanaManager,
                              com.atlassian.security.random.SecureTokenGenerator secureTokenGenerator,
                              SettingsManager settingsManager,
                              EasyUserNotificationBuilder easyUserNotificationBuilder,
                              NotificationsService notificationsService,
                              com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail

refreshAndGetToken

public String refreshAndGetToken()
Description copied from interface: EasyUserManager
Creates a new sign-up token and returns it. This invalidates the previous token.

Specified by:
refreshAndGetToken in interface EasyUserManager
Returns:
a random sign-up token

setSignupMode

public void setSignupMode(SignupMode signupMode)
Description copied from interface: EasyUserManager
Sets the sign-up mode for this instance.

Specified by:
setSignupMode in interface EasyUserManager

getSignupMode

public SignupMode getSignupMode()
Description copied from interface: EasyUserManager
Returns the sign-up mode for this instance.

Specified by:
getSignupMode in interface EasyUserManager

canSignUpWith

public boolean canSignUpWith(String token)
Description copied from interface: EasyUserManager
Return true if the given token is valid for a user to self-sign-up.

Specified by:
canSignUpWith in interface EasyUserManager
Parameters:
token - a sign-up token from a URL given to an invited user

isEmailSentOnInviteSignUp

public boolean isEmailSentOnInviteSignUp()
Specified by:
isEmailSentOnInviteSignUp in interface EasyUserManager
Returns:
true if notification emails should be sent to admins when a user signs themselves up.

isPublicSignupPermitted

public boolean isPublicSignupPermitted()
Description copied from interface: EasyUserManager
Returns true if users can sign themselves for this instance.

Specified by:
isPublicSignupPermitted in interface EasyUserManager

getRelativeSignupURL

public String getRelativeSignupURL()
Specified by:
getRelativeSignupURL in interface EasyUserManager

getSignupURL

public String getSignupURL()
Specified by:
getSignupURL in interface EasyUserManager

setEmailSentOnInviteSignUp

public void setEmailSentOnInviteSignUp(boolean notify)
Specified by:
setEmailSentOnInviteSignUp in interface EasyUserManager
Parameters:
notify - true if notification emails should be sent to admins when a user signs themselves up, false if not

restorePreviousToken

public String restorePreviousToken()
Description copied from interface: EasyUserManager
Restore the previous private-signup token and returns it.

Specified by:
restorePreviousToken in interface EasyUserManager

getSignUpToken

public String getSignUpToken()
Description copied from interface: EasyUserManager
Gets the current sign-up token, or creates a new one and returns it.

Specified by:
getSignUpToken in interface EasyUserManager
Returns:
a random sign-up token

sendInvites

public NotificationSendResult sendInvites(SendUserInviteEvent event)
Description copied from interface: EasyUserManager
Send invitation emails with a message to a list of email addresses.

Specified by:
sendInvites in interface EasyUserManager
Returns:
the number of emails sent


Copyright © 2003-2012 Atlassian. All Rights Reserved.