org.jasig.portlet.emailpreview.dao.demo
Class DemoAccountService

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

@Component
public final class DemoAccountService
extends Object
implements IEmailAccountService

A Demo implementation of IEmailAccountService.

Author:
Landis Casner, Drew Wills, drew@unicon.net

Field Summary
 
Fields inherited from interface org.jasig.portlet.emailpreview.dao.IEmailAccountService
EXCHANGE_WEB_SERVICES, IMAP
 
Constructor Summary
DemoAccountService()
           
 
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 setJsonLocation(String jsonLocation)
           
 boolean setSeenFlag(javax.portlet.PortletRequest req, String[] messageIds, boolean seenValue)
          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
 

Constructor Detail

DemoAccountService

public DemoAccountService()
Method Detail

setJsonLocation

public void setJsonLocation(String jsonLocation)

getAccountSummary

public AccountSummary getAccountSummary(javax.portlet.PortletRequest req,
                                        int start,
                                        int max,
                                        boolean refresh,
                                        String folder)
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:

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 seenValue)
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
seenValue - 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.