|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SK.gnome.dwarf.mail.store.search.SearchKey SK.gnome.dwarf.mail.store.search.TextKey
This key matches the given text and the actual message content.
Field Summary | |
protected boolean |
header
If only the message header will be matched. |
protected java.lang.String |
charset
The charset of the matched text. |
static int |
PARTIAL
This key type specifies that a partial word will be matched. |
static int |
SUBSTRING
This key type specifies that a substring will be matched. |
protected java.lang.String |
text
The matched text. |
static int |
WORD
This key type specifies that a single word will be matched. |
Fields inherited from class SK.gnome.dwarf.mail.store.search.SearchKey |
type |
Constructor Summary | |
TextKey(int type,
java.lang.String text,
java.lang.String charset,
boolean header)
Creates a new TextKey with the given type. |
|
TextKey(java.lang.String text,
java.lang.String charset,
boolean header)
Creates a new TextKey. |
Method Summary | |
java.lang.String |
getCharset()
Returns the charset of the matched text. |
boolean |
getSearchHeader()
Returns whether only the message header will be matched. |
java.lang.String |
getText()
Returns the matched text. |
boolean |
match(MailMessage message)
Matches the given text and the actual message content. |
java.lang.String |
toString()
Returns the string represenation of the key. |
Methods inherited from class SK.gnome.dwarf.mail.store.search.SearchKey |
addError, clearErrors, getErrors, getType, hasError |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int SUBSTRING
public static final int WORD
public static final int PARTIAL
protected java.lang.String text
protected java.lang.String charset
protected boolean header
Constructor Detail |
public TextKey(java.lang.String text, java.lang.String charset, boolean header)
The key type will be set to SUBSTRING
.
text
- the matched textcharset
- the charset of the matched textheader
- if only the header will be matchedpublic TextKey(int type, java.lang.String text, java.lang.String charset, boolean header)
type
- the key typetext
- the matched textcharset
- the charset of the matched textheader
- if only the header will be matchedMethod Detail |
public java.lang.String getText()
public java.lang.String getCharset()
public boolean getSearchHeader()
public boolean match(MailMessage message) throws MailException
For now, only messages of MIME type "text/*" or "message/rfc822" with a "text/*" type of the nested message are searched.
match
in class SearchKey
message
- the searched message
MailException
- if an error occurspublic java.lang.String toString()
SearchKey
toString
in class SearchKey
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |