public class MailNotificationQueueItem extends AbstractMailNotificationQueueItem
Modifier and Type | Field and Description |
---|---|
static String |
TEMPLATES_LOCATION
Deprecated.
since 5.2, use
#getDefaultTemplateLocation(String) |
body, dateQueued, MIME_TYPE_HTML, MIME_TYPE_TEXT
Modifier | Constructor and Description |
---|---|
protected |
MailNotificationQueueItem(com.atlassian.user.User user,
String templateContent,
String subject) |
protected |
MailNotificationQueueItem(com.atlassian.user.User user,
String templateLocation,
String templateFileName,
String subject) |
Modifier and Type | Method and Description |
---|---|
static MailNotificationQueueItem |
createFromTemplateContent(com.atlassian.user.User user,
String templateContent,
String subject) |
static MailNotificationQueueItem |
createFromTemplateFile(com.atlassian.user.User user,
String templateFileName,
String subject) |
static MailNotificationQueueItem |
createFromTemplateFileAndLocation(com.atlassian.user.User user,
String templateLocation,
String templateFileName,
String subject) |
protected com.atlassian.mail.Email |
createMailObject() |
protected static String |
getDefaultTemplateLocation(com.atlassian.user.User user,
String templateFileName)
Returns the default location for the given user and template name.
|
protected String |
getMimeType() |
protected static String |
getMimeTypeForUser(com.atlassian.user.User user)
TODO: CONFDEV-3278
|
protected static String |
getTemplateLocationFromUserPreference(com.atlassian.user.User user)
Deprecated.
since 5.2, use
#getDefaultTemplateLocation(String) |
static UserAccessor |
getUserAccessor() |
addVelocityContextParam, clearContext, compareTo, execute, getBody, getDateQueued, getLastError, getRenderedContent, getRenderedContent, getSendCount, getSubject, getTemplateContent, getTemplateFileName, getTemplateLocation, getVelocityContextParam, hasError, incrementSendCount, isRecognisedMimeType, preRenderBody, removeVelocityContextParam, renderTemplate, retrieveMailServer, send, setBody, setLastError, setSubject, setTemplateContent, setTemplateFileName, setTemplateLocation, transformForEmail
public static final String TEMPLATES_LOCATION
#getDefaultTemplateLocation(String)
protected MailNotificationQueueItem(com.atlassian.user.User user, String templateLocation, String templateFileName, String subject)
public static MailNotificationQueueItem createFromTemplateFile(com.atlassian.user.User user, String templateFileName, String subject)
public static MailNotificationQueueItem createFromTemplateFileAndLocation(com.atlassian.user.User user, String templateLocation, String templateFileName, String subject)
public static MailNotificationQueueItem createFromTemplateContent(com.atlassian.user.User user, String templateContent, String subject)
protected String getMimeType()
protected com.atlassian.mail.Email createMailObject()
createMailObject
in class AbstractMailNotificationQueueItem
protected static String getMimeTypeForUser(com.atlassian.user.User user)
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.
user
- The user to checkprotected static String getTemplateLocationFromUserPreference(com.atlassian.user.User user)
#getDefaultTemplateLocation(String)
Retrieve the location of the mail notification templates, based on the user's email notification format preference.
user
- The user whose preferences to check for the appropriate email formatprotected static String getDefaultTemplateLocation(@Nullable com.atlassian.user.User user, @Nullable String templateFileName)
If a template name ends with .vm indicating a Velocity template, a path relative to the webapp context is returned. In any other case, a completeKey pointing to a web resource is returned.
user
- the name of the user for which the default location should be retrieved, currently not usedtemplateFileName
- the name of the template for which the default location should be retrievedpublic static UserAccessor getUserAccessor()
Copyright © 2003–2017 Atlassian. All rights reserved.