|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.openexchange.mail.search.SearchTerm<T>
public abstract class SearchTerm<T>
| Constructor Summary | |
|---|---|
SearchTerm()
Initializes a new SearchTerm |
|
| Method Summary | |
|---|---|
abstract 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 '?' |
SearchTerm<?> |
filter(java.lang.Class<? extends SearchTerm>[] filter)
Generates a search term with the unsupported search terms specified through filter removed. |
SearchTerm<?> |
filter(java.util.Set<java.lang.Class<? extends SearchTerm>> filterSet)
Generates a search term with the unsupported search terms specified through filter removed. |
abstract javax.mail.search.SearchTerm |
getJavaMailSearchTerm()
Generates the corresponding JavaMail instance of SearchTerm from this search term |
abstract javax.mail.search.SearchTerm |
getNonWildcardJavaMailSearchTerm()
Generates the corresponding instance of SearchTerm from this search term without any wildcard characters. |
abstract T |
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. |
abstract boolean |
matches(MailMessage mailMessage)
Checks if specified mail message matches this search term |
abstract boolean |
matches(javax.mail.Message msg)
Checks if given message matches this search term |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SearchTerm()
SearchTerm
| Method Detail |
|---|
public abstract T getPattern()
public abstract void addMailField(java.util.Collection<MailField> col)
col - The collection which gathers addressed fields
public abstract boolean matches(javax.mail.Message msg)
throws MailException
msg - The message to check
true if message matches this search term; otherwise false
MailException - If check fails
public abstract boolean matches(MailMessage mailMessage)
throws MailException
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 failspublic abstract javax.mail.search.SearchTerm getJavaMailSearchTerm()
SearchTerm from this search term
SearchTermpublic abstract javax.mail.search.SearchTerm getNonWildcardJavaMailSearchTerm()
SearchTerm from this search term without any wildcard characters.
This is useful to preselect possible positives and to manually filtering out false positives.
SearchTerm without any wildcard characters.containsWildcard()public SearchTerm<?> filter(java.lang.Class<? extends SearchTerm>[] filter)
filter removed.
For each search term contained in this search term the following rule is applied:
ORTerm or ANDTerm replace the unsupported with:
BooleanTerm.FALSE for ORTerm and
BooleanTerm.TRUE for ANDTermBooleanTerm.FALSE for both ORTerm and ANDTermBooleanTerm.FALSENote: Only a shallow copy is generated; meaning further working on this search term may influence return value's search term.
filter - An array containing unsupported classes of SearchTerm to filter against
public SearchTerm<?> filter(java.util.Set<java.lang.Class<? extends SearchTerm>> filterSet)
filter removed.
For each search term contained in this search term the following rule is applied:
ORTerm or ANDTerm replace the unsupported with:
BooleanTerm.FALSE for ORTerm and
BooleanTerm.TRUE for ANDTermBooleanTerm.FALSE for both ORTerm and ANDTermBooleanTerm.FALSENote: Only a shallow copy is generated; meaning further working on this search term may influence return value's search term.
filterSet - The filter set containing classes unsupported search terms
public boolean isAscii()
This method implies that this search is some kind of string search term. Returns true if not appropriate.
true if search term's pattern only consists of ASCII 7 bit characters; otherwise falsepublic boolean containsWildcard()
'*' and '?'.
This method implies that this search is some kind of string search term. Returns false if not appropriate.
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 | |||||||||