org.jasig.portlet.notice.service
Interface INotificationService

All Known Implementing Classes:
AbstractNotificationService, CacheNotificationService, DemoNotificationService

public interface INotificationService

This is the interface used to retrieve notifications from a notifications data source.


Method Summary
 NotificationResponse fetchNotificationsFromSource(javax.portlet.PortletRequest req)
          Gathers the collection of notifications for the user associated with the srequest.
 String getName()
          Returns the name of the service, which should be unique in the portlet app.
 NotificationResponse getNotifications(String notificationsContextName, String remoteUser, javax.portlet.PortletRequest req)
          Most implementations need do nothing special with this method.
 void refreshNotifications(String notificationsContextName, String remoteUser)
          After calling this method, the next call to getNotifications will cause the notifications to be fetched from their source(s), not from cache.
 

Method Detail

getName

String getName()
Returns the name of the service, which should be unique in the portlet app.

Returns:
String.

getNotifications

NotificationResponse getNotifications(String notificationsContextName,
                                      String remoteUser,
                                      javax.portlet.PortletRequest req)
                                      throws NotificationServiceException
Most implementations need do nothing special with this method. They can extend AbstractNotificationService. Special service impls (such as caching) may want to override it.

Parameters:
notificationsContextName - Configured in the -portlet.xml Spring file
remoteUser - From req.getRemoteUser
req - The PortletRequest
Returns:
NotificationResponse
Throws:
NotificationServiceException

refreshNotifications

void refreshNotifications(String notificationsContextName,
                          String remoteUser)
After calling this method, the next call to getNotifications will cause the notifications to be fetched from their source(s), not from cache.

Parameters:
notificationsContextName -
remoteUser -

fetchNotificationsFromSource

NotificationResponse fetchNotificationsFromSource(javax.portlet.PortletRequest req)
                                                  throws NotificationServiceException
Gathers the collection of notifications for the user associated with the srequest.

Parameters:
req - The PortletRequest
Returns:
NotificationResponse
Throws:
NotificationServiceException


Copyright © 2012 Jasig. All Rights Reserved.