|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.openexchange.mail.search.SearchTerm<java.lang.String>
com.openexchange.mail.search.BodyTerm
public final class BodyTerm
| Constructor Summary | |
|---|---|
BodyTerm(java.lang.String pattern)
Initializes a new BodyTerm |
|
| Method Summary | |
|---|---|
void |
addMailField(java.util.Collection<MailField> col)
Adds the addressed MailField to specified collection |
boolean |
containsWildcard()
Checks if this search term's pattern contains wildcard characters '*' and '?' |
javax.mail.search.SearchTerm |
getJavaMailSearchTerm()
Generates the corresponding JavaMail instance of SearchTerm from this search term |
javax.mail.search.SearchTerm |
getNonWildcardJavaMailSearchTerm()
Generates the corresponding instance of SearchTerm from this search term without any wildcard characters. |
java.lang.String |
getPattern()
Gets the pattern to which the expression should match. |
boolean |
isAscii()
Checks if this search term's pattern only consists of ASCII 7 bit characters. |
boolean |
matches(MailMessage mailMessage)
Checks if specified mail message matches this search term |
boolean |
matches(javax.mail.Message msg)
Checks if given message matches this search term |
| Methods inherited from class com.openexchange.mail.search.SearchTerm |
|---|
filter, filter |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BodyTerm(java.lang.String pattern)
BodyTerm
| Method Detail |
|---|
public java.lang.String getPattern()
SearchTerm
getPattern in class SearchTerm<java.lang.String>public void addMailField(java.util.Collection<MailField> col)
SearchTerm
addMailField in class SearchTerm<java.lang.String>col - The collection which gathers addressed fields
public boolean matches(MailMessage mailMessage)
throws MailException
SearchTerm
matches in class SearchTerm<java.lang.String>mailMessage - The mail message to check
true if specified mail message matches this search term; otherwise false
MailException - If checking mail message against search term fails
public boolean matches(javax.mail.Message msg)
throws MailException
SearchTerm
matches in class SearchTerm<java.lang.String>msg - The message to check
true if message matches this search term; otherwise false
MailException - If check failspublic javax.mail.search.SearchTerm getJavaMailSearchTerm()
SearchTermSearchTerm from this search term
getJavaMailSearchTerm in class SearchTerm<java.lang.String>SearchTermpublic javax.mail.search.SearchTerm getNonWildcardJavaMailSearchTerm()
SearchTermSearchTerm from this search term without any wildcard characters.
This is useful to preselect possible positives and to manually filtering out false positives.
getNonWildcardJavaMailSearchTerm in class SearchTerm<java.lang.String>SearchTerm without any wildcard characters.SearchTerm.containsWildcard()public boolean isAscii()
SearchTerm
This method implies that this search is some kind of string search term. Returns true if not appropriate.
isAscii in class SearchTerm<java.lang.String>true if search term's pattern only consists of ASCII 7 bit characters; otherwise falsepublic boolean containsWildcard()
SearchTerm'*' and '?'.
This method implies that this search is some kind of string search term. Returns false if not appropriate.
containsWildcard in class SearchTerm<java.lang.String>true if this search term's pattern contains wildcard characters; otherwise false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||