public final class StorageUtility
extends java.lang.Object
StorageUtility - Offers utility methods for both folder and message storage| Modifier and Type | Field and Description |
|---|---|
static javax.mail.Message[] |
EMPTY_MSGS |
static int |
INDEX_CONFIRMED_HAM |
static int |
INDEX_CONFIRMED_SPAM |
static int |
INDEX_DRAFTS |
static int |
INDEX_INBOX |
static int |
INDEX_SENT |
static int |
INDEX_SPAM |
static int |
INDEX_TRASH |
static int |
MAIL_PARAM_HARD_DELETE |
static int |
UNLIMITED_QUOTA |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getAllAddresses(javax.mail.internet.InternetAddress[] internetAddrs) |
static java.lang.String[] |
getDefaultFolderNames(int accountId,
UserSettingMail usm)
Determines the default folder names (not full names).
|
static java.lang.String[] |
getDefaultFolderNames(int accountId,
UserSettingMail usm,
boolean isSpamEnabled)
Determines the default folder names (not full names).
|
static java.lang.String[] |
getDefaultFolderNames(java.lang.String trash,
java.lang.String sent,
java.lang.String drafts,
java.lang.String spam,
java.lang.String confirmedSpam,
java.lang.String confirmedHam,
boolean isSpamEnabled)
Deprecated.
Use
DefaultFolderNamesProvider instead |
static long |
getMaxRunningMillis()
Gets the default max. running millis.
|
static java.util.Map<HeaderName,java.lang.String> |
parseHeaders(byte[] headers)
Parses specified headers into a map
|
static java.util.Map<HeaderName,java.lang.String> |
parseHeaders(java.lang.String headers)
Parses specified headers into a map
|
public static final int INDEX_DRAFTS
public static final int INDEX_SENT
public static final int INDEX_SPAM
public static final int INDEX_TRASH
public static final int INDEX_CONFIRMED_SPAM
public static final int INDEX_CONFIRMED_HAM
public static final int INDEX_INBOX
public static final int MAIL_PARAM_HARD_DELETE
public static final int UNLIMITED_QUOTA
public static final javax.mail.Message[] EMPTY_MSGS
public static long getMaxRunningMillis()
public static java.lang.String getAllAddresses(javax.mail.internet.InternetAddress[] internetAddrs)
public static java.util.Map<HeaderName,java.lang.String> parseHeaders(byte[] headers)
headers - The headers as raw bytesMap containing the headerspublic static java.util.Map<HeaderName,java.lang.String> parseHeaders(java.lang.String headers)
headers - The headers as StringMap containing the headerspublic static java.lang.String[] getDefaultFolderNames(int accountId,
UserSettingMail usm)
throws com.openexchange.exception.OXException
String indexes the names as given through
constants: INDEX_DRAFTS, INDEX_SENT, etc.accountId - The account IDusm - The user's mail settingsStringcom.openexchange.exception.OXException - If spam enablement/disablement cannot be determinedpublic static java.lang.String[] getDefaultFolderNames(int accountId,
UserSettingMail usm,
boolean isSpamEnabled)
throws com.openexchange.exception.OXException
String indexes the names as given through
constants: INDEX_DRAFTS, INDEX_SENT, etc.accountId - The account IDusm - The user's mail settingsisSpamEnabled - true if spam is enabled for current user; otherwise falseStringcom.openexchange.exception.OXException - If spam enablement/disablement cannot be determined@Deprecated
public static java.lang.String[] getDefaultFolderNames(java.lang.String trash,
java.lang.String sent,
java.lang.String drafts,
java.lang.String spam,
java.lang.String confirmedSpam,
java.lang.String confirmedHam,
boolean isSpamEnabled)
throws MailConfigException
DefaultFolderNamesProvider insteadString indexes the names as given through
constants: INDEX_DRAFTS, INDEX_SENT, etc.trash - The trash namesent - The sent namedrafts - The drafts namespam - The spam nameconfirmedSpam - The confirmed-spam nameconfirmedHam - The confirmed-ham nameisSpamEnabled - true if spam is enabled for current user; otherwise falseStringMailConfigException - If spam enablement/disablement cannot be determined