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

Constructor Summary
DemoAccountService()
           
 
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.
 void setJsonLocation(String jsonLocation)
           
 boolean setSeenFlag(javax.portlet.PortletRequest req, long[] uids, 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)
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,
                               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 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


Copyright © 2012 Jasig. All Rights Reserved.