com.openexchange.mail
Class MailServletInterface

java.lang.Object
  extended by com.openexchange.mail.MailServletInterface

public abstract class MailServletInterface
extends java.lang.Object

MailServletInterface - The mail interface which invokes the mail layer methods.

This interface's purpose is to be conform to other interfaces used in other groupware modules which are used throughout servlet instances.

Author:
Thorben Betten

Field Summary
static com.openexchange.api2.MailInterfaceMonitor mailInterfaceMonitor
           
static int QUOTA_RESOURCE_MESSAGE
          The constant for quota message resource
static int QUOTA_RESOURCE_STORAGE
          The constant for quota storage resource
 
Constructor Summary
MailServletInterface()
           
 
Method Summary
abstract  java.lang.String[] appendMessages(java.lang.String destFolder, MailMessage[] msgs, boolean force)
          Appends given messages to given folder.
abstract  boolean clearFolder(java.lang.String folderArg)
          Clears all messages out of given folder.
abstract  void close(boolean putIntoCache)
          Closes the interface and releases all resources
abstract  java.lang.String[] copyMessages(java.lang.String sourceFolder, java.lang.String destFolder, java.lang.String[] msgUIDs, boolean move)
          Copies or moves (if move is set) the defined message from source folder to destination folder.
abstract  java.lang.String deleteFolder(java.lang.String folder)
          Deletes given folder
abstract  boolean deleteMessages(java.lang.String folder, java.lang.String[] msgUIDs, boolean hardDelete)
          Deletes the message located in given folder corresponding to given msgUID
abstract  int getAccountID()
          Gets the account ID to which the (primary) mail access is connected
abstract  int[] getAllMessageCount(java.lang.String folder)
          Returns all message counts in specified folder in an int array as follows: 0: Message Count, 1 : New Message Count, 2: Unread MessageCount, 3: Deleted Message Count
abstract  com.openexchange.tools.iterator.SearchIterator<MailMessage> getAllMessages(java.lang.String folder, int sortCol, int order, int[] fields, int[] fromToIndices)
          Returns an instance of SearchIterator containing all messages located in given folder.
abstract  com.openexchange.tools.iterator.SearchIterator<MailMessage> getAllThreadedMessages(java.lang.String folder, int sortCol, int order, int[] fields, int[] fromToIndices)
          Returns a thread-view-sorted instance of SearchIterator containing all messages located in given folder.
abstract  com.openexchange.tools.iterator.SearchIterator<MailFolder> getChildFolders(java.lang.String parentFolder, boolean all)
          Returns an instance of SearchIterator containing the subfolders of given folder
abstract  java.lang.String getConfirmedHamFolder(int accountId)
          Returns user-defined confirmed ham folder
abstract  java.lang.String getConfirmedSpamFolder(int accountId)
          Returns user-defined confirmed spam folder
abstract  int getDeletedMessageCount(java.lang.String folder)
          Returns the number messages which are marked for deletion in folder
abstract  MailMessage[] getDeletedMessages(java.lang.String folder, int[] fields)
          Gets all deleted messages in given folder
abstract  java.lang.String getDraftsFolder(int accountId)
          Returns user-defined drafts folder
abstract  MailFolder getFolder(java.lang.String folder, boolean checkFolder)
          Returns the store's folder identfied through given String instance
abstract  MailMessage getForwardMessageForDisplay(java.lang.String[] folders, java.lang.String[] fowardMsgUIDs, UserSettingMail usm)
          Creates an instance of JSONMessageObject which contains the initial forward content of the message identifed through fowardMsgUID.
abstract  java.lang.String getInboxFolder(int accountId)
          Returns user-defined inbox folder
static MailServletInterface getInstance(com.openexchange.session.Session session)
          Gets a proper implementation of MailServletInterface NOTE: Don't forget to invoke close(boolean) after usage MailInterface mailInterface = MailInterface.getInstance(session); try { //Do some stuff here... } finally { mailInterface.close(true); }
abstract  MailConfig getMailConfig()
          Returns user-specific mail configuration
abstract  java.lang.String getMailIDByMessageID(java.lang.String folder, java.lang.String messageID)
          Gets a mail's ID by specified "Message-Id" header.
 com.openexchange.groupware.importexport.MailImportResult[] getMailImportResults()
          Get results of imported mails.
abstract  MailMessage getMessage(java.lang.String folder, java.lang.String msgUID)
          Gets the mail identified through given ID from store located in given folder.
abstract  MailPart getMessageAttachment(java.lang.String folder, java.lang.String msgUID, java.lang.String attachmentPosition, boolean displayVersion)
          Returns a message's attachment located at given attachmentPosition wrapped by an instance of JSONMessageAttachmentObject for a convenient access to its attributes and content.
abstract  com.openexchange.filemanagement.ManagedFile getMessageAttachments(java.lang.String folder, java.lang.String msgUID, java.lang.String[] attachmentPositions)
          Returns message's attachments as a ZIP file backed by returned managed file instance.
abstract  int getMessageCount(java.lang.String folder)
          Returns the number of messages in folder
abstract  MailPart getMessageImage(java.lang.String folder, java.lang.String msgUID, java.lang.String cid)
          Returns a message's inline image located identified with given cid wrapped by an instance of JSONMessageAttachmentObject for a convenient access to its attributes and content.
abstract  MailMessage[] getMessageList(java.lang.String folder, java.lang.String[] uids, int[] fields, java.lang.String[] headerFields)
          Returns the an array of messages located in given folder.
abstract  com.openexchange.tools.iterator.SearchIterator<MailMessage> getMessages(java.lang.String folder, int[] fromToIndices, int sortCol, int order, int[] searchCols, java.lang.String[] searchPatterns, boolean linkSearchTermsWithOR, int[] fields)
          Returns an instance of SearchIterator containing a selection of messages located in given folder.
abstract  com.openexchange.tools.iterator.SearchIterator<MailMessage> getMessages(java.lang.String folder, int[] fromToIndices, int sortCol, int order, com.openexchange.search.SearchTerm<?> searchTerm, boolean linkSearchTermsWithOR, int[] fields)
          Returns an instance of SearchIterator containing a selection of messages located in given folder.
abstract  int getNewMessageCount(java.lang.String folder)
          Returns the number of new messages in folder
abstract  com.openexchange.tools.iterator.SearchIterator<MailMessage> getNewMessages(java.lang.String folder, int sortCol, int order, int[] fields, int limit)
          Returns an instance of SearchIterator containing max.
abstract  com.openexchange.tools.iterator.SearchIterator<MailFolder> getPathToDefaultFolder(java.lang.String folder)
          Returns an instance of SearchIterator containing all antecessor folders on path to mailbox's default folder
abstract  long getQuotaLimit(int type)
          Returns the quota limit
abstract  long[][] getQuotas(int[] types)
          Gets both quota limit and quota usage in an array with length set to 2 for each resource type
abstract  long getQuotaUsage(int type)
          Returns the current quota usage
abstract  MailMessage getReplyMessageForDisplay(java.lang.String folder, java.lang.String replyMsgUID, boolean replyToAll, UserSettingMail usm)
          Creates an instance of JSONMessageObject which contains the initial reply content of the message identifed through replyMsgUID.
abstract  com.openexchange.tools.iterator.SearchIterator<MailFolder> getRootFolders()
          Returns an instance of SearchIterator containing the mailbox's default folder
abstract  java.lang.String getSentFolder(int accountId)
          Returns user-defined sent folder
abstract  java.lang.String getSpamFolder(int accountId)
          Returns user-defined spam folder
abstract  com.openexchange.tools.iterator.SearchIterator<MailMessage> getThreadedMessages(java.lang.String folder, int[] fromToIndices, int sortCol, int order, int[] searchCols, java.lang.String[] searchPatterns, boolean linkSearchTermsWithOR, int[] fields)
          Returns a thread-view-sorted instance of SearchIterator containing a selection of messages located in given folder.
abstract  java.lang.String getTrashFolder(int accountId)
          Returns user-defined trash folder
abstract  int getUnreadMessageCount(java.lang.String folder)
          Returns the number of unread messages in folder
abstract  MailMessage[] getUpdatedMessages(java.lang.String folder, int[] fields)
          Gets all updated messages in given folder
abstract  java.util.Collection<MailException> getWarnings()
          Gets possible warnings.
 java.lang.String[] importMessages(java.lang.String destFolder, MailMessage[] msgs, boolean force)
          Overwrite this to implement a different append behaviour for mail imports.
abstract  java.lang.String saveDraft(ComposedMailMessage draftMail, boolean autosave, int accountId)
          Saves specified draft mail.
abstract  java.lang.String saveFolder(MailFolderDescription mailFolder)
          Creates a new mail folder described by given MailFolderObject instance
abstract  void sendFormMail(ComposedMailMessage composedMail, int groupId, int accountId)
          Sends a form mail.
abstract  java.lang.String sendMessage(ComposedMailMessage transportMail, ComposeType sendType, int accountId)
          Sends a message described through given instance of msgObj and its possible file attachments contained in given instance of uploadEvent.
abstract  void sendReceiptAck(java.lang.String folder, java.lang.String msgUID, java.lang.String fromAddr)
          Sends a read acknowledgment to given message
abstract  void updateMessageColorLabel(java.lang.String folder, java.lang.String[] msgUID, int newColorLabel)
          Updates the color label stored in message's user flags
abstract  void updateMessageFlags(java.lang.String folder, java.lang.String[] msgUID, int flagBits, boolean flagVal)
          Updates message's client-alterable system flags (e.g.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QUOTA_RESOURCE_STORAGE

public static final int QUOTA_RESOURCE_STORAGE
The constant for quota storage resource

See Also:
Constant Field Values

QUOTA_RESOURCE_MESSAGE

public static final int QUOTA_RESOURCE_MESSAGE
The constant for quota message resource

See Also:
Constant Field Values

mailInterfaceMonitor

public static final com.openexchange.api2.MailInterfaceMonitor mailInterfaceMonitor
Constructor Detail

MailServletInterface

public MailServletInterface()
Method Detail

getInstance

public static final MailServletInterface getInstance(com.openexchange.session.Session session)
                                              throws MailException
Gets a proper implementation of MailServletInterface

NOTE: Don't forget to invoke close(boolean) after usage

 MailInterface mailInterface = MailInterface.getInstance(session);
 try {
     //Do some stuff here...
 } finally {
     mailInterface.close(true);
 }
 

Parameters:
session - The session
Returns:
An instance of MailServletInterface
Throws:
MailException

getMailIDByMessageID

public abstract java.lang.String getMailIDByMessageID(java.lang.String folder,
                                                      java.lang.String messageID)
                                               throws MailException
Gets a mail's ID by specified "Message-Id" header.

Parameters:
folder - The folder to search in
messageID - The "Message-Id" header
Returns:
The ID of the mail corresponding to specified "Message-Id" header
Throws:
MailException - If no mauil could be found

getAllMessageCount

public abstract int[] getAllMessageCount(java.lang.String folder)
                                  throws MailException
Returns all message counts in specified folder in an int array as follows: 0: Message Count, 1 : New Message Count, 2: Unread MessageCount, 3: Deleted Message Count

Throws:
MailException

getMessageCount

public abstract int getMessageCount(java.lang.String folder)
                             throws MailException
Returns the number of messages in folder

Throws:
MailException

getNewMessageCount

public abstract int getNewMessageCount(java.lang.String folder)
                                throws MailException
Returns the number of new messages in folder

Throws:
MailException

getUnreadMessageCount

public abstract int getUnreadMessageCount(java.lang.String folder)
                                   throws MailException
Returns the number of unread messages in folder

Throws:
MailException

getDeletedMessageCount

public abstract int getDeletedMessageCount(java.lang.String folder)
                                    throws MailException
Returns the number messages which are marked for deletion in folder

Throws:
MailException

getQuotas

public abstract long[][] getQuotas(int[] types)
                            throws MailException
Gets both quota limit and quota usage in an array with length set to 2 for each resource type

Parameters:
types - The resource types; QUOTA_RESOURCE_STORAGE or QUOTA_RESOURCE_MESSAGE
Returns:
Both quota limit and quota usage in an array with length set to 2 for each resource type
Throws:
MailException - If quotas cannot be retrieved

getQuotaLimit

public abstract long getQuotaLimit(int type)
                            throws MailException
Returns the quota limit

Throws:
MailException

getQuotaUsage

public abstract long getQuotaUsage(int type)
                            throws MailException
Returns the current quota usage

Throws:
MailException

getNewMessages

public abstract com.openexchange.tools.iterator.SearchIterator<MailMessage> getNewMessages(java.lang.String folder,
                                                                                           int sortCol,
                                                                                           int order,
                                                                                           int[] fields,
                                                                                           int limit)
                                                                                    throws MailException
Returns an instance of SearchIterator containing max. limit new (unseen) messages located in given folder.

Throws:
MailException

getAllMessages

public abstract com.openexchange.tools.iterator.SearchIterator<MailMessage> getAllMessages(java.lang.String folder,
                                                                                           int sortCol,
                                                                                           int order,
                                                                                           int[] fields,
                                                                                           int[] fromToIndices)
                                                                                    throws MailException
Returns an instance of SearchIterator containing all messages located in given folder.

Throws:
MailException

getMessages

public abstract com.openexchange.tools.iterator.SearchIterator<MailMessage> getMessages(java.lang.String folder,
                                                                                        int[] fromToIndices,
                                                                                        int sortCol,
                                                                                        int order,
                                                                                        int[] searchCols,
                                                                                        java.lang.String[] searchPatterns,
                                                                                        boolean linkSearchTermsWithOR,
                                                                                        int[] fields)
                                                                                 throws MailException
Returns an instance of SearchIterator containing a selection of messages located in given folder. fromToIndices can define a range of messages that should be returned. Moreover searchCols and searchPatterns defines a search pattern to further confine returned messages.

Throws:
MailException

getMessages

public abstract com.openexchange.tools.iterator.SearchIterator<MailMessage> getMessages(java.lang.String folder,
                                                                                        int[] fromToIndices,
                                                                                        int sortCol,
                                                                                        int order,
                                                                                        com.openexchange.search.SearchTerm<?> searchTerm,
                                                                                        boolean linkSearchTermsWithOR,
                                                                                        int[] fields)
                                                                                 throws MailException
Returns an instance of SearchIterator containing a selection of messages located in given folder. fromToIndices can define a range of messages that should be returned. Moreover searchCols and searchPatterns defines a search pattern to further confine returned messages.

Throws:
MailException

getAllThreadedMessages

public abstract com.openexchange.tools.iterator.SearchIterator<MailMessage> getAllThreadedMessages(java.lang.String folder,
                                                                                                   int sortCol,
                                                                                                   int order,
                                                                                                   int[] fields,
                                                                                                   int[] fromToIndices)
                                                                                            throws MailException
Returns a thread-view-sorted instance of SearchIterator containing all messages located in given folder.

Throws:
MailException

getThreadedMessages

public abstract com.openexchange.tools.iterator.SearchIterator<MailMessage> getThreadedMessages(java.lang.String folder,
                                                                                                int[] fromToIndices,
                                                                                                int sortCol,
                                                                                                int order,
                                                                                                int[] searchCols,
                                                                                                java.lang.String[] searchPatterns,
                                                                                                boolean linkSearchTermsWithOR,
                                                                                                int[] fields)
                                                                                         throws MailException
Returns a thread-view-sorted instance of SearchIterator containing a selection of messages located in given folder. fromToIndices can define a range of messages that should be returned. Moreover searchCols and searchPatterns defines a search pattern to further confine returned messages.

Throws:
MailException

getMessageList

public abstract MailMessage[] getMessageList(java.lang.String folder,
                                             java.lang.String[] uids,
                                             int[] fields,
                                             java.lang.String[] headerFields)
                                      throws MailException
Returns the an array of messages located in given folder. If fromToUID is not null only messages fitting into uid range will be returned.

Throws:
MailException

getMessage

public abstract MailMessage getMessage(java.lang.String folder,
                                       java.lang.String msgUID)
                                throws MailException
Gets the mail identified through given ID from store located in given folder.

Parameters:
folder - The folder path
msgUID - The mail ID
Returns:
The mail identified through given ID from store located in given folder.
Throws:
MailException - If mail cannot be fetched from store

getMessageAttachment

public abstract MailPart getMessageAttachment(java.lang.String folder,
                                              java.lang.String msgUID,
                                              java.lang.String attachmentPosition,
                                              boolean displayVersion)
                                       throws MailException
Returns a message's attachment located at given attachmentPosition wrapped by an instance of JSONMessageAttachmentObject for a convenient access to its attributes and content.

Parameters:
displayVersion - true if returned object is for display purpose; otherwise false
Throws:
MailException

getMessageAttachments

public abstract com.openexchange.filemanagement.ManagedFile getMessageAttachments(java.lang.String folder,
                                                                                  java.lang.String msgUID,
                                                                                  java.lang.String[] attachmentPositions)
                                                                           throws MailException
Returns message's attachments as a ZIP file backed by returned managed file instance.

Parameters:
folder - The folder
msgUID - The message ID
attachmentPositions - The attachment positions
Returns:
A ZIP file backed by returned managed file instance
Throws:
MailException - If an error occurs

getMessageImage

public abstract MailPart getMessageImage(java.lang.String folder,
                                         java.lang.String msgUID,
                                         java.lang.String cid)
                                  throws MailException
Returns a message's inline image located identified with given cid wrapped by an instance of JSONMessageAttachmentObject for a convenient access to its attributes and content.

Throws:
MailException

saveDraft

public abstract java.lang.String saveDraft(ComposedMailMessage draftMail,
                                           boolean autosave,
                                           int accountId)
                                    throws MailException
Saves specified draft mail.

If specified draft mail holds a reference to an existing draft mail - MailPart.getMsgref() is not null - then the referenced draft mail shall be replaced.

Parameters:
draftMail - The draft mail
autosave - true to indicate an auto-save operation; otherwise false
Returns:
The stored draft's mail path
Throws:
MailException

sendReceiptAck

public abstract void sendReceiptAck(java.lang.String folder,
                                    java.lang.String msgUID,
                                    java.lang.String fromAddr)
                             throws MailException
Sends a read acknowledgment to given message

Throws:
MailException

sendFormMail

public abstract void sendFormMail(ComposedMailMessage composedMail,
                                  int groupId,
                                  int accountId)
                           throws MailException
Sends a form mail.

Parameters:
composedMail - The form mail (without any recipients)
groupId - The identifier of the group to whose members shall receive the mail
accountId - The account identifier
Throws:
MailException - If mail transport fails

sendMessage

public abstract java.lang.String sendMessage(ComposedMailMessage transportMail,
                                             ComposeType sendType,
                                             int accountId)
                                      throws MailException
Sends a message described through given instance of msgObj and its possible file attachments contained in given instance of uploadEvent.

Throws:
MailException

appendMessages

public abstract java.lang.String[] appendMessages(java.lang.String destFolder,
                                                  MailMessage[] msgs,
                                                  boolean force)
                                           throws MailException
Appends given messages to given folder.

Parameters:
destFolder - The destination folder
msgs - - The messages to append (must be completely pre-filled incl. content references)
force - true to enforce append and to omit checks; otherwise false
Returns:
The corresponding mail IDs in destination folder
Throws:
MailException - If messages cannot be appended.

importMessages

public java.lang.String[] importMessages(java.lang.String destFolder,
                                         MailMessage[] msgs,
                                         boolean force)
                                  throws MailException
Overwrite this to implement a different append behaviour for mail imports.

Parameters:
destFolder - The destination folder
msgs - - The messages to append (must be completely pre-filled incl. content references)
force - true to enforce append and to omit checks; otherwise false
Returns:
The corresponding mail IDs in destination folder
Throws:
MailException - If messages cannot be appended.

getReplyMessageForDisplay

public abstract MailMessage getReplyMessageForDisplay(java.lang.String folder,
                                                      java.lang.String replyMsgUID,
                                                      boolean replyToAll,
                                                      UserSettingMail usm)
                                               throws MailException
Creates an instance of JSONMessageObject which contains the initial reply content of the message identifed through replyMsgUID. replyToAll defines whether to reply to all involved entities or just to main sender. NOTE:This method is intended to support Open-Xchange GUI's display onyl and does not really send the reply.

Throws:
MailException

getForwardMessageForDisplay

public abstract MailMessage getForwardMessageForDisplay(java.lang.String[] folders,
                                                        java.lang.String[] fowardMsgUIDs,
                                                        UserSettingMail usm)
                                                 throws MailException
Creates an instance of JSONMessageObject which contains the initial forward content of the message identifed through fowardMsgUID. NOTE:This method is intended to support Open-Xchange GUI's display onyl and does not really send the forward.

Throws:
MailException

deleteMessages

public abstract boolean deleteMessages(java.lang.String folder,
                                       java.lang.String[] msgUIDs,
                                       boolean hardDelete)
                                throws MailException
Deletes the message located in given folder corresponding to given msgUID

Throws:
MailException

clearFolder

public abstract boolean clearFolder(java.lang.String folderArg)
                             throws MailException
Clears all messages out of given folder. NOTE this is a hard delete, thus no copies are created

Throws:
MailException

copyMessages

public abstract java.lang.String[] copyMessages(java.lang.String sourceFolder,
                                                java.lang.String destFolder,
                                                java.lang.String[] msgUIDs,
                                                boolean move)
                                         throws MailException
Copies or moves (if move is set) the defined message from source folder to destination folder.

Throws:
MailException

updateMessageColorLabel

public abstract void updateMessageColorLabel(java.lang.String folder,
                                             java.lang.String[] msgUID,
                                             int newColorLabel)
                                      throws MailException
Updates the color label stored in message's user flags

Throws:
MailException

updateMessageFlags

public abstract void updateMessageFlags(java.lang.String folder,
                                        java.lang.String[] msgUID,
                                        int flagBits,
                                        boolean flagVal)
                                 throws MailException
Updates message's client-alterable system flags (e.g. //SEEN or //ANSWERED). flagVal determines whether the affected flags are set (true) or unset (false).

Throws:
MailException

getUpdatedMessages

public abstract MailMessage[] getUpdatedMessages(java.lang.String folder,
                                                 int[] fields)
                                          throws MailException
Gets all updated messages in given folder

Parameters:
folder - The folder fullname
since - The time stamp in UTC milliseconds
fields - The desired fields to fill in returned messages
Returns:
All updated messages in given folder
Throws:
MailException - If updated messages cannot be returned

getDeletedMessages

public abstract MailMessage[] getDeletedMessages(java.lang.String folder,
                                                 int[] fields)
                                          throws MailException
Gets all deleted messages in given folder

Parameters:
folder - The folder fullname
since - The time stamp in UTC milliseconds
fields - The desired fields to fill in returned messages
Returns:
All deleted messages in given folder
Throws:
MailException - If deleted messages cannot be returned

getRootFolders

public abstract com.openexchange.tools.iterator.SearchIterator<MailFolder> getRootFolders()
                                                                                   throws MailException
Returns an instance of SearchIterator containing the mailbox's default folder

Throws:
MailException

getChildFolders

public abstract com.openexchange.tools.iterator.SearchIterator<MailFolder> getChildFolders(java.lang.String parentFolder,
                                                                                           boolean all)
                                                                                    throws MailException
Returns an instance of SearchIterator containing the subfolders of given folder

Throws:
MailException

getFolder

public abstract MailFolder getFolder(java.lang.String folder,
                                     boolean checkFolder)
                              throws MailException
Returns the store's folder identfied through given String instance

Throws:
MailException

getPathToDefaultFolder

public abstract com.openexchange.tools.iterator.SearchIterator<MailFolder> getPathToDefaultFolder(java.lang.String folder)
                                                                                           throws MailException
Returns an instance of SearchIterator containing all antecessor folders on path to mailbox's default folder

Throws:
MailException

close

public abstract void close(boolean putIntoCache)
                    throws MailException
Closes the interface and releases all resources

Parameters:
putIntoCache - - whether or not to put associated conenction into pool
Throws:
MailException

saveFolder

public abstract java.lang.String saveFolder(MailFolderDescription mailFolder)
                                     throws MailException
Creates a new mail folder described by given MailFolderObject instance

Throws:
MailException

deleteFolder

public abstract java.lang.String deleteFolder(java.lang.String folder)
                                       throws MailException
Deletes given folder

Throws:
MailException

getInboxFolder

public abstract java.lang.String getInboxFolder(int accountId)
                                         throws MailException
Returns user-defined inbox folder

Throws:
MailException

getDraftsFolder

public abstract java.lang.String getDraftsFolder(int accountId)
                                          throws MailException
Returns user-defined drafts folder

Throws:
MailException

getSentFolder

public abstract java.lang.String getSentFolder(int accountId)
                                        throws MailException
Returns user-defined sent folder

Throws:
MailException

getSpamFolder

public abstract java.lang.String getSpamFolder(int accountId)
                                        throws MailException
Returns user-defined spam folder

Throws:
MailException

getTrashFolder

public abstract java.lang.String getTrashFolder(int accountId)
                                         throws MailException
Returns user-defined trash folder

Throws:
MailException

getConfirmedSpamFolder

public abstract java.lang.String getConfirmedSpamFolder(int accountId)
                                                 throws MailException
Returns user-defined confirmed spam folder

Throws:
MailException

getConfirmedHamFolder

public abstract java.lang.String getConfirmedHamFolder(int accountId)
                                                throws MailException
Returns user-defined confirmed ham folder

Throws:
MailException

getMailConfig

public abstract MailConfig getMailConfig()
                                  throws MailException
Returns user-specific mail configuration

Throws:
MailException

getAccountID

public abstract int getAccountID()
Gets the account ID to which the (primary) mail access is connected

Returns:
The account ID

getWarnings

public abstract java.util.Collection<MailException> getWarnings()
Gets possible warnings.

Returns:
Possible warnings

getMailImportResults

public com.openexchange.groupware.importexport.MailImportResult[] getMailImportResults()
Get results of imported mails. Implement this if you want to return detailed informations for mail imports.

Returns:
The results.