public class MimeFilter
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
javax.mail.internet.MimeMessage |
filter(javax.mail.internet.MimeMessage mimeMessage)
Filters matching parts from specified MIME message.
|
static MimeFilter |
filterFor(java.util.List<java.lang.String> ignorableContentTypes)
Gets the MIME filter for specified ignorable
Content-Types |
static MimeFilter |
filterFor(java.lang.String... ignorableContentTypes)
Gets the MIME filter for specified ignorable
Content-Types |
static MimeFilter |
filterFor(java.lang.String alias)
Gets the MIME filter for specified alias.
|
java.util.List<java.lang.String> |
getIgnorableContentTypes()
Gets the ignorable
Content-Types |
boolean |
ignorable(java.lang.String contentType,
javax.mail.BodyPart bodyPart)
Invoked to detect if passed body part should be ignored.
|
boolean |
ignorable(java.lang.String contentType,
MailPart bodyPart)
Invoked to detect if passed body part should be ignored.
|
public static MimeFilter filterFor(java.lang.String alias)
alias - The aliasnull if alias is unknownpublic static MimeFilter filterFor(java.lang.String... ignorableContentTypes)
Content-TypesignorableContentTypes - The ignorable Content-Typespublic static MimeFilter filterFor(java.util.List<java.lang.String> ignorableContentTypes)
Content-TypesignorableContentTypes - The ignorable Content-Typespublic java.util.List<java.lang.String> getIgnorableContentTypes()
Content-TypesContent-Typespublic javax.mail.internet.MimeMessage filter(javax.mail.internet.MimeMessage mimeMessage)
throws com.openexchange.exception.OXException
mimeMessage - The MIME message to filtercom.openexchange.exception.OXException - If filter operation failspublic boolean ignorable(java.lang.String contentType,
javax.mail.BodyPart bodyPart)
contentType - The part's Content-TypebodyPart - The body parttrue to ignore; otherwise falsepublic boolean ignorable(java.lang.String contentType,
MailPart bodyPart)
contentType - The part's Content-TypebodyPart - The body parttrue to ignore; otherwise false