com.atlassian.crowd.manager.login.util
Class ForgottenLoginMailer

java.lang.Object
  extended by com.atlassian.crowd.manager.login.util.ForgottenLoginMailer

public class ForgottenLoginMailer
extends Object

Helper class to perform mailing tasks for forgotten login.


Field Summary
static String ACTIVE_MACRO
          Forgotten login active status
static String ADMIN_CONTACT_MACRO
          Forgotten login administrator contact macro key.
static String DATE_MACRO
          Forgotten login date macro key.
static String DEPLOYMENTTITLE_MACRO
          Forgotten login deployment title macro key.
static String EMAIL_MACRO
          Forgotten login email macro key.
static String FIRSTNAME_MACRO
          Forgotten login firstname macro key.
static String LASTNAME_MACRO
          Forgotten login lastname macro key.
static String PASSWORD_MACRO
          Deprecated.  
static String RESET_LINK_MACRO
          Forgotten login link macro key.
static String USERNAME_MACRO
          Forgotten login username macro key.
 
Constructor Summary
ForgottenLoginMailer(PropertyManager propertyManager, MailManager mailManager, I18nHelper i18nHelper)
          Constructs a new instance of ForgottenLoginMailer.
 
Method Summary
 String checkActiveUser(User user)
           
 void mailResetPasswordLink(User user, String resetLink)
          Mails the reset password link to the user.
 void mailUsernames(User user, List<String> usernames)
          Mails the list of usernames to the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USERNAME_MACRO

public static final String USERNAME_MACRO
Forgotten login username macro key.

See Also:
Constant Field Values

FIRSTNAME_MACRO

public static final String FIRSTNAME_MACRO
Forgotten login firstname macro key.

See Also:
Constant Field Values

LASTNAME_MACRO

public static final String LASTNAME_MACRO
Forgotten login lastname macro key.

See Also:
Constant Field Values

DEPLOYMENTTITLE_MACRO

public static final String DEPLOYMENTTITLE_MACRO
Forgotten login deployment title macro key.

See Also:
Constant Field Values

DATE_MACRO

public static final String DATE_MACRO
Forgotten login date macro key.

See Also:
Constant Field Values

PASSWORD_MACRO

public static final String PASSWORD_MACRO
Deprecated. 
Forgotten login key. For backwards compatibility only.

See Also:
Constant Field Values

RESET_LINK_MACRO

public static final String RESET_LINK_MACRO
Forgotten login link macro key.

See Also:
Constant Field Values

EMAIL_MACRO

public static final String EMAIL_MACRO
Forgotten login email macro key.

See Also:
Constant Field Values

ADMIN_CONTACT_MACRO

public static final String ADMIN_CONTACT_MACRO
Forgotten login administrator contact macro key.

See Also:
Constant Field Values

ACTIVE_MACRO

public static final String ACTIVE_MACRO
Forgotten login active status

See Also:
Constant Field Values
Constructor Detail

ForgottenLoginMailer

public ForgottenLoginMailer(PropertyManager propertyManager,
                            MailManager mailManager,
                            I18nHelper i18nHelper)
Constructs a new instance of ForgottenLoginMailer.

Parameters:
propertyManager - manager used to retrieve SMTP and site configurations
mailManager - manager used to send emails
i18nHelper - internationalisation helper
Method Detail

mailResetPasswordLink

public void mailResetPasswordLink(User user,
                                  String resetLink)
                           throws InvalidEmailAddressException,
                                  MailSendException
Mails the reset password link to the user.

Parameters:
user - user to email
resetLink - link to set a new password
Throws:
IllegalArgumentException - if user or resetLink is null
InvalidEmailAddressException - if the email address returned by user.getEmailAddress() is not a valid email address
MailSendException - if the email cannot be sent

mailUsernames

public void mailUsernames(User user,
                          List<String> usernames)
                   throws InvalidEmailAddressException,
                          MailSendException
Mails the list of usernames to the user. The list of usernames must not be empty.

Parameters:
user - user to email
usernames - list of usernames associated with the email
Throws:
IllegalArgumentException - if user or usernames is null or empty.
InvalidEmailAddressException - if the email address returned by user.getEmailAddress() is not a valid email address
MailSendException - if the email cannot be sent

checkActiveUser

public String checkActiveUser(User user)


Copyright © 2013 Atlassian. All Rights Reserved.