public enum MailField extends java.lang.Enum<MailField>
MailField
- An enumeration of mail fields to define which fields to prefill.Enum Constant and Description |
---|
ACCOUNT_NAME
Account name
[low cost] |
BCC
Bcc
[low cost] |
BODY
To peek the mail body (\Seen flag is left unchanged)
[high cost] |
CC
Cc
[low cost] |
COLOR_LABEL
Color Label
[low cost] |
CONTENT_TYPE
The Content-Type; includes whether message contains attachments or not
[low cost] |
DISPOSITION_NOTIFICATION_TO
Email address in
Disposition-Notification-To header[low cost] |
FLAGS
Flags
[low cost] |
FOLDER_ID
The folder ID or fullname
[low cost] |
FROM
From
[low cost] |
FULL
To fully pre-fill mail incl. headers and peeked body (\Seen flag is left unchanged)
[high cost] |
HEADERS
To fetch all message headers
[high cost] |
ID
The implementation-specific unique mail ID
[low cost] |
PRIORITY
Integer value of
X-Priority header[low cost] |
RECEIVED_DATE
Received date represent the internal mail server's timestamp on arrival
[low cost] |
SENT_DATE
Sent date corresponds to
Date header[low cost] |
SIZE
Size
[low cost] |
SUBJECT
Subject
[low cost] |
THREAD_LEVEL
Thread level
[low cost] |
TO
To
[low cost] |
Modifier and Type | Field and Description |
---|---|
static MailField[] |
FIELDS_LOW_COST
All low cost fields.
|
static MailField[] |
FIELDS_WO_BODY
|
Modifier and Type | Method and Description |
---|---|
static MailField |
getField(int field)
Maps specified
int value to a mail field. |
static MailField[] |
getFields(int[] fields)
Creates an array of
MailField corresponding to given int values. |
MailListField |
getListField()
Gets the corresponding instance of
MailListField or null if none exists. |
static java.util.Set<MailField> |
getMailFieldsFromSearchTerm(SearchTerm<?> searchTerm)
Gets the mail fields addressed by given search term
|
static MailField |
toField(MailListField listField)
Gets the corresponding instance of
MailField for specified instance of MailListField . |
static MailField[] |
toFields(MailListField[] listFields)
Gets the corresponding instances of
MailField for specified instances of MailListField . |
static MailListField[] |
toListFields(java.util.Collection<MailField> fields)
Gets the corresponding instances of
MailListField for specified collection of MailField . |
static MailListField[] |
toListFields(MailField[] fields)
Gets the corresponding instances of
MailListField for specified instances of MailField . |
static MailField |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static MailField[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MailField ID
public static final MailField FOLDER_ID
public static final MailField CONTENT_TYPE
public static final MailField FROM
public static final MailField TO
public static final MailField CC
public static final MailField BCC
public static final MailField SUBJECT
public static final MailField SIZE
public static final MailField SENT_DATE
Date
headerpublic static final MailField RECEIVED_DATE
public static final MailField FLAGS
public static final MailField THREAD_LEVEL
public static final MailField DISPOSITION_NOTIFICATION_TO
Disposition-Notification-To
headerpublic static final MailField PRIORITY
X-Priority
headerpublic static final MailField COLOR_LABEL
public static final MailField ACCOUNT_NAME
public static final MailField BODY
public static final MailField HEADERS
public static final MailField FULL
public static final MailField[] FIELDS_LOW_COST
ID, FOLDER_ID, CONTENT_TYPE, FROM, TO, CC, BCC, SUBJECT, SIZE, SENT_DATE, RECEIVED_DATE, FLAGS, THREAD_LEVEL, DISPOSITION_NOTIFICATION_TO, PRIORITY, COLOR_LABEL
public static final MailField[] FIELDS_WO_BODY
public static MailField[] values()
for (MailField c : MailField.values()) System.out.println(c);
public static MailField valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is nullpublic MailListField getListField()
MailListField
or null
if none exists.MailListField
or null
if none exists.public static final MailListField[] toListFields(MailField[] fields)
MailListField
for specified instances of MailField
.
Those mail fields which have no corresponding list field are omitted.
fields
- The instances of MailField
MailListField
public static final MailListField[] toListFields(java.util.Collection<MailField> fields)
MailListField
for specified collection of MailField
.
Those mail fields which have no corresponding list field are omitted.
fields
- The collection of MailField
MailListField
public static final MailField[] toFields(MailListField[] listFields)
MailField
for specified instances of MailListField
.listFields
- The instances of MailListField
MailField
public static final MailField toField(MailListField listField)
MailField
for specified instance of MailListField
.listField
- The instance of MailListField
MailField
public static final MailField[] getFields(int[] fields)
MailField
corresponding to given int
values.
This is just a convenience method that invokes getField(int)
for every int
value.
fields
- The int
valuesMailField
corresponding to given int
valuesgetField(int)
public static MailField getField(int field)
int
value to a mail field. A negative int
value is mapped to BODY
.
Mail fields which do not hold a corresponding list field are not mappable to an int
value; in consequence they are
ignored
field
- The int
valueMailField
or null
if no corresponding mail field could be foundpublic static java.util.Set<MailField> getMailFieldsFromSearchTerm(SearchTerm<?> searchTerm)
searchTerm
- The search term