SK.gnome.dwarf.mail.store.search
Class DateHeaderKey

java.lang.Object
  extended bySK.gnome.dwarf.mail.store.search.SearchKey
      extended bySK.gnome.dwarf.mail.store.search.DateKey
          extended bySK.gnome.dwarf.mail.store.search.DateHeaderKey

public class DateHeaderKey
extends DateKey

This key matches the given date/time and the "Date" message header value.


Field Summary
 
Fields inherited from class SK.gnome.dwarf.mail.store.search.DateKey
BEFORE, ON, SINCE, time
 
Fields inherited from class SK.gnome.dwarf.mail.store.search.SearchKey
type
 
Constructor Summary
DateHeaderKey(int type, long time)
          Creates a new DateHeaderKey.
 
Method Summary
protected  long getTime(MailMessage message)
          Returns the date/time from the given message.
 
Methods inherited from class SK.gnome.dwarf.mail.store.search.DateKey
getTime, match, toString
 
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
 

Constructor Detail

DateHeaderKey

public DateHeaderKey(int type,
                     long time)
Creates a new DateHeaderKey.

Parameters:
type - the key type
time - the matched time
Method Detail

getTime

protected long getTime(MailMessage message)
                throws MailException
Returns the date/time from the given message.

It returns the date/time obtained from the "Date" message header.

Specified by:
getTime in class DateKey
Parameters:
message - the searched message
Returns:
the message date/time or -1 if not available
Throws:
MailException - if an error occured


Copyright (c) 2004-2005, Gnome Ltd. All rights reserved.