public class

MailNotificationQueueItem

extends AbstractMailNotificationQueueItem
java.lang.Object
   ↳ com.atlassian.confluence.mail.template.AbstractMailNotificationQueueItem
     ↳ com.atlassian.confluence.mail.template.MailNotificationQueueItem
Known Direct Subclasses

Class Overview

Handles mail notifications to Confluence users

Summary

Constants
String TEMPLATES_LOCATION
[Expand]
Inherited Constants
From class com.atlassian.confluence.mail.template.AbstractMailNotificationQueueItem
[Expand]
Inherited Fields
From class com.atlassian.confluence.mail.template.AbstractMailNotificationQueueItem
Protected Constructors
MailNotificationQueueItem(User user, String templateLocation, String templateFileName, String subject)
MailNotificationQueueItem(User user, String templateContent, String subject)
Public Methods
static MailNotificationQueueItem createFromTemplateContent(User user, String templateContent, String subject)
static MailNotificationQueueItem createFromTemplateFile(User user, String templateFileName, String subject)
static MailNotificationQueueItem createFromTemplateFileAndLocation(User user, String templateLocation, String templateFileName, String subject)
static UserAccessor getUserAccessor()
Protected Methods
Email createMailObject()
String getMimeType()
static String getMimeTypeForUser(User user)
TODO: CONFDEV-3278 With the switch to XHTML from wiki markup, we no longer support TEXT or HTML selection.
static String getTemplateLocationFromUserPreference(User user)
TODO: CONFDEV-3278 Retrieve the location of the mail notification templates, based on the user's email notification format preference.
[Expand]
Inherited Methods
From class com.atlassian.confluence.mail.template.AbstractMailNotificationQueueItem
From class java.lang.Object
From interface com.atlassian.core.task.Task
From interface com.atlassian.mail.queue.MailQueueItem

Constants

public static final String TEMPLATES_LOCATION

Constant Value: "/templates/email/"

Protected Constructors

protected MailNotificationQueueItem (User user, String templateLocation, String templateFileName, String subject)

protected MailNotificationQueueItem (User user, String templateContent, String subject)

Public Methods

public static MailNotificationQueueItem createFromTemplateContent (User user, String templateContent, String subject)

public static MailNotificationQueueItem createFromTemplateFile (User user, String templateFileName, String subject)

public static MailNotificationQueueItem createFromTemplateFileAndLocation (User user, String templateLocation, String templateFileName, String subject)

public static UserAccessor getUserAccessor ()

Protected Methods

protected Email createMailObject ()

protected String getMimeType ()

protected static String getMimeTypeForUser (User user)

TODO: CONFDEV-3278 With the switch to XHTML from wiki markup, we no longer support TEXT or HTML selection. It is always HTML, but some day we might want to add support for something else, so keep the structure for selection in place, but just hidden.

Parameters
user The user to check
Returns
  • the user's preferred format for email notifications

protected static String getTemplateLocationFromUserPreference (User user)

TODO: CONFDEV-3278 Retrieve the location of the mail notification templates, based on the user's email notification format preference.

Parameters
user The user whose preferences to check for the appropriate email format
Returns
  • the location in which the appropriate mail notification templates reside