Class MailNotificationQueueItem

    • Field Detail

      • TEMPLATES_LOCATION

        public static final String TEMPLATES_LOCATION
        Deprecated.
        since 5.2, use #getDefaultTemplateLocation(String)
        See Also:
        Constant Field Values
    • Constructor Detail

      • MailNotificationQueueItem

        protected MailNotificationQueueItem​(com.atlassian.user.User user,
                                            String templateLocation,
                                            String templateFileName,
                                            String subject)
      • MailNotificationQueueItem

        protected MailNotificationQueueItem​(com.atlassian.user.User user,
                                            String templateContent,
                                            String subject)
    • Method Detail

      • getMimeType

        protected String getMimeType()
      • getMimeTypeForUser

        protected static String getMimeTypeForUser​(com.atlassian.user.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
      • getDefaultTemplateLocation

        protected static String getDefaultTemplateLocation​(@Nullable com.atlassian.user.User user,
                                                           @Nullable String templateFileName)
        Returns the default location for the given user and template name.

        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.

        Parameters:
        user - the name of the user for which the default location should be retrieved, currently not used
        templateFileName - the name of the template for which the default location should be retrieved
        Returns:
        the default template location
      • getUserAccessor

        @Deprecated
        public static UserAccessor getUserAccessor()
        Deprecated.
        since 8.7, use component injection