org.mailster.gui.prefs
Class ConfigurationManager

java.lang.Object
  extended by org.mailster.gui.prefs.ConfigurationManager

public class ConfigurationManager
extends java.lang.Object

Manages and organizes the entire application configuration. The class itself only holds the keys to access the configuration values from the internal data structure in shape of the CONFIG_STORE.

Author:
Sebastian Machhausen, Edouard De Oliveira

Field Summary
static java.lang.String APPLICATION_BUGTRACKER_HOMEPAGE
          The url of the application bug tracker
static java.lang.String APPLICATION_FEATURE_REQUEST_HOMEPAGE
          The url of the application feature request tracker
static java.lang.String APPLICATION_FORUM_HOMEPAGE
          The url of the application forum
static java.lang.String APPLY_MAIN_WINDOW_PARAMS_KEY
          The flag to decide whether to restore main window size, location and dividers positions at startup.
static java.lang.String ASK_ON_REMOVE_MAIL_KEY
          The flag to decide whether to ask if a Mail should be really deleted by the help of an user dialog.
static java.lang.String AUTH_SSL_CLIENT_KEY
          true if SSL clients authentication is required
static java.lang.String AUTHOR_EMAIL
          The author email
static java.lang.String AUTO_HIDE_NOTIFICATIONS_KEY
          true to automatically hide tray notifications.
static MailsterPrefStore CONFIG_STORE
          The ConfigurationStore used to administrate the persistent configuration settings.
static java.lang.String CONFIGURATION_FILENAME
          The application configuration filename
static java.lang.String CRYPTO_STRENGTH_KEY
          The crypto strength of the automatically generated certificates.
static java.lang.String DEFAULT_ENCLOSURES_DIRECTORY_KEY
          The default directory to store enclosures to
static java.lang.String ENCLOSURES_OPTIONS_KEY
          Key to access the attachments options
static java.lang.String EXECUTE_ENCLOSURE_ON_CLICK_KEY
          true to automatically execute an enclosure in its associated application.
static java.lang.String FILTER_VIEW_RATIO_KEY
          The key to access the output view divider ratio
static java.lang.String GENERAL_OPTIONS_KEY
          The key to access the general options
static java.lang.String LANGUAGE_KEY
          The language setting as iso2 code which determines the language of the user interface.
static java.lang.String LANGUAGE_OPTIONS_KEY
          The key to access the language options
static java.lang.String MAIL_QUEUE_REFRESH_INTERVAL_KEY
          The default mail queue refresh interval.
static java.lang.String MAILSTER_COPYRIGHT
          Application copyright
static java.lang.String MAILSTER_DOWNLOAD_PAGE
          Application download page
static java.lang.String MAILSTER_HOMEPAGE
          Application homepage
static java.lang.String MAILSTER_VERSION
          Application version string
static java.lang.String MAILSTER_VERSION_CHECK_URL
          The url to use when checking if version is up to date.
static java.lang.String MAILSTER_VERSION_CODENAME
          Application version codename string
static java.lang.String MAILSTER_VERSION_NB
          Application version number
static java.lang.String NOTIFY_ON_NEW_MESSAGES_RECEIVED_KEY
          true to notify when new messages were received.
static java.lang.String POP3_ALLOW_APOP_AUTH_METHOD_KEY
          true if APOP authentication mechanism is allowed.
static java.lang.String POP3_CONNECTION_TIMEOUT_KEY
          Specifies the timeout (in milliseconds) to establish the connection to the host for the POP3 server.
static java.lang.String POP3_MAX_CONNECTIONS_KEY
          The POP3 maximum of parallel connections
static java.lang.String POP3_OPTIONS_KEY
          The key to access the pop3 options
static java.lang.String POP3_PASSWORD_KEY
          The POP3 mailboxes password
static java.lang.String POP3_PORT_KEY
          The POP3 server port
static java.lang.String POP3_REQUIRE_SECURE_AUTH_METHOD_KEY
          true if only secured authentication mechanisms are allowed.
static java.lang.String POP3_SERVER_KEY
          The POP3 server host/address
static java.lang.String POP3_SPECIAL_ACCOUNT_KEY
          The POP3 special account name
static java.lang.String PREFERRED_BROWSER_KEY
          The preferred browser.
static java.lang.String PREFERRED_CONTENT_TYPE_KEY
          The preferred content type for email viewing.
static java.lang.String PREFERRED_SSL_PROTOCOL_KEY
          The SSL protocol in use
static java.lang.String PROTOCOLS_OPTIONS_KEY
          Key to access the protocols options
static java.lang.String SEND_TO_TRAY_ON_CLOSE_KEY
          true to send to system tray if the MainApplicationWindow is closed.
static java.lang.String SEND_TO_TRAY_ON_MINIMIZE_KEY
          true to send to system tray if the MainApplicationWindow is minimized.
static java.lang.String SEND_TO_TRAY_ON_SERVER_START_KEY
          true to send to tray if the application starts up.
static java.lang.String SMTP_CONNECTION_TIMEOUT_KEY
          Specifies the timeout (in milliseconds) to establish the connection to the host for the SMTP server.
static java.lang.String SMTP_MAX_CONNECTIONS_KEY
          The SMTP maximum of parallel connections
static java.lang.String SMTP_OPTIONS_KEY
          The key to access the smtp options
static java.lang.String SMTP_PORT_KEY
          The SMTP server port
static java.lang.String SMTP_SERVER_KEY
          The SMTP server host/address
static java.lang.String START_POP3_ON_SMTP_START_KEY
          true if POP3 service should start on SMTP start up
static java.lang.String START_SMTP_ON_STARTUP_KEY
          Key to access the protocols options
static java.lang.String TABLE_VIEW_RATIO_KEY
          The key to access the main view divider ratio
static java.lang.String TRAY_OPTIONS_KEY
          Key to access the tray options
static java.lang.String WINDOW_HEIGHT_KEY
          The window height setting
static java.lang.String WINDOW_WIDTH_KEY
          The window width setting
static java.lang.String WINDOW_X_KEY
          The window x coordinate setting
static java.lang.String WINDOW_Y_KEY
          The window y coordinate setting
 
Constructor Summary
private ConfigurationManager()
          Private constructor to prevent direct instantiation.
 
Method Summary
private static void verifyDirectorySetting(java.lang.String key)
          Verifies if the directory denoted by the given key exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIGURATION_FILENAME

public static final java.lang.String CONFIGURATION_FILENAME
The application configuration filename

See Also:
Constant Field Values

CONFIG_STORE

public static final MailsterPrefStore CONFIG_STORE
The ConfigurationStore used to administrate the persistent configuration settings.


MAILSTER_VERSION_NB

public static final java.lang.String MAILSTER_VERSION_NB
Application version number

See Also:
Constant Field Values

MAILSTER_VERSION_CODENAME

public static final java.lang.String MAILSTER_VERSION_CODENAME
Application version codename string

See Also:
Constant Field Values

MAILSTER_VERSION

public static final java.lang.String MAILSTER_VERSION
Application version string

See Also:
Constant Field Values

MAILSTER_VERSION_CHECK_URL

public static final java.lang.String MAILSTER_VERSION_CHECK_URL
The url to use when checking if version is up to date.

See Also:
Constant Field Values

MAILSTER_HOMEPAGE

public static final java.lang.String MAILSTER_HOMEPAGE
Application homepage

See Also:
Constant Field Values

MAILSTER_DOWNLOAD_PAGE

public static final java.lang.String MAILSTER_DOWNLOAD_PAGE
Application download page

See Also:
Constant Field Values

MAILSTER_COPYRIGHT

public static final java.lang.String MAILSTER_COPYRIGHT
Application copyright

See Also:
Constant Field Values

APPLICATION_FORUM_HOMEPAGE

public static final java.lang.String APPLICATION_FORUM_HOMEPAGE
The url of the application forum

See Also:
Constant Field Values

APPLICATION_BUGTRACKER_HOMEPAGE

public static final java.lang.String APPLICATION_BUGTRACKER_HOMEPAGE
The url of the application bug tracker

See Also:
Constant Field Values

APPLICATION_FEATURE_REQUEST_HOMEPAGE

public static final java.lang.String APPLICATION_FEATURE_REQUEST_HOMEPAGE
The url of the application feature request tracker

See Also:
Constant Field Values

AUTHOR_EMAIL

public static final java.lang.String AUTHOR_EMAIL
The author email

See Also:
Constant Field Values

WINDOW_X_KEY

public static final java.lang.String WINDOW_X_KEY
The window x coordinate setting

See Also:
Constant Field Values

WINDOW_Y_KEY

public static final java.lang.String WINDOW_Y_KEY
The window y coordinate setting

See Also:
Constant Field Values

WINDOW_WIDTH_KEY

public static final java.lang.String WINDOW_WIDTH_KEY
The window width setting

See Also:
Constant Field Values

WINDOW_HEIGHT_KEY

public static final java.lang.String WINDOW_HEIGHT_KEY
The window height setting

See Also:
Constant Field Values

FILTER_VIEW_RATIO_KEY

public static final java.lang.String FILTER_VIEW_RATIO_KEY
The key to access the output view divider ratio

See Also:
Constant Field Values

TABLE_VIEW_RATIO_KEY

public static final java.lang.String TABLE_VIEW_RATIO_KEY
The key to access the main view divider ratio

See Also:
Constant Field Values

GENERAL_OPTIONS_KEY

public static final java.lang.String GENERAL_OPTIONS_KEY
The key to access the general options

See Also:
Constant Field Values

ASK_ON_REMOVE_MAIL_KEY

public static final java.lang.String ASK_ON_REMOVE_MAIL_KEY
The flag to decide whether to ask if a Mail should be really deleted by the help of an user dialog.

See Also:
Constant Field Values

APPLY_MAIN_WINDOW_PARAMS_KEY

public static final java.lang.String APPLY_MAIN_WINDOW_PARAMS_KEY
The flag to decide whether to restore main window size, location and dividers positions at startup.

See Also:
Constant Field Values

PREFERRED_BROWSER_KEY

public static final java.lang.String PREFERRED_BROWSER_KEY
The preferred browser.

See Also:
Constant Field Values

PREFERRED_CONTENT_TYPE_KEY

public static final java.lang.String PREFERRED_CONTENT_TYPE_KEY
The preferred content type for email viewing.

See Also:
Constant Field Values

MAIL_QUEUE_REFRESH_INTERVAL_KEY

public static final java.lang.String MAIL_QUEUE_REFRESH_INTERVAL_KEY
The default mail queue refresh interval.

See Also:
Constant Field Values

LANGUAGE_OPTIONS_KEY

public static final java.lang.String LANGUAGE_OPTIONS_KEY
The key to access the language options

See Also:
Constant Field Values

LANGUAGE_KEY

public static final java.lang.String LANGUAGE_KEY
The language setting as iso2 code which determines the language of the user interface.

See Also:
Constant Field Values

PROTOCOLS_OPTIONS_KEY

public static final java.lang.String PROTOCOLS_OPTIONS_KEY
Key to access the protocols options

See Also:
Constant Field Values

START_SMTP_ON_STARTUP_KEY

public static final java.lang.String START_SMTP_ON_STARTUP_KEY
Key to access the protocols options

See Also:
Constant Field Values

START_POP3_ON_SMTP_START_KEY

public static final java.lang.String START_POP3_ON_SMTP_START_KEY
true if POP3 service should start on SMTP start up

See Also:
Constant Field Values

AUTH_SSL_CLIENT_KEY

public static final java.lang.String AUTH_SSL_CLIENT_KEY
true if SSL clients authentication is required

See Also:
Constant Field Values

PREFERRED_SSL_PROTOCOL_KEY

public static final java.lang.String PREFERRED_SSL_PROTOCOL_KEY
The SSL protocol in use

See Also:
Constant Field Values

CRYPTO_STRENGTH_KEY

public static final java.lang.String CRYPTO_STRENGTH_KEY
The crypto strength of the automatically generated certificates.

See Also:
Constant Field Values

POP3_OPTIONS_KEY

public static final java.lang.String POP3_OPTIONS_KEY
The key to access the pop3 options

See Also:
Constant Field Values

POP3_SERVER_KEY

public static final java.lang.String POP3_SERVER_KEY
The POP3 server host/address

See Also:
Constant Field Values

POP3_PORT_KEY

public static final java.lang.String POP3_PORT_KEY
The POP3 server port

See Also:
Constant Field Values

POP3_SPECIAL_ACCOUNT_KEY

public static final java.lang.String POP3_SPECIAL_ACCOUNT_KEY
The POP3 special account name

See Also:
Constant Field Values

POP3_PASSWORD_KEY

public static final java.lang.String POP3_PASSWORD_KEY
The POP3 mailboxes password

See Also:
Constant Field Values

POP3_MAX_CONNECTIONS_KEY

public static final java.lang.String POP3_MAX_CONNECTIONS_KEY
The POP3 maximum of parallel connections

See Also:
Constant Field Values

POP3_CONNECTION_TIMEOUT_KEY

public static final java.lang.String POP3_CONNECTION_TIMEOUT_KEY
Specifies the timeout (in milliseconds) to establish the connection to the host for the POP3 server.

See Also:
Constant Field Values

POP3_REQUIRE_SECURE_AUTH_METHOD_KEY

public static final java.lang.String POP3_REQUIRE_SECURE_AUTH_METHOD_KEY
true if only secured authentication mechanisms are allowed.

See Also:
Constant Field Values

POP3_ALLOW_APOP_AUTH_METHOD_KEY

public static final java.lang.String POP3_ALLOW_APOP_AUTH_METHOD_KEY
true if APOP authentication mechanism is allowed.

See Also:
Constant Field Values

SMTP_OPTIONS_KEY

public static final java.lang.String SMTP_OPTIONS_KEY
The key to access the smtp options

See Also:
Constant Field Values

SMTP_SERVER_KEY

public static final java.lang.String SMTP_SERVER_KEY
The SMTP server host/address

See Also:
Constant Field Values

SMTP_PORT_KEY

public static final java.lang.String SMTP_PORT_KEY
The SMTP server port

See Also:
Constant Field Values

SMTP_MAX_CONNECTIONS_KEY

public static final java.lang.String SMTP_MAX_CONNECTIONS_KEY
The SMTP maximum of parallel connections

See Also:
Constant Field Values

SMTP_CONNECTION_TIMEOUT_KEY

public static final java.lang.String SMTP_CONNECTION_TIMEOUT_KEY
Specifies the timeout (in milliseconds) to establish the connection to the host for the SMTP server.

See Also:
Constant Field Values

ENCLOSURES_OPTIONS_KEY

public static final java.lang.String ENCLOSURES_OPTIONS_KEY
Key to access the attachments options

See Also:
Constant Field Values

DEFAULT_ENCLOSURES_DIRECTORY_KEY

public static final java.lang.String DEFAULT_ENCLOSURES_DIRECTORY_KEY
The default directory to store enclosures to

See Also:
Constant Field Values

EXECUTE_ENCLOSURE_ON_CLICK_KEY

public static final java.lang.String EXECUTE_ENCLOSURE_ON_CLICK_KEY
true to automatically execute an enclosure in its associated application. false for quiet mode (no automatic execution).

See Also:
Constant Field Values

TRAY_OPTIONS_KEY

public static final java.lang.String TRAY_OPTIONS_KEY
Key to access the tray options

See Also:
Constant Field Values

SEND_TO_TRAY_ON_MINIMIZE_KEY

public static final java.lang.String SEND_TO_TRAY_ON_MINIMIZE_KEY
true to send to system tray if the MainApplicationWindow is minimized.

See Also:
Constant Field Values

SEND_TO_TRAY_ON_CLOSE_KEY

public static final java.lang.String SEND_TO_TRAY_ON_CLOSE_KEY
true to send to system tray if the MainApplicationWindow is closed.

See Also:
Constant Field Values

SEND_TO_TRAY_ON_SERVER_START_KEY

public static final java.lang.String SEND_TO_TRAY_ON_SERVER_START_KEY
true to send to tray if the application starts up.

See Also:
Constant Field Values

AUTO_HIDE_NOTIFICATIONS_KEY

public static final java.lang.String AUTO_HIDE_NOTIFICATIONS_KEY
true to automatically hide tray notifications.

See Also:
Constant Field Values

NOTIFY_ON_NEW_MESSAGES_RECEIVED_KEY

public static final java.lang.String NOTIFY_ON_NEW_MESSAGES_RECEIVED_KEY
true to notify when new messages were received.

See Also:
Constant Field Values
Constructor Detail

ConfigurationManager

private ConfigurationManager()
Private constructor to prevent direct instantiation.

Method Detail

verifyDirectorySetting

private static void verifyDirectorySetting(java.lang.String key)
Verifies if the directory denoted by the given key exists. If not it is created.

Parameters:
key - the key to access the directory setting