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-Type s |
static MimeFilter |
filterFor(java.lang.String... ignorableContentTypes)
Gets the MIME filter for specified ignorable
Content-Type s |
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-Type s |
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-Type
signorableContentTypes
- The ignorable Content-Type
spublic static MimeFilter filterFor(java.util.List<java.lang.String> ignorableContentTypes)
Content-Type
signorableContentTypes
- The ignorable Content-Type
spublic java.util.List<java.lang.String> getIgnorableContentTypes()
Content-Type
sContent-Type
spublic 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 false
public boolean ignorable(java.lang.String contentType, MailPart bodyPart)
contentType
- The part's Content-TypebodyPart
- The body parttrue
to ignore; otherwise false