Enum SearchKey
- java.lang.Object
-
- java.lang.Enum<SearchKey>
-
- com.icegreen.greenmail.imap.commands.SearchKey
-
- All Implemented Interfaces:
Serializable,Comparable<SearchKey>
public enum SearchKey extends Enum<SearchKey>
SearchKey as defined in "RFC3501" section "6.4.4. SEARCH Command"Read more: rfc3501
- SEQUENCE_SET <SEQUENCE SET> of message ids
- ALL All messages in the mailbox; the default initial key for ANDing
- ANSWERED Messages with the \Answered flag set.
- BCC Messages that contain the specified string in the envelope structure's BCC field.
- BEFORE <date> Messages whose internal date (disregarding time and timezone) is earlier than the specified date.
- BODY <string> Messages that contain the specified string in the body of the message.
- CC <string> Messages that contain the specified string in the envelope structure's CC field.
- DELETED Messages with the \Deleted flag set.
- DRAFT Messages with the \Draft flag set.
- FLAGGED Messages with the \Flagged flag set.
- FROM <string> Messages that contain the specified string in the envelope structure's FROM field.
- HEADER <field-name> <string> Messages that have a header with the specified field-name (as defined in [RFC-2822]) and that contains the specified string in the text of the header (what comes after the colon). If the string to search is zero-length, this matches all messages that have a header line with the specified field-name regardless of the contents.
- KEYWORD <flag> Messages with the specified keyword flag set.
- LARGER <n> Messages with an [RFC-2822] size larger than the specified number of octets.
- NEW Messages that have the \Recent flag set but not the \Seen flag. This is functionally equivalent to "(RECENT UNSEEN)".
- NOT <search-key> Messages that do not match the specified search key.
- OLD Messages that do not have the \Recent flag set. This is functionally equivalent to "NOT RECENT" (as opposed to "NOT NEW").
- ON <date> Messages whose internal date (disregarding time and timezone) is within the specified date.
- OR <search-key1> <search-key2> Messages that match either search key.
- RECENT Messages that have the \Recent flag set.
- SEEN Messages that have the \Seen flag set.
- SENTBEFORE <date> Messages whose [RFC-2822] Date: header (disregarding time and timezone) is earlier than the specified date.
- SENTON <date> Messages whose [RFC-2822] Date: header (disregarding time and timezone) is within the specified date.
- SENTSINCE <date> Messages whose [RFC-2822] Date: header (disregarding time and timezone) is within or later than the specified date.
- SINCE <date> Messages whose internal date (disregarding time and timezone) is within or later than the specified date.
- SMALLER <n> Messages with an [RFC-2822] size smaller than the specified number of octets.
- SUBJECT <string> Messages that contain the specified string in the envelope structure's SUBJECT field.
- TEXT <string> Messages that contain the specified string in the header or body of the message.
- TO <string> Messages that contain the specified string in the envelope structure's TO field.
- UID <sequence set> Messages with unique identifiers corresponding to the specified unique identifier set. Sequence set ranges are permitted.
- uid-set = (uniqueid / uid-range) *("," uid-set)
- uid-range = (uniqueid ":" uniqueid)
Two uniqueid values and all values between these two regards of order.
Example: 2:4 and 4:2 are equivalent.
- UNANSWERED Messages that do not have the \Answered flag set.
- UNDELETED Messages that do not have the \Deleted flag set.
- UNDRAFT Messages that do not have the \Draft flag set.
- UNFLAGGED Messages that do not have the \Flagged flag set.
- UNKEYWORD <flag> Messages that do not have the specified keyword flag set.
- UNSEEN Messages that do not have the \Seen flag set.
- Since:
- 12.01.2010
- Author:
- Torsten Buchert
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALLANSWEREDBCCBEFOREBODYCCDELETEDDRAFTFLAGGEDFROMHEADERKEYWORDLARGERNEWNOTOLDONORRECENTSEENSENTBEFORESENTONSENTSINCESEQUENCE_SET<sequence set> - Messages with message sequence numbers corresponding to the specified message sequence number set.SINCESMALLERSUBJECTTEXTTOUIDUNANSWEREDUNDELETEDUNDRAFTUNFLAGGEDUNKEYWORDUNSEEN
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.icegreen.greenmail.imap.commands.SearchCommandParser.DataFormatsgetArgDataFormat()intgetNumberOfParameters()booleanisCharsetAware()booleanisOperator()static SearchKeyvalueOf(String name)Returns the enum constant of this type with the specified name.static SearchKey[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALL
public static final SearchKey ALL
-
ANSWERED
public static final SearchKey ANSWERED
-
BCC
public static final SearchKey BCC
-
BODY
public static final SearchKey BODY
-
CC
public static final SearchKey CC
-
DELETED
public static final SearchKey DELETED
-
DRAFT
public static final SearchKey DRAFT
-
FLAGGED
public static final SearchKey FLAGGED
-
FROM
public static final SearchKey FROM
-
HEADER
public static final SearchKey HEADER
-
KEYWORD
public static final SearchKey KEYWORD
-
NEW
public static final SearchKey NEW
-
NOT
public static final SearchKey NOT
-
OLD
public static final SearchKey OLD
-
RECENT
public static final SearchKey RECENT
-
SEEN
public static final SearchKey SEEN
-
SUBJECT
public static final SearchKey SUBJECT
-
TO
public static final SearchKey TO
-
TEXT
public static final SearchKey TEXT
-
UID
public static final SearchKey UID
-
UNANSWERED
public static final SearchKey UNANSWERED
-
UNDELETED
public static final SearchKey UNDELETED
-
UNDRAFT
public static final SearchKey UNDRAFT
-
UNFLAGGED
public static final SearchKey UNFLAGGED
-
UNKEYWORD
public static final SearchKey UNKEYWORD
-
UNSEEN
public static final SearchKey UNSEEN
-
SEQUENCE_SET
public static final SearchKey SEQUENCE_SET
<sequence set> - Messages with message sequence numbers corresponding to the specified message sequence number set.
-
OR
public static final SearchKey OR
-
SINCE
public static final SearchKey SINCE
-
ON
public static final SearchKey ON
-
BEFORE
public static final SearchKey BEFORE
-
SENTSINCE
public static final SearchKey SENTSINCE
-
SENTON
public static final SearchKey SENTON
-
SENTBEFORE
public static final SearchKey SENTBEFORE
-
LARGER
public static final SearchKey LARGER
-
SMALLER
public static final SearchKey SMALLER
-
-
Method Detail
-
values
public static SearchKey[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SearchKey c : SearchKey.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SearchKey valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getNumberOfParameters
public int getNumberOfParameters()
-
isOperator
public boolean isOperator()
-
isCharsetAware
public boolean isCharsetAware()
-
getArgDataFormat
public com.icegreen.greenmail.imap.commands.SearchCommandParser.DataFormats getArgDataFormat()
-
-