public interface

MailAttachmentsManager

com.atlassian.jira.mail.util.MailAttachmentsManager
Known Indirect Subclasses

Summary

Constants
String CID_PREFIX Content-ID for generated attachments.
Public Methods
Iterable<BodyPart> buildAttachmentsBodyParts()
Builds bodyPart for each image (including avatars) added to this manager
int getAttachmentsCount()
Returns the number of attachments added to this manager
String getAvatarUrl(String username)
Returns a link to access user avatar in email message.
String getAvatarUrl(TemplateUser templateUser)
Returns a link to access user avatar in email message.
String getAvatarUrl(ApplicationUser user)
Returns a link to access user avatar in email message.
String getImageUrl(String path)
Tries to add image specified by path to email attachments.

Constants

public static final String CID_PREFIX

Content-ID for generated attachments.

Constant Value: "jira-generated-image-"

Public Methods

public Iterable<BodyPart> buildAttachmentsBodyParts ()

Builds bodyPart for each image (including avatars) added to this manager

Returns
  • Added attachments as list of BodyParts

public int getAttachmentsCount ()

Returns the number of attachments added to this manager

Returns
  • number of attachments

public String getAvatarUrl (String username)

Returns a link to access user avatar in email message. If avatar can be attached to email, the cid link is returned, otherwise avatar URL is returned and no image is attached. (E.g. If Gravatar is enabled)

Returns
  • cid link or Avatar URL

public String getAvatarUrl (TemplateUser templateUser)

Returns a link to access user avatar in email message. If avatar can be attached to email, the cid link is returned, otherwise avatar URL is returned and no image is attached. (E.g. If Gravatar is enabled)

Returns
  • cid link or Avatar URL

public String getAvatarUrl (ApplicationUser user)

Returns a link to access user avatar in email message. If avatar can be attached to email, the cid link is returned, otherwise avatar URL is returned and no image is attached. (E.g. If Gravatar is enabled)

Returns
  • cid link or Avatar URL

public String getImageUrl (String path)

Tries to add image specified by path to email attachments. Returns image cid link if succeeds or unchanged path if specified path cannot be added as attachment