org.kuali.rice.ken.service
Interface NotificationService

All Known Implementing Classes:
NotificationServiceImpl

public interface NotificationService

The NotificationService class is responsible for processing notification messages that come into the system. It also is able to retrieve notifications that have already been entered/processed by the system.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Method Summary
 void dismissNotificationMessageDelivery(Long id, String user, String cause)
          This method will "dismiss"/remove a NotificationMessageDelivery with the specified cause.
 Notification getNotification(Long id)
          This method will retrieve a Notification object from the system, given the id of the actual notification record.
 Collection<Notification> getNotificationsForRecipientByType(String contentTypeName, String recipientId)
          This method will retrieve a collection of notifications given a contentTypeName and recipientId.
 NotificationResponse sendNotification(Notification notification)
          This method allows consumers to send notification messages.
 NotificationResponse sendNotification(String notificationMessageAsXml)
          This method allows consumers to send notification messages.
 Collection<Notification> takeNotificationsForResolution()
          This method is responsible for atomically finding all untaken, unresolved notifications that are ready to be sent, marking them as taken and returning them to the caller for processing.
 void unlockNotification(Notification notification)
          Unlocks specified notification
 

Method Detail

sendNotification

NotificationResponse sendNotification(String notificationMessageAsXml)
                                      throws IOException,
                                             XmlException
This method allows consumers to send notification messages. This particular service accepts the XML format of the notification and then marshals it out into the actual business object construct, for further processing. The response is also sent back as a String of XML.

Parameters:
notificationMessageAsXml -
Returns:
NotificationResponse response object
Throws:
IOException
XmlException

sendNotification

NotificationResponse sendNotification(Notification notification)
This method allows consumers to send notification messages. This particular service accepts the actual business object.

Parameters:
notification -
Returns:
NotificationResponse

getNotification

Notification getNotification(Long id)
This method will retrieve a Notification object from the system, given the id of the actual notification record.

Parameters:
id -
Returns:
Notification

getNotificationsForRecipientByType

Collection<Notification> getNotificationsForRecipientByType(String contentTypeName,
                                                            String recipientId)
This method will retrieve a collection of notifications given a contentTypeName and recipientId.

Parameters:
contentTypeName - the name of the content type
recipientId - the recipient id
Returns:
Collection of notifications

dismissNotificationMessageDelivery

void dismissNotificationMessageDelivery(Long id,
                                        String user,
                                        String cause)
This method will "dismiss"/remove a NotificationMessageDelivery with the specified cause.

Parameters:
id - the id of the NotificationMessageDelivery that was acted upon
user - the user or entity that performed the dismissal
cause - the cause of the dismissal (e.g. an end user action or auto-removal by the system)

takeNotificationsForResolution

Collection<Notification> takeNotificationsForResolution()
This method is responsible for atomically finding all untaken, unresolved notifications that are ready to be sent, marking them as taken and returning them to the caller for processing. NOTE: it is important that this method execute in a SEPARATE dedicated transaction; either the caller should NOT be wrapped by Spring declarative transaction and this service should be wrapped (which is the case), or the caller should arrange to invoke this from within a newly created transaction).

Returns:
a list of notifications to be resolved that have been marked as taken by the caller

unlockNotification

void unlockNotification(Notification notification)
Unlocks specified notification

Parameters:
notification - the notification object to unlock


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.