public class MailingListCompiler extends Object
NotificationRecipient
s.
Notification format (eg. text/html) is taken into account as well as comment security levels.
Constructor and Description |
---|
MailingListCompiler(TemplateManager templateManager,
ProjectRoleManager projectRoleManager,
DateTimeFormatterFactory dateTimeFormatterFactory) |
Modifier and Type | Method and Description |
---|---|
static 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,
Long templateId,
String baseUrl,
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,
Long templateId,
String baseUrl,
Map<String,Object> contextParams,
com.atlassian.mail.MailThreader threader)
Deprecated.
use
prepareEmail(Set, String, String, Long, String, Map, MailThreader)
and add emails to desired queue by yourself |
public MailingListCompiler(TemplateManager templateManager, ProjectRoleManager projectRoleManager, DateTimeFormatterFactory dateTimeFormatterFactory)
@Deprecated public static String getEmailAddresses(Set<String> addresses)
addresses
- email addresses@Deprecated public void sendLists(Set<NotificationRecipient> recipients, String sender, String senderFrom, Long templateId, String baseUrl, Map<String,Object> contextParams, com.atlassian.mail.MailThreader threader) throws org.apache.velocity.exception.VelocityException
prepareEmail(Set, String, String, Long, String, Map, MailThreader)
and add emails to desired queue by yourselfrecipients
- Set of NotificationRecipient
ssender
- sendersenderFrom
- sender fromtemplateId
- the velocity template IDbaseUrl
- base urlcontextParams
- map of context parametersthreader
- mail threaderorg.apache.velocity.exception.VelocityException
- if notification compiler failspublic Collection<com.atlassian.mail.queue.SingleMailQueueItem> prepareEmail(Set<NotificationRecipient> recipients, String sender, String senderFrom, Long templateId, String baseUrl, Map<String,Object> contextParams, com.atlassian.mail.MailThreader threader) throws org.apache.velocity.exception.VelocityException
recipients
- Set of NotificationRecipient
ssender
- sendersenderFrom
- sender fromtemplateId
- the velocity template IDbaseUrl
- base urlcontextParams
- map of context parametersthreader
- mail threaderSingleMailQueueItem
s ready to be sent or added to a queueorg.apache.velocity.exception.VelocityException
- if notification compiler failsCopyright © 2002-2021 Atlassian. All Rights Reserved.