com.atlassian.jira.mail.util
Class MailAttachmentManagerImpl

java.lang.Object
  extended by com.atlassian.jira.mail.util.MailAttachmentManagerImpl
All Implemented Interfaces:
MailAttachmentManager

public class MailAttachmentManagerImpl
extends Object
implements MailAttachmentManager


Constructor Summary
MailAttachmentManagerImpl(AvatarManager manager)
           
 
Method Summary
 void addAvatar(Avatar avatar, String attachmentId)
          Add user avatar as attachment to email.
 Collection<javax.mail.BodyPart> buildAsBodyParts()
          Converts each attachment added to this instance of MailAttachmentManager as a BodyParts ready to be send via e-mail
 boolean haveAnyAttachments()
          Checks if this instance of MailAttachmentManager has any attachments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailAttachmentManagerImpl

public MailAttachmentManagerImpl(AvatarManager manager)
Method Detail

addAvatar

public void addAvatar(Avatar avatar,
                      String attachmentId)
Description copied from interface: MailAttachmentManager
Add user avatar as attachment to email. Attached image can be used via cid e.g:

Specified by:
addAvatar in interface MailAttachmentManager
Parameters:
avatar - the Avatar
attachmentId - the AvatarID used to access image in e-mail

haveAnyAttachments

public boolean haveAnyAttachments()
Description copied from interface: MailAttachmentManager
Checks if this instance of MailAttachmentManager has any attachments

Specified by:
haveAnyAttachments in interface MailAttachmentManager
Returns:
True if there are any attachments ready to build

buildAsBodyParts

public Collection<javax.mail.BodyPart> buildAsBodyParts()
                                                 throws IOException,
                                                        javax.mail.MessagingException
Description copied from interface: MailAttachmentManager
Converts each attachment added to this instance of MailAttachmentManager as a BodyParts ready to be send via e-mail

Specified by:
buildAsBodyParts in interface MailAttachmentManager
Returns:
Collection of BodyParts
Throws:
IOException - when resource couldn't be load
javax.mail.MessagingException - when attached resource cannot be attached to e-mail


Copyright © 2002-2013 Atlassian. All Rights Reserved.