public final class AbortAttachmentHandler extends AbstractAttachmentHandler
AbortAttachmentHandler
- An attachment handler
that throws a OXException
on exceeded quota
(either overall or per-file quota).Constructor and Description |
---|
AbortAttachmentHandler(com.openexchange.session.Session session)
Initializes a new
AbortAttachmentHandler . |
Modifier and Type | Method and Description |
---|---|
void |
addAttachment(MailPart attachment)
Adds specified attachment.
|
ComposedMailMessage[] |
generateComposedMails(ComposedMailMessage source,
java.util.List<com.openexchange.exception.OXException> warnings)
Generates composed mails.
|
void |
setTextPart(TextBodyMailPart textPart)
Sets the text part which may be modified.
|
public AbortAttachmentHandler(com.openexchange.session.Session session) throws com.openexchange.exception.OXException
AbortAttachmentHandler
.session
- The session providing needed user informationcom.openexchange.exception.OXException
- If initialization failspublic void addAttachment(MailPart attachment) throws com.openexchange.exception.OXException
IAttachmentHandler
attachment
- The attachment to addcom.openexchange.exception.OXException
- Depending on implementation it may indicate an exceeded quota, but other errors as wellpublic ComposedMailMessage[] generateComposedMails(ComposedMailMessage source, java.util.List<com.openexchange.exception.OXException> warnings) throws com.openexchange.exception.OXException
IAttachmentHandler
source
- The source composed mailcom.openexchange.exception.OXException
- If an error occurs while filling mailpublic void setTextPart(TextBodyMailPart textPart)
IAttachmentHandler
textPart
- The text part to set