public class MailAttachments extends Object
This is a utility classed used by MailAttachmentsManagerImpl
to create different type of image attachments.
Previously most of this code lived inside the MailAttachmentsManagerImpl
.
Constructor and Description |
---|
MailAttachments() |
Modifier and Type | Method and Description |
---|---|
static MailAttachment |
newAvatarAttachment(Avatar avatar,
String avatarOwnerDescription,
AvatarManager avatarManager) |
static MailAttachment |
newAvatarAttachment(Avatar avatar,
String avatarOwnerDescription,
AvatarManager avatarManager,
Avatar.Size size)
Creates an image attachment from provided avatar.
|
static MailAttachment |
newImageAttachment(String imagePath,
AvatarTranscoder avatarTranscoder)
Creates an image attachment from provided path.
|
static MailAttachment |
newMailAttachmentByStreamingFromAttachmentManager(Attachment attachment,
AttachmentManager attachmentManager)
Create a new mail attachment by streaming the content of the attachment from the attachment manager.
|
static MailAttachment |
newMailAttachmentByStreamingFromThumbnailManager(Attachment attachment,
ThumbnailManager thumbnailManager)
Create a new mail attachment by streaming the content of a thumbnail from the thumbnail manager.
|
static MailAttachment |
newTranscodedAvatarAttachment(Avatar avatar,
String avatarOwnerDescription,
AvatarManager avatarManager) |
static MailAttachment |
newTranscodedAvatarAttachment(Avatar avatar,
String avatarOwnerDescription,
AvatarManager avatarManager,
Avatar.Size size)
Creates an image attachment from provided avatar via
AvatarTranscoderImpl to get the image in raster fromat. |
static MailAttachment |
newUrlImageAttachment(String imagePath)
Creates an image attachment from provided URL.
|
public static MailAttachment newImageAttachment(String imagePath, AvatarTranscoder avatarTranscoder)
public static MailAttachment newUrlImageAttachment(String imagePath)
public static MailAttachment newAvatarAttachment(Avatar avatar, String avatarOwnerDescription, AvatarManager avatarManager, Avatar.Size size)
AvatarManager
to read the image's data.public static MailAttachment newAvatarAttachment(Avatar avatar, String avatarOwnerDescription, AvatarManager avatarManager)
public static MailAttachment newTranscodedAvatarAttachment(Avatar avatar, String avatarOwnerDescription, AvatarManager avatarManager, Avatar.Size size)
AvatarTranscoderImpl
to get the image in raster fromat.public static MailAttachment newTranscodedAvatarAttachment(Avatar avatar, String avatarOwnerDescription, AvatarManager avatarManager)
public static MailAttachment newMailAttachmentByStreamingFromAttachmentManager(Attachment attachment, AttachmentManager attachmentManager)
attachment
- The attachment whose contents we want to include.attachmentManager
- The manager to use for streaming the content.MailAttachment
containing the desired attachment content.public static MailAttachment newMailAttachmentByStreamingFromThumbnailManager(Attachment attachment, ThumbnailManager thumbnailManager)
attachment
- The attachment whose thumbnail we want to attach.thumbnailManager
- The manager to use for streaming the content.MailAttachment
containing the desired thumbnail.Copyright © 2002-2021 Atlassian. All Rights Reserved.