org.jasig.portlet.emailpreview.dao.javamail
Class JavamailAccountService

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

@Component
public final class JavamailAccountService
extends Object
implements IEmailAccountService

A Data Access Object (DAO) for retrieving email account information. Currently all the information retrieved is related to the user's inbox.

Author:
Andreas Christoforides, Drew Wills, drew@unicon.net

Constructor Summary
JavamailAccountService()
           
 
Method Summary
 boolean deleteMessages(javax.portlet.PortletRequest req, long[] uids)
          Delete and expunge the specified massages from the store.
 AccountSummary getAccountSummary(javax.portlet.PortletRequest req, int start, int max, boolean refresh)
          Obtains the AccountSummary object from the data store itself, or possibly from cache.
 EmailMessage getMessage(javax.portlet.PortletRequest req, int messageNum)
          Retrieve an individual message from the mail store.
 boolean setSeenFlag(javax.portlet.PortletRequest req, long[] uids, boolean value)
          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

JavamailAccountService

public JavamailAccountService()
Method Detail

getAccountSummary

public AccountSummary getAccountSummary(javax.portlet.PortletRequest req,
                                        int start,
                                        int max,
                                        boolean refresh)
                                 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,
                               int messageNum)
Description copied from interface: IEmailAccountService
Retrieve an individual message from the mail store.

Specified by:
getMessage in interface IEmailAccountService
Parameters:
req - The current PortletRequest
messageNum - Index of the selected message
Returns:

deleteMessages

public boolean deleteMessages(javax.portlet.PortletRequest req,
                              long[] uids)
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
uids - Array of message UIDs to delete
Returns:
Success or failure

setSeenFlag

public boolean setSeenFlag(javax.portlet.PortletRequest req,
                           long[] uids,
                           boolean value)
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
value - The new value of the seen flag
Returns:
Success or failure


Copyright © 2012 Jasig. All Rights Reserved.