org.jasig.portlet.emailpreview.dao
Interface IEmailAccountService

All Known Implementing Classes:
DemoAccountService, ExchangeAccountService, JavamailAccountService

public interface IEmailAccountService

IEmailAccountDao is repsonsible for retrieving email messages from an arbitrary email store.

Author:
Jen Bourey, jbourey@unicon.net, Drew Wills, drew@unicon.net

Field Summary
static String EXCHANGE_WEB_SERVICES
           
static String IMAP
           
 
Method Summary
 boolean deleteMessages(javax.portlet.PortletRequest req, String[] messageIds)
          Delete and expunge the specified massages from the store.
 AccountSummary getAccountSummary(javax.portlet.PortletRequest req, int start, int max, boolean refresh, String folder)
          Obtains the AccountSummary object from the data store itself, or possibly from cache.
 javax.mail.Folder[] getAllUserInboxFolders(javax.portlet.PortletRequest req)
           
 EmailMessage getMessage(javax.portlet.PortletRequest req, String messageId)
          Retrieve an individual message from the mail store.
 boolean setSeenFlag(javax.portlet.PortletRequest req, String[] messageIds, boolean read)
          Switch the value of the SEEN flag for the specified messages.
 

Field Detail

EXCHANGE_WEB_SERVICES

static final String EXCHANGE_WEB_SERVICES
See Also:
Constant Field Values

IMAP

static final String IMAP
See Also:
Constant Field Values
Method Detail

getAccountSummary

AccountSummary getAccountSummary(javax.portlet.PortletRequest req,
                                 int start,
                                 int max,
                                 boolean refresh,
                                 String folder)
                                 throws EmailPreviewException
Obtains the AccountSummary object from the data store itself, or possibly from cache.

Parameters:
req - The current PortletRequest
start -
max - The maximum number of messages (header info) that may be returned with the summary
refresh - True if the concrete service implementation must not return cached data; otherwise false
Returns:
Throws:
MailAuthenticationException - When authentication with the mail server fails
EmailPreviewException - On other errors

getMessage

EmailMessage getMessage(javax.portlet.PortletRequest req,
                        String messageId)
Retrieve an individual message from the mail store.

Parameters:
req - The current PortletRequest
messageId - messageId
Returns:

deleteMessages

boolean deleteMessages(javax.portlet.PortletRequest req,
                       String[] messageIds)
Delete and expunge the specified massages from the store. Supported for implementations that provide UIDs (e.g. UIDFolder) only.

Parameters:
req - The current PortletRequest
messageIds - List of messageIds to delete
Returns:
Success or failure

setSeenFlag

boolean setSeenFlag(javax.portlet.PortletRequest req,
                    String[] messageIds,
                    boolean read)
Switch the value of the SEEN flag for the specified messages. Supported for implementations that provide UIDs (e.g. UIDFolder) only.

Parameters:
req - The current PortletRequest
messageIds -
read - The new value of the seen flag
Returns:
Success or failure

getAllUserInboxFolders

javax.mail.Folder[] getAllUserInboxFolders(javax.portlet.PortletRequest req)


Copyright © 2013 Jasig. All Rights Reserved.