Package org.apache.commons.net.imap
Enum IMAPClient.SEARCH_CRITERIA
- java.lang.Object
-
- java.lang.Enum<IMAPClient.SEARCH_CRITERIA>
-
- org.apache.commons.net.imap.IMAPClient.SEARCH_CRITERIA
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<IMAPClient.SEARCH_CRITERIA>
- Enclosing class:
- IMAPClient
public static enum IMAPClient.SEARCH_CRITERIA extends java.lang.Enum<IMAPClient.SEARCH_CRITERIA>
The search criteria defined in RFC 3501.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALLAll messages in the mailbox.ANSWEREDMessages with the \Answered flag set.BCCMessages that contain the specified string in the envelope structure's BCC field.BEFOREMessages whose internal date (disregarding time and timezone) is earlier than the specified date.BODYMessages that contain the specified string in the body of the message.CCMessages that contain the specified string in the envelope structure's CC field.DELETEDMessages with the \Deleted flag set.DRAFTMessages with the \Draft flag set.FLAGGEDMessages with the \Flagged flag set.FROMMessages that contain the specified string in the envelope structure's FROM field.HEADERMessages 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).KEYWORDMessages with the specified keyword flag set.LARGERMessages with an [RFC-2822] size larger than the specified number of octets.NEWMessages that have the \Recent flag set but not the \Seen flag.NOTMessages that do not match the specified search key.OLDMessages that do not have the \Recent flag set.ONMessages whose internal date (disregarding time and timezone) is within the specified date.ORMessages that match either search key.RECENTMessages that have the \Recent flag set.SEENMessages that have the \Seen flag set.SENTBEFOREMessages whose [RFC-2822] Date: header (disregarding time and timezone) is earlier than the specified date.SENTONMessages whose [RFC-2822] Date: header (disregarding time and timezone) is within the specified date.SENTSINCEMessages whose [RFC-2822] Date: header (disregarding time and timezone) is within or later than the specified date.SINCEMessages whose internal date (disregarding time and timezone) is within or later than the specified date.SMALLERMessages with an [RFC-2822] size smaller than the specified number of octets.SUBJECTMessages that contain the specified string in the envelope structure's SUBJECT field.TEXTMessages that contain the specified string in the header or body of the message.TOMessages that contain the specified string in the envelope structure's TO field.UIDMessages with unique identifiers corresponding to the specified unique identifier set.UNANSWEREDMessages that do not have the \Answered flag set.UNDELETEDMessages that do not have the \Deleted flag set.UNDRAFTMessages that do not have the \Draft flag set.UNFLAGGEDMessages that do not have the \Flagged flag set.UNKEYWORDMessages that do not have the specified keyword flag set.UNSEENMessages that do not have the \Seen flag set.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IMAPClient.SEARCH_CRITERIAvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static IMAPClient.SEARCH_CRITERIA[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALL
public static final IMAPClient.SEARCH_CRITERIA ALL
All messages in the mailbox.
-
ANSWERED
public static final IMAPClient.SEARCH_CRITERIA ANSWERED
Messages with the \Answered flag set.
-
BCC
public static final IMAPClient.SEARCH_CRITERIA BCC
Messages that contain the specified string in the envelope structure's BCC field.
-
BEFORE
public static final IMAPClient.SEARCH_CRITERIA BEFORE
Messages whose internal date (disregarding time and timezone) is earlier than the specified date.
-
BODY
public static final IMAPClient.SEARCH_CRITERIA BODY
Messages that contain the specified string in the body of the message.
-
CC
public static final IMAPClient.SEARCH_CRITERIA CC
Messages that contain the specified string in the envelope structure's CC field.
-
DELETED
public static final IMAPClient.SEARCH_CRITERIA DELETED
Messages with the \Deleted flag set.
-
DRAFT
public static final IMAPClient.SEARCH_CRITERIA DRAFT
Messages with the \Draft flag set.
-
FLAGGED
public static final IMAPClient.SEARCH_CRITERIA FLAGGED
Messages with the \Flagged flag set.
-
FROM
public static final IMAPClient.SEARCH_CRITERIA FROM
Messages that contain the specified string in the envelope structure's FROM field.
-
HEADER
public static final IMAPClient.SEARCH_CRITERIA HEADER
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
public static final IMAPClient.SEARCH_CRITERIA KEYWORD
Messages with the specified keyword flag set.
-
LARGER
public static final IMAPClient.SEARCH_CRITERIA LARGER
Messages with an [RFC-2822] size larger than the specified number of octets.
-
NEW
public static final IMAPClient.SEARCH_CRITERIA NEW
Messages that have the \Recent flag set but not the \Seen flag. This is functionally equivalent to "(RECENT UNSEEN)".
-
NOT
public static final IMAPClient.SEARCH_CRITERIA NOT
Messages that do not match the specified search key.
-
OLD
public static final IMAPClient.SEARCH_CRITERIA OLD
Messages that do not have the \Recent flag set. This is functionally equivalent to "NOT RECENT" (as opposed to "NOT NEW").
-
ON
public static final IMAPClient.SEARCH_CRITERIA ON
Messages whose internal date (disregarding time and timezone) is within the specified date.
-
OR
public static final IMAPClient.SEARCH_CRITERIA OR
Messages that match either search key.
-
RECENT
public static final IMAPClient.SEARCH_CRITERIA RECENT
Messages that have the \Recent flag set.
-
SEEN
public static final IMAPClient.SEARCH_CRITERIA SEEN
Messages that have the \Seen flag set.
-
SENTBEFORE
public static final IMAPClient.SEARCH_CRITERIA SENTBEFORE
Messages whose [RFC-2822] Date: header (disregarding time and timezone) is earlier than the specified date.
-
SENTON
public static final IMAPClient.SEARCH_CRITERIA SENTON
Messages whose [RFC-2822] Date: header (disregarding time and timezone) is within the specified date.
-
SENTSINCE
public static final IMAPClient.SEARCH_CRITERIA SENTSINCE
Messages whose [RFC-2822] Date: header (disregarding time and timezone) is within or later than the specified date.
-
SINCE
public static final IMAPClient.SEARCH_CRITERIA SINCE
Messages whose internal date (disregarding time and timezone) is within or later than the specified date.
-
SMALLER
public static final IMAPClient.SEARCH_CRITERIA SMALLER
Messages with an [RFC-2822] size smaller than the specified number of octets.
-
SUBJECT
public static final IMAPClient.SEARCH_CRITERIA SUBJECT
Messages that contain the specified string in the envelope structure's SUBJECT field.
-
TEXT
public static final IMAPClient.SEARCH_CRITERIA TEXT
Messages that contain the specified string in the header or body of the message.
-
TO
public static final IMAPClient.SEARCH_CRITERIA TO
Messages that contain the specified string in the envelope structure's TO field.
-
UID
public static final IMAPClient.SEARCH_CRITERIA UID
Messages with unique identifiers corresponding to the specified unique identifier set. Sequence set ranges are permitted.
-
UNANSWERED
public static final IMAPClient.SEARCH_CRITERIA UNANSWERED
Messages that do not have the \Answered flag set.
-
UNDELETED
public static final IMAPClient.SEARCH_CRITERIA UNDELETED
Messages that do not have the \Deleted flag set.
-
UNDRAFT
public static final IMAPClient.SEARCH_CRITERIA UNDRAFT
Messages that do not have the \Draft flag set.
-
UNFLAGGED
public static final IMAPClient.SEARCH_CRITERIA UNFLAGGED
Messages that do not have the \Flagged flag set.
-
UNKEYWORD
public static final IMAPClient.SEARCH_CRITERIA UNKEYWORD
Messages that do not have the specified keyword flag set.
-
UNSEEN
public static final IMAPClient.SEARCH_CRITERIA UNSEEN
Messages that do not have the \Seen flag set.
-
-
Method Detail
-
values
public static IMAPClient.SEARCH_CRITERIA[] 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 (IMAPClient.SEARCH_CRITERIA c : IMAPClient.SEARCH_CRITERIA.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IMAPClient.SEARCH_CRITERIA valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-