com.openexchange.messaging
Enum MessagingField

java.lang.Object
  extended by java.lang.Enum<MessagingField>
      extended by com.openexchange.messaging.MessagingField
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MessagingField>

public enum MessagingField
extends java.lang.Enum<MessagingField>

MessagingField

Since:
Open-Xchange v6.16
Author:
Francisco Laguna, Thorben Betten

Enum Constant Summary
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 message ID
[low cost]
PICTURE
          Picture url
[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]
URL
          URL
[low cost]
 
Field Summary
static MessagingField[] FIELDS_LOW_COST
          All low cost fields
static MessagingField[] FIELDS_WO_BODY
          All fields except BODY and FULL
 
Method Summary
 java.lang.Object doSwitch(MessagingMessageSwitcher switcher, java.lang.Object... args)
           
 MessagingHeader.KnownHeader getEquivalentHeader()
          Maps a MessagingField to a MessagingHeader
static MessagingField getField(java.lang.String name)
          Maps specified name to a field.
static MessagingField[] getFields(java.lang.String[] names)
          Creates an array of MessagingField corresponding to given names.
static void initHeaders()
           
 java.lang.String toString()
           
static MessagingField valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MessagingField[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ID

public static final MessagingField ID
The implementation-specific unique message ID
[low cost]


FOLDER_ID

public static final MessagingField FOLDER_ID
The folder ID or fullname
[low cost]


CONTENT_TYPE

public static final MessagingField CONTENT_TYPE
The Content-Type; includes whether message contains attachments or not
[low cost]


FROM

public static final MessagingField FROM
From
[low cost]


TO

public static final MessagingField TO
To
[low cost]


CC

public static final MessagingField CC
Cc
[low cost]


BCC

public static final MessagingField BCC
Bcc
[low cost]


SUBJECT

public static final MessagingField SUBJECT
Subject
[low cost]


SIZE

public static final MessagingField SIZE
Size
[low cost]


SENT_DATE

public static final MessagingField SENT_DATE
Sent date corresponds to Date header
[low cost]


RECEIVED_DATE

public static final MessagingField RECEIVED_DATE
Received date represent the internal mail server's timestamp on arrival
[low cost]


FLAGS

public static final MessagingField FLAGS
Flags
[low cost]


THREAD_LEVEL

public static final MessagingField THREAD_LEVEL
Thread level
[low cost]


DISPOSITION_NOTIFICATION_TO

public static final MessagingField DISPOSITION_NOTIFICATION_TO
Email address in Disposition-Notification-To header
[low cost]


PRIORITY

public static final MessagingField PRIORITY
Integer value of X-Priority header
[low cost]


COLOR_LABEL

public static final MessagingField COLOR_LABEL
Color Label
[low cost]


ACCOUNT_NAME

public static final MessagingField ACCOUNT_NAME
Account name
[low cost]


PICTURE

public static final MessagingField PICTURE
Picture url
[low cost]


BODY

public static final MessagingField BODY
To peek the mail body (\Seen flag is left unchanged)
[high cost]


HEADERS

public static final MessagingField HEADERS
To fetch all message headers
[high cost]


FULL

public static final MessagingField FULL
To fully pre-fill mail incl. headers and peeked body (\Seen flag is left unchanged)
[high cost]


URL

public static final MessagingField URL
URL
[low cost]

Field Detail

FIELDS_LOW_COST

public static final MessagingField[] FIELDS_LOW_COST
All low cost fields


FIELDS_WO_BODY

public static final MessagingField[] FIELDS_WO_BODY
All fields except BODY and FULL

Method Detail

values

public static final MessagingField[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(MessagingField c : MessagingField.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static MessagingField 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 name

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<MessagingField>

getFields

public static final MessagingField[] getFields(java.lang.String[] names)
Creates an array of MessagingField corresponding to given names.

This is just a convenience method that invokes getField(String) for every name.

Parameters:
names - The names
Returns:
The array of MessagingField corresponding to given names
See Also:
getField(String)

getField

public static MessagingField getField(java.lang.String name)
Maps specified name to a field.

Parameters:
name - The field name
Returns:
The mapped MessagingField or null if no corresponding mail field could be found

doSwitch

public java.lang.Object doSwitch(MessagingMessageSwitcher switcher,
                                 java.lang.Object... args)
                          throws MessagingException
Throws:
MessagingException

getEquivalentHeader

public MessagingHeader.KnownHeader getEquivalentHeader()
Maps a MessagingField to a MessagingHeader

Returns:
the MessagingHeader this field is associated with

initHeaders

public static void initHeaders()