org.apache.hupa.server.utils
Enum ConfigurationProperties

java.lang.Object
  extended by java.lang.Enum<ConfigurationProperties>
      extended by org.apache.hupa.server.utils.ConfigurationProperties
All Implemented Interfaces:
Serializable, Comparable<ConfigurationProperties>

public enum ConfigurationProperties
extends Enum<ConfigurationProperties>

Enumeration of valid configuration properties


Enum Constant Summary
DEFAULT_DRAFTS_FOLDER
           
DEFAULT_INBOX_FOLDER
           
DEFAULT_SENT_FOLDER
           
DEFAULT_TRASH_FOLDER
           
IMAP_CONNECTION_POOL_SIZE
           
IMAP_CONNECTION_POOL_TIMEOUT
           
IMAP_SERVER_ADDRESS
           
IMAP_SERVER_PORT
           
IMAPS
           
PASSWORD
           
POST_FETCH_MESSAGE_COUNT
           
SESSION_DEBUG
           
SMTP_AUTH
           
SMTP_SERVER_ADDRESS
           
SMTP_SERVER_PORT
           
SMTPS
           
TRUST_STORE
           
TRUST_STORE_PASSWORD
           
USERNAME
           
 
Method Summary
 String getProperty()
          Return the name of property.
 String getPropValue()
          Return the value of the property.
 boolean isMandatory()
          Return if property is mandatory
static Properties loadProperties(String name)
          Loads and validate a properties file.
static ConfigurationProperties lookup(String property)
          Return a ConfigurationProperties enumeration that matches the passed command.
static void validateProperties(Properties properties)
          Test for mandatory properties, complete with default values when missing, and avoid unknown properties.
static ConfigurationProperties valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ConfigurationProperties[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

IMAP_SERVER_ADDRESS

public static final ConfigurationProperties IMAP_SERVER_ADDRESS

SMTP_SERVER_ADDRESS

public static final ConfigurationProperties SMTP_SERVER_ADDRESS

IMAP_SERVER_PORT

public static final ConfigurationProperties IMAP_SERVER_PORT

SMTP_SERVER_PORT

public static final ConfigurationProperties SMTP_SERVER_PORT

IMAP_CONNECTION_POOL_SIZE

public static final ConfigurationProperties IMAP_CONNECTION_POOL_SIZE

IMAP_CONNECTION_POOL_TIMEOUT

public static final ConfigurationProperties IMAP_CONNECTION_POOL_TIMEOUT

IMAPS

public static final ConfigurationProperties IMAPS

TRUST_STORE

public static final ConfigurationProperties TRUST_STORE

TRUST_STORE_PASSWORD

public static final ConfigurationProperties TRUST_STORE_PASSWORD

DEFAULT_SENT_FOLDER

public static final ConfigurationProperties DEFAULT_SENT_FOLDER

DEFAULT_TRASH_FOLDER

public static final ConfigurationProperties DEFAULT_TRASH_FOLDER

DEFAULT_DRAFTS_FOLDER

public static final ConfigurationProperties DEFAULT_DRAFTS_FOLDER

DEFAULT_INBOX_FOLDER

public static final ConfigurationProperties DEFAULT_INBOX_FOLDER

POST_FETCH_MESSAGE_COUNT

public static final ConfigurationProperties POST_FETCH_MESSAGE_COUNT

SESSION_DEBUG

public static final ConfigurationProperties SESSION_DEBUG

SMTP_AUTH

public static final ConfigurationProperties SMTP_AUTH

SMTPS

public static final ConfigurationProperties SMTPS

USERNAME

public static final ConfigurationProperties USERNAME

PASSWORD

public static final ConfigurationProperties PASSWORD
Method Detail

values

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

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

valueOf

public static ConfigurationProperties valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

lookup

public static ConfigurationProperties lookup(String property)
Return a ConfigurationProperties enumeration that matches the passed command.

Parameters:
property - The property to use for lookup.
Returns:
the ConfigurationProperties enumeration that matches the passed property, or null if not found.

getProperty

public String getProperty()
Return the name of property.

Returns:
the name of property.

isMandatory

public boolean isMandatory()
Return if property is mandatory

Returns:
true if mandatory else false.

getPropValue

public String getPropValue()
Return the value of the property.

Returns:
the value of the property.

validateProperties

public static void validateProperties(Properties properties)
Test for mandatory properties, complete with default values when missing, and avoid unknown properties.


loadProperties

public static Properties loadProperties(String name)
Loads and validate a properties file.

Parameters:
configDir -
name -
Returns:


Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.