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

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

public class ForgottenLoginMailer
extends java.lang.Object

Helper class to perform mailing tasks for forgotten login.


Field Summary
static java.lang.String ADMIN_CONTACT_MACRO
          Forgotten login administrator contact macro key.
static java.lang.String DATE_MACRO
          Forgotten login date macro key.
static java.lang.String DEPLOYMENTTITLE_MACRO
          Forgotten login deployment title macro key.
static java.lang.String EMAIL_MACRO
          Forgotten login email macro key.
static java.lang.String FIRSTNAME_MACRO
          Forgotten login firstname macro key.
static java.lang.String LASTNAME_MACRO
          Forgotten login lastname macro key.
static java.lang.String PASSWORD_MACRO
          Deprecated.  
static java.lang.String RESET_LINK_MACRO
          Forgotten login link macro key.
static java.lang.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
 void mailResetPasswordLink(User user, java.lang.String resetLink)
          Mails the reset password link to the user.
 void mailUsernames(User user, java.util.List<java.lang.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 java.lang.String USERNAME_MACRO
Forgotten login username macro key.

See Also:
Constant Field Values

FIRSTNAME_MACRO

public static final java.lang.String FIRSTNAME_MACRO
Forgotten login firstname macro key.

See Also:
Constant Field Values

LASTNAME_MACRO

public static final java.lang.String LASTNAME_MACRO
Forgotten login lastname macro key.

See Also:
Constant Field Values

DEPLOYMENTTITLE_MACRO

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

See Also:
Constant Field Values

DATE_MACRO

public static final java.lang.String DATE_MACRO
Forgotten login date macro key.

See Also:
Constant Field Values

PASSWORD_MACRO

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

See Also:
Constant Field Values

RESET_LINK_MACRO

public static final java.lang.String RESET_LINK_MACRO
Forgotten login link macro key.

See Also:
Constant Field Values

EMAIL_MACRO

public static final java.lang.String EMAIL_MACRO
Forgotten login email macro key.

See Also:
Constant Field Values

ADMIN_CONTACT_MACRO

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

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,
                                  java.lang.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:
java.lang.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,
                          java.util.List<java.lang.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:
java.lang.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


Copyright © 2010 Atlassian. All Rights Reserved.