com.openexchange.mail
Enum MailListField

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

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

MailListField - An enumeration of mail list fields as defined in HTTP API's mail section

Author:
Thorben Betten, Tobias Prinz

Enum Constant Summary
ACCOUNT_NAME
          Account name
ATTACHMENT
          Whether message contains attachments
BCC
          Bcc
CC
          Cc
COLOR_LABEL
          Color Label
DELETED
          Deleted count
DISPOSITION_NOTIFICATION_TO
          Disposition-Notification-To
FLAG_SEEN
          Flag \SEEN
FLAGS
          Flags
FOLDER
          Folder
FOLDER_ID
          The folder ID
FROM
          From
ID
          The mail ID
MSG_REF
          Message reference
NEW
          New count
PRIORITY
          Priority
RECEIVED_DATE
          Received date
SENT_DATE
          Sent date
SIZE
          Size
SUBJECT
          Subject
THREAD_LEVEL
          Thread level
TO
          To
TOTAL
          Total count
UNREAD
          Unread count
 
Method Summary
static int[] getAllFields()
          Returns all field values as an array of integers.
static MailListField getBy(java.lang.String jsonName)
          Gets a field by the JSON name
 int getField()
           
static MailListField getField(int field)
          Determines the corresponding MailListField constant to given int value
static MailListField[] getFields(int[] fields)
          Creates an array of MailListField corresponding to given int values
 java.lang.String getKey()
           
static MailListField valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MailListField[] 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, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ID

public static final MailListField ID
The mail ID


FOLDER_ID

public static final MailListField FOLDER_ID
The folder ID


ATTACHMENT

public static final MailListField ATTACHMENT
Whether message contains attachments


FROM

public static final MailListField FROM
From


TO

public static final MailListField TO
To


CC

public static final MailListField CC
Cc


BCC

public static final MailListField BCC
Bcc


SUBJECT

public static final MailListField SUBJECT
Subject


SIZE

public static final MailListField SIZE
Size


SENT_DATE

public static final MailListField SENT_DATE
Sent date


RECEIVED_DATE

public static final MailListField RECEIVED_DATE
Received date


FLAGS

public static final MailListField FLAGS
Flags


THREAD_LEVEL

public static final MailListField THREAD_LEVEL
Thread level


DISPOSITION_NOTIFICATION_TO

public static final MailListField DISPOSITION_NOTIFICATION_TO
Disposition-Notification-To


PRIORITY

public static final MailListField PRIORITY
Priority


MSG_REF

public static final MailListField MSG_REF
Message reference


COLOR_LABEL

public static final MailListField COLOR_LABEL
Color Label


FOLDER

public static final MailListField FOLDER
Folder


FLAG_SEEN

public static final MailListField FLAG_SEEN
Flag \SEEN


TOTAL

public static final MailListField TOTAL
Total count


NEW

public static final MailListField NEW
New count


UNREAD

public static final MailListField UNREAD
Unread count


DELETED

public static final MailListField DELETED
Deleted count


ACCOUNT_NAME

public static final MailListField ACCOUNT_NAME
Account name

Method Detail

values

public static final MailListField[] 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(MailListField c : MailListField.values())
        System.out.println(c);

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

valueOf

public static MailListField 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

getField

public int getField()
Returns:
The int field value

getKey

public java.lang.String getKey()
Returns:
The JSON key

getFields

public static final MailListField[] getFields(int[] fields)
Creates an array of MailListField corresponding to given int values

Parameters:
fields - The int values
Returns:
The array of MailListField corresponding to given int values

getField

public static final MailListField getField(int field)
Determines the corresponding MailListField constant to given int value

Parameters:
field - The int value
Returns:
The corresponding MailListField constant

getAllFields

public static final int[] getAllFields()
Returns all field values as an array of integers.

Returns:

getBy

public static final MailListField getBy(java.lang.String jsonName)
Gets a field by the JSON name

Parameters:
jsonName - identifier
Returns:
MailListField identified by jsonName, null if not found