|
||||||||||
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.HeaderKey
This key matches the given header and the actual message header value.
Field Summary | |
protected java.lang.String |
name
The matched header name. |
static int |
PARTIAL
This key type specifies that a partial word will be matched. |
static int |
PRESENCE
This key type specifies that the header will be always matched if it is present. |
static int |
SUBSTRING
This key type specifies that a substring will be matched. |
protected java.lang.String |
value
The matched header value. |
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 | |
HeaderKey(int type,
java.lang.String name,
java.lang.String value)
Creates a new HeaderKey with the given type, name and value. |
|
HeaderKey(java.lang.String name)
Creates a new HeaderKey with the given name. |
|
HeaderKey(java.lang.String name,
java.lang.String value)
Creates a new HeaderKey with the given name and value. |
Method Summary | |
java.lang.String |
getName()
Returns the matched header name. |
java.lang.String |
getValue()
Returns the matched header value. |
boolean |
match(MailMessage message)
Matches the given header and the actual message header. |
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 PRESENCE
public static final int SUBSTRING
public static final int WORD
public static final int PARTIAL
protected java.lang.String name
protected java.lang.String value
Constructor Detail |
public HeaderKey(java.lang.String name)
The type of the key is set to PRESENCE
.
name
- the header namepublic HeaderKey(java.lang.String name, java.lang.String value)
The type of the key is set to SUBSTRING
.
name
- the header namevalue
- the header valuepublic HeaderKey(int type, java.lang.String name, java.lang.String value)
type
- the key typename
- the header namevalue
- the header valueMethod Detail |
public java.lang.String getName()
public java.lang.String getValue()
public boolean match(MailMessage message) throws MailException
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 |