com.openexchange.mail.json.parser
Class AbstractAttachmentHandler

java.lang.Object
  extended by com.openexchange.mail.json.parser.AbstractAttachmentHandler

public abstract class AbstractAttachmentHandler
extends java.lang.Object

AbstractAttachmentHandler - An abstract attachment handler.

Author:
Thorben Betten

Constructor Summary
AbstractAttachmentHandler(com.openexchange.session.Session session)
          Initializes a new AbstractAttachmentHandler.
 
Method Summary
 void addAttachment(MailPart attachment)
          Adds specified attachment.
 ComposedMailMessage[] generateComposedMails(ComposedMailMessage source)
          Generates composed mails.
 void setTextPart(TextBodyMailPart textBodyPart)
          Sets the text part which may be modified.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAttachmentHandler

public AbstractAttachmentHandler(com.openexchange.session.Session session)
                          throws MailException
Initializes a new AbstractAttachmentHandler.

Parameters:
session - The session providing needed user information
Throws:
MailException - If initialization fails
Method Detail

setTextPart

public void setTextPart(TextBodyMailPart textBodyPart)
Sets the text part which may be modified.

Parameters:
textBodyPart - The text part to set

addAttachment

public void addAttachment(MailPart attachment)
                   throws MailException
Adds specified attachment.

Parameters:
attachment - The attachment to add
Throws:
MailException - Depending on implementation it may indicate an exceeded quota, but other errors as well

generateComposedMails

public ComposedMailMessage[] generateComposedMails(ComposedMailMessage source)
                                            throws MailException
Generates composed mails.

Parameters:
source - The source composed mail
Returns:
The resulting composed mails
Throws:
MailException - If an error occurs while filling mail