public class

MailAttachments

extends Object
java.lang.Object
   ↳ com.atlassian.jira.mail.util.MailAttachments

Summary

Public Constructors
MailAttachments()
Public Methods
static MailAttachment newAvatarAttachment(Avatar avatar, String avatarOwnerDescription, AvatarManager avatarManager)
Creates an image attachment from provided avatar.
static MailAttachment newImageAttachment(String imagePath, AvatarTranscoder avatarTranscoder)
Creates an image attachment from provided path.
static MailAttachment newTranscodedAvatarAttachment(Avatar avatar, String avatarOwnerDescription, AvatarTranscoder avatarTranscoder)
static MailAttachment newTranscodedAvatarAttachment(Avatar avatar, String avatarOwnerDescription, AvatarTranscoder avatarTranscoder, Avatar.Size size)
Creates an image attachment from provided avatar via AvatarTranscoder to get the image in raster fromat.
static MailAttachment newUrlImageAttachment(String imagePath)
Creates an image attachment from provided URL.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MailAttachments ()

Public Methods

public static MailAttachment newAvatarAttachment (Avatar avatar, String avatarOwnerDescription, AvatarManager avatarManager)

Creates an image attachment from provided avatar. Uses AvatarManager to read the image's data.

public static MailAttachment newImageAttachment (String imagePath, AvatarTranscoder avatarTranscoder)

Creates an image attachment from provided path. If the image at the path is in SVG format it will be transcoded to PNG.

public static MailAttachment newTranscodedAvatarAttachment (Avatar avatar, String avatarOwnerDescription, AvatarTranscoder avatarTranscoder)

public static MailAttachment newTranscodedAvatarAttachment (Avatar avatar, String avatarOwnerDescription, AvatarTranscoder avatarTranscoder, Avatar.Size size)

Creates an image attachment from provided avatar via AvatarTranscoder to get the image in raster fromat.

public static MailAttachment newUrlImageAttachment (String imagePath)

Creates an image attachment from provided URL. Should only be used for local resources that aren't accessible via ServletContext