Class ForgottenLoginMailer
java.lang.Object
com.atlassian.crowd.manager.mailer.reminder.ForgottenLoginMailer
Helper class to perform mailing tasks for forgotten login.
-
Constructor Summary
ConstructorDescriptionForgottenLoginMailer
(MailManager mailManager, I18nHelper i18nHelper, MailTemplateRenderer mailTemplateRenderer, EmailMessageFactory emailMessageFactory) Constructs a new instance of ForgottenLoginMailer. -
Method Summary
Modifier and TypeMethodDescriptioncheckActiveUser
(User user) void
mailResetPasswordLink
(User user, String resetLink) Mails the reset password link to theuser
.void
mailUsernames
(User user, List<String> usernames) Mails the list of usernames to theuser
.
-
Constructor Details
-
ForgottenLoginMailer
public ForgottenLoginMailer(MailManager mailManager, I18nHelper i18nHelper, MailTemplateRenderer mailTemplateRenderer, EmailMessageFactory emailMessageFactory) Constructs a new instance of ForgottenLoginMailer.- Parameters:
mailManager
- manager used to send emailsi18nHelper
- internationalisation helpermailTemplateRenderer
- resolver used to replace macros with values
-
-
Method Details
-
mailResetPasswordLink
public void mailResetPasswordLink(User user, String resetLink) throws InvalidEmailAddressException, MailSendException Mails the reset password link to theuser
.- Parameters:
user
- user to emailresetLink
- link to set a new password- Throws:
IllegalArgumentException
- ifuser
orresetLink
is nullInvalidEmailAddressException
- if the email address returned byuser.getEmailAddress()
is not a valid email addressMailSendException
- if the email cannot be sent
-
mailUsernames
public void mailUsernames(User user, List<String> usernames) throws InvalidEmailAddressException, MailSendException Mails the list of usernames to theuser
. The list ofusernames
must not be empty.- Parameters:
user
- user to emailusernames
- list of usernames associated with the email- Throws:
IllegalArgumentException
- ifuser
orusernames
is null or empty.InvalidEmailAddressException
- if the email address returned byuser.getEmailAddress()
is not a valid email addressMailSendException
- if the email cannot be sent
-
checkActiveUser
-