Package com.atlassian.jira.mail
Class MailingListCompiler
java.lang.Object
com.atlassian.jira.mail.MailingListCompiler
- Direct Known Subclasses:
DefaultSubscriptionManager
Methods responsible for sending a notification email to a list of
NotificationRecipient
s.
Notification format (eg. text/html) is taken into account as well as comment security levels.
-
Constructor Summary
ConstructorsConstructorDescriptionMailingListCompiler
(TemplateManager templateManager, ProjectRoleManager projectRoleManager, DateTimeFormatterFactory dateTimeFormatterFactory, FeatureManager featureManager) -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getEmailAddresses
(Set<String> addresses) Deprecated.just use Joiner.on(",").join(addresses)Collection<com.atlassian.mail.queue.SingleMailQueueItem>
prepareEmail
(Set<NotificationRecipient> recipients, String sender, String senderFrom, String replyTo, Long templateId, Map<String, Object> contextParams, com.atlassian.mail.MailThreader threader) This function works out where the mail message has originated and then sets up the correct parameters.void
sendLists
(Set<NotificationRecipient> recipients, String sender, String senderFrom, String replyTo, Long templateId, Map<String, Object> contextParams, com.atlassian.mail.MailThreader threader) Deprecated.useprepareEmail(Set, String, String, String, Long, Map, MailThreader)
and add emails to desired queue by yourself
-
Constructor Details
-
MailingListCompiler
public MailingListCompiler(TemplateManager templateManager, ProjectRoleManager projectRoleManager, DateTimeFormatterFactory dateTimeFormatterFactory, FeatureManager featureManager)
-
-
Method Details
-
getEmailAddresses
Deprecated.just use Joiner.on(",").join(addresses)Returns a comma-separated list of the given email addresses.- Parameters:
addresses
- email addresses- Returns:
- the list of addresses.
-
sendLists
@Deprecated public void sendLists(Set<NotificationRecipient> recipients, String sender, String senderFrom, String replyTo, Long templateId, Map<String, Object> contextParams, com.atlassian.mail.MailThreader threader) throws org.apache.velocity.exception.VelocityExceptionDeprecated.useprepareEmail(Set, String, String, String, Long, Map, MailThreader)
and add emails to desired queue by yourselfThis function works out where the mail message has originated and then sets up the correct parameters. It allows comments to be hidden in the email from users that do not have permissions to see them. After all messages are added to the queue- Parameters:
recipients
- Set ofNotificationRecipient
ssender
- sendersenderFrom
- sender fromreplyTo
- reply totemplateId
- the velocity template IDthreader
- mail threader- Throws:
org.apache.velocity.exception.VelocityException
- if notification compiler fails
-
prepareEmail
public Collection<com.atlassian.mail.queue.SingleMailQueueItem> prepareEmail(Set<NotificationRecipient> recipients, String sender, String senderFrom, String replyTo, Long templateId, Map<String, Object> contextParams, com.atlassian.mail.MailThreader threader) throws org.apache.velocity.exception.VelocityExceptionThis function works out where the mail message has originated and then sets up the correct parameters. It allows comments to be hidden in the email from users that do not have permissions to see them.- Parameters:
recipients
- Set ofNotificationRecipient
ssender
- sendersenderFrom
- sender fromreplyTo
- reply totemplateId
- the velocity template IDcontextParams
- map of context parametersthreader
- mail threader- Returns:
- Collection of prepared
SingleMailQueueItem
s ready to be sent or added to a queue - Throws:
org.apache.velocity.exception.VelocityException
- if notification compiler fails- Since:
- v7.1.5
-