public class MailListener extends AbstractIssueEventListener implements IssueEventListener, UserEventListener
At the moment when this listener is activated it will email the reporter, assignee and any watchers.
The content of the emails is governed by Velocity templates (in /templates) and the emails are sent out by the MailSender.
Parameters: email.from - who the emails should be sent from email.server - the SMTP server to send email through email.session - the JNDI location of a MailSession to use when sending email subject.prefix - (optional) any prefix for the subject, like "[FooBar]" -> Subject: [FooBar] BazBat
DebugMailListener
Constructor and Description |
---|
MailListener(UserManager userManager,
IssueEventBundleMailHandler issueEventBundleMailHandler,
com.atlassian.mail.queue.MailQueue mailQueue,
IssueEventBundleFactory issueEventBundleFactory) |
Modifier and Type | Method and Description |
---|---|
String[] |
getAcceptedParams()
Returns the parameters used by this listener.
|
String |
getDescription()
Returns a textual description of the listener.
|
protected void |
handleDefaultIssueEvent(IssueEvent event)
If you need to treat all the issue events equally, override this method and add logic to handle events.
|
void |
handleIssueEventBundle(IssueEventBundle bundle) |
void |
init(Map params)
Initialises the listener with the given parameters.
|
boolean |
isInternal()
Indicates whether this listener is internal, meaning it cannot be
removed by an administrator.
|
boolean |
isUnique()
Indicates whether JIRA should only create one instance of this listener.
|
protected void |
sendUserMail(UserEvent event,
String subject,
String subjectKey,
String template) |
void |
userCannotChangePassword(UserEvent event)
Fired when a user tries to change their password, and the password cannot be updated
|
void |
userCreated(UserEvent event)
Fired when a user is created automatically
|
void |
userForgotPassword(UserEvent event)
Fired when a user indicates they have forgotten their password
|
void |
userForgotUsername(UserEvent event)
Fired when a user indicates they have forgotten their username
|
void |
userSignup(UserEvent event)
Fired when a user signs up manually
|
customEvent, getI18NBean, issueAssigned, issueClosed, issueCommentDeleted, issueCommented, issueCommentEdited, issueCreated, issueDeleted, issueGenericEvent, issueMoved, issueReopened, issueResolved, issueStarted, issueStopped, issueUpdated, issueWorklogDeleted, issueWorkLogged, issueWorklogUpdated, workflowEvent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
customEvent, issueAssigned, issueClosed, issueCommented, issueCreated, issueDeleted, issueGenericEvent, issueMoved, issueReopened, issueResolved, issueStarted, issueStopped, issueUpdated, issueWorkLogged, workflowEvent
public MailListener(UserManager userManager, IssueEventBundleMailHandler issueEventBundleMailHandler, com.atlassian.mail.queue.MailQueue mailQueue, IssueEventBundleFactory issueEventBundleFactory)
public void init(Map params)
JiraListener
init
in interface JiraListener
init
in class AbstractIssueEventListener
params
- the initialisation parameters given in the Listener Propertiespublic String[] getAcceptedParams()
JiraListener
getAcceptedParams
in interface JiraListener
getAcceptedParams
in class AbstractIssueEventListener
public boolean isInternal()
JiraListener
isInternal
in interface JiraListener
isInternal
in class AbstractIssueEventListener
true
if this is an Atlassian listener, otherwise public boolean isUnique()
JiraListener
isUnique
in interface JiraListener
isUnique
in class AbstractIssueEventListener
public String getDescription()
JiraListener
A good description will describe what this listener does and explain the parameters required for configuring it.
getDescription
in interface JiraListener
getDescription
in class AbstractIssueEventListener
public void userSignup(UserEvent event)
UserEventListener
userSignup
in interface UserEventListener
event
- the event in playpublic void userCreated(UserEvent event)
UserEventListener
userCreated
in interface UserEventListener
event
- the event in playpublic void userForgotPassword(UserEvent event)
UserEventListener
userForgotPassword
in interface UserEventListener
event
- the event in playpublic void userForgotUsername(UserEvent event)
UserEventListener
userForgotUsername
in interface UserEventListener
event
- the event in playpublic void userCannotChangePassword(UserEvent event)
UserEventListener
userCannotChangePassword
in interface UserEventListener
event
- the event in playprotected void sendUserMail(UserEvent event, String subject, String subjectKey, String template)
@EventListener public void handleIssueEventBundle(IssueEventBundle bundle)
protected void handleDefaultIssueEvent(IssueEvent event)
AbstractIssueEventListener
handleDefaultIssueEvent
in class AbstractIssueEventListener
event
- The received eventCopyright © 2002-2019 Atlassian. All Rights Reserved.