com.openexchange.mail.config
Class MailAccountProperties

java.lang.Object
  extended by com.openexchange.mail.config.MailAccountProperties
All Implemented Interfaces:
IMailProperties

public class MailAccountProperties
extends java.lang.Object
implements IMailProperties

MailAccountProperties - Mail properties read from mail account with fallback to properties read from properties file.

Author:
Thorben Betten

Constructor Summary
MailAccountProperties(com.openexchange.mailaccount.MailAccount mailAccount)
          Initializes a new MailAccountProperties.
 
Method Summary
 int getAttachDisplaySize()
          Gets the max. allowed size (in bytes) for attachment for being displayed.
 char getDefaultSeparator()
          Gets the default separator character.
 int getMailAccessCacheIdleSeconds()
          Gets the mail access cache idle seconds.
 int getMailAccessCacheShrinkerSeconds()
          Gets the mail access cache shrinker-interval seconds.
 int getMailFetchLimit()
          Gets the mail fetch limit.
 int getWatcherFrequency()
          Gets the watcher frequency.
 int getWatcherTime()
          Gets the watcher time.
 boolean isAllowNestedDefaultFolderOnAltNamespace()
          Checks if default folders (e.g.
 boolean isIgnoreSubscription()
          Indicates whether subscription shall be ignored or not.
 boolean isSupportSubscription()
          Indicates whether subscription is supported or not.
 boolean isUserFlagsEnabled()
          Indicates if user flags are enabled.
 boolean isWatcherEnabled()
          Indicates if watcher is enabled.
 boolean isWatcherShallClose()
          Indicates if watcher is allowed to close exceeded connections.
 void waitForLoading()
          Waits for loading this properties.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailAccountProperties

public MailAccountProperties(com.openexchange.mailaccount.MailAccount mailAccount)
Initializes a new MailAccountProperties.

Parameters:
mailAccount - The mail account
Throws:
java.lang.IllegalArgumentException - If provided mail account is null
Method Detail

getAttachDisplaySize

public int getAttachDisplaySize()
Description copied from interface: IMailProperties
Gets the max. allowed size (in bytes) for attachment for being displayed.

Specified by:
getAttachDisplaySize in interface IMailProperties
Returns:
The max. allowed size (in bytes) for attachment for being displayed

getDefaultSeparator

public char getDefaultSeparator()
Description copied from interface: IMailProperties
Gets the default separator character.

Specified by:
getDefaultSeparator in interface IMailProperties
Returns:
The default separator character

getMailAccessCacheIdleSeconds

public int getMailAccessCacheIdleSeconds()
Description copied from interface: IMailProperties
Gets the mail access cache idle seconds.

Specified by:
getMailAccessCacheIdleSeconds in interface IMailProperties
Returns:
The mail access cache idle seconds.

getMailAccessCacheShrinkerSeconds

public int getMailAccessCacheShrinkerSeconds()
Description copied from interface: IMailProperties
Gets the mail access cache shrinker-interval seconds.

Specified by:
getMailAccessCacheShrinkerSeconds in interface IMailProperties
Returns:
The mail access cache shrinker-interval seconds

getMailFetchLimit

public int getMailFetchLimit()
Description copied from interface: IMailProperties
Gets the mail fetch limit.

Specified by:
getMailFetchLimit in interface IMailProperties
Returns:
The mail fetch limit

getWatcherFrequency

public int getWatcherFrequency()
Description copied from interface: IMailProperties
Gets the watcher frequency.

Specified by:
getWatcherFrequency in interface IMailProperties
Returns:
The watcher frequency

getWatcherTime

public int getWatcherTime()
Description copied from interface: IMailProperties
Gets the watcher time.

Specified by:
getWatcherTime in interface IMailProperties
Returns:
The watcher time

isAllowNestedDefaultFolderOnAltNamespace

public boolean isAllowNestedDefaultFolderOnAltNamespace()
Description copied from interface: IMailProperties
Checks if default folders (e.g. "Sent Mail", "Drafts") are supposed to be created below personal namespace folder (INBOX) even though mail server indicates to create them on the same level as personal namespace folder.

Note that personal namespace folder must allow subfolder creation.

Specified by:
isAllowNestedDefaultFolderOnAltNamespace in interface IMailProperties
Returns:
true if default folders are supposed to be created below personal namespace folder; otherwise false

isIgnoreSubscription

public boolean isIgnoreSubscription()
Description copied from interface: IMailProperties
Indicates whether subscription shall be ignored or not.

Specified by:
isIgnoreSubscription in interface IMailProperties
Returns:
true if subscription shall be ignored; otherwise false

isSupportSubscription

public boolean isSupportSubscription()
Description copied from interface: IMailProperties
Indicates whether subscription is supported or not.

Specified by:
isSupportSubscription in interface IMailProperties
Returns:
true if subscription is supported; otherwise false

isUserFlagsEnabled

public boolean isUserFlagsEnabled()
Description copied from interface: IMailProperties
Indicates if user flags are enabled.

Specified by:
isUserFlagsEnabled in interface IMailProperties
Returns:
true if user flags are enabled; otherwise false

isWatcherEnabled

public boolean isWatcherEnabled()
Description copied from interface: IMailProperties
Indicates if watcher is enabled.

Specified by:
isWatcherEnabled in interface IMailProperties
Returns:
true if watcher is enabled; otherwise false

isWatcherShallClose

public boolean isWatcherShallClose()
Description copied from interface: IMailProperties
Indicates if watcher is allowed to close exceeded connections.

Specified by:
isWatcherShallClose in interface IMailProperties
Returns:
true if watcher is allowed to close exceeded connections; otherwise false

waitForLoading

public void waitForLoading()
                    throws java.lang.InterruptedException
Description copied from interface: IMailProperties
Waits for loading this properties.

Specified by:
waitForLoading in interface IMailProperties
Throws:
java.lang.InterruptedException - If another thread interrupted the current thread before or while the current thread was waiting for loading the properties.