com.openexchange.mail.api
Enum MailConfig.LoginSource

java.lang.Object
  extended by java.lang.Enum<MailConfig.LoginSource>
      extended by com.openexchange.mail.api.MailConfig.LoginSource
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MailConfig.LoginSource>
Enclosing class:
MailConfig

public static enum MailConfig.LoginSource
extends java.lang.Enum<MailConfig.LoginSource>


Enum Constant Summary
PRIMARY_EMAIL
          Login is taken from user.mail kept in storage; e.g.
USER_IMAPLOGIN
          Login is taken from user.imapLogin kept in storage; e.g.
USER_NAME
          Login is user's name; e.g.
 
Method Summary
static MailConfig.LoginSource parse(java.lang.String loginSourceStr)
          Parses specified string into a login source.
 java.lang.String toString()
           
static MailConfig.LoginSource valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MailConfig.LoginSource[] 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

PRIMARY_EMAIL

public static final MailConfig.LoginSource PRIMARY_EMAIL
Login is taken from user.mail kept in storage; e.g. test@foo.bar


USER_IMAPLOGIN

public static final MailConfig.LoginSource USER_IMAPLOGIN
Login is taken from user.imapLogin kept in storage; e.g. test


USER_NAME

public static final MailConfig.LoginSource USER_NAME
Login is user's name; e.g. test

Method Detail

values

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

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

valueOf

public static MailConfig.LoginSource 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

parse

public static final MailConfig.LoginSource parse(java.lang.String loginSourceStr)
Parses specified string into a login source.

Parameters:
loginSourceStr - The string to parse to a login source
Returns:
An appropriate login source or null if string could not be parsed to a login source

toString

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