Class MailingListCompiler

java.lang.Object
com.atlassian.jira.mail.MailingListCompiler
Direct Known Subclasses:
DefaultSubscriptionManager

public class MailingListCompiler extends Object
Methods responsible for sending a notification email to a list of NotificationRecipients.

Notification format (eg. text/html) is taken into account as well as comment security levels.

  • Constructor Details

  • Method Details

    • getEmailAddresses

      @Deprecated public static String getEmailAddresses(Set<String> addresses)
      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.VelocityException
      Deprecated.
      use prepareEmail(Set, String, String, String, Long, Map, MailThreader) and add emails to desired queue by yourself
      This 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 of NotificationRecipients
      sender - sender
      senderFrom - sender from
      replyTo - reply to
      templateId - the velocity template ID
      threader - 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.VelocityException
      This 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 of NotificationRecipients
      sender - sender
      senderFrom - sender from
      replyTo - reply to
      templateId - the velocity template ID
      contextParams - map of context parameters
      threader - mail threader
      Returns:
      Collection of prepared SingleMailQueueItems ready to be sent or added to a queue
      Throws:
      org.apache.velocity.exception.VelocityException - if notification compiler fails
      Since:
      v7.1.5