org.jasig.portlet.emailpreview.dao.exchange
Class ExchangeAccountService

java.lang.Object
  extended by org.jasig.portlet.emailpreview.dao.exchange.ExchangeAccountService
All Implemented Interfaces:
IEmailAccountService

public class ExchangeAccountService
extends Object
implements IEmailAccountService

Implements the email account service for Exchange using Exchange Web Services.

Author:
James Wennmacher, jwennmacher@unicon.net

Field Summary
protected  org.slf4j.Logger log
           
 
Fields inherited from interface org.jasig.portlet.emailpreview.dao.IEmailAccountService
EXCHANGE_WEB_SERVICES, IMAP
 
Constructor Summary
ExchangeAccountService()
           
 
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.
 void setExchangeCredentialsService(IExchangeCredentialsService exchangeCredentialsService)
           
 boolean setSeenFlag(javax.portlet.PortletRequest req, String[] messageIds, boolean read)
          Switch the value of the SEEN flag for the specified messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.slf4j.Logger log
Constructor Detail

ExchangeAccountService

public ExchangeAccountService()
Method Detail

setExchangeCredentialsService

public void setExchangeCredentialsService(IExchangeCredentialsService exchangeCredentialsService)

getAccountSummary

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

Specified by:
getAccountSummary in interface IEmailAccountService
Parameters:
req - The current PortletRequest
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:
EmailPreviewException - On other errors

getMessage

public EmailMessage getMessage(javax.portlet.PortletRequest req,
                               String messageId)
Description copied from interface: IEmailAccountService
Retrieve an individual message from the mail store.

Specified by:
getMessage in interface IEmailAccountService
Parameters:
req - The current PortletRequest
messageId - messageId
Returns:

deleteMessages

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

Specified by:
deleteMessages in interface IEmailAccountService
Parameters:
req - The current PortletRequest
messageIds - List of messageIds to delete
Returns:
Success or failure

setSeenFlag

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

Specified by:
setSeenFlag in interface IEmailAccountService
Parameters:
req - The current PortletRequest
read - The new value of the seen flag
Returns:
Success or failure

getAllUserInboxFolders

public javax.mail.Folder[] getAllUserInboxFolders(javax.portlet.PortletRequest req)
Specified by:
getAllUserInboxFolders in interface IEmailAccountService


Copyright © 2013 Jasig. All Rights Reserved.