Package 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
Modifier and TypeMethodDescriptionvoiddismissNotificationMessageDelivery(Long id, String user, String cause) This method will "dismiss"/remove a NotificationMessageDelivery with the specified cause.getNotification(Long id) This method will retrieve a Notification object from the system, given the id of the actual notification record.getNotificationsForRecipientByType(String contentTypeName, String recipientId) This method will retrieve a collection of notifications given a contentTypeName and recipientId.sendNotification(String notificationMessageAsXml) This method allows consumers to send notification messages.sendNotification(NotificationBo notification) This method allows consumers to send notification messages.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.voidunlockNotification(NotificationBo notification) Unlocks specified notification
-
Method Details
-
sendNotification
NotificationResponseBo sendNotification(String notificationMessageAsXml) throws IOException, org.kuali.rice.core.api.util.xml.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:
IOExceptionorg.kuali.rice.core.api.util.xml.XmlException
-
sendNotification
This method allows consumers to send notification messages. This particular service accepts the actual business object.- Parameters:
notification-- Returns:
- NotificationResponse
-
getNotification
This method will retrieve a Notification object from the system, given the id of the actual notification record.- Parameters:
id-- Returns:
- Notification
-
getNotificationsForRecipientByType
Collection<NotificationBo> 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 typerecipientId- the recipient id- Returns:
- Collection of notifications
-
dismissNotificationMessageDelivery
This method will "dismiss"/remove a NotificationMessageDelivery with the specified cause.- Parameters:
id- the id of the NotificationMessageDelivery that was acted uponuser- the user or entity that performed the dismissalcause- the cause of the dismissal (e.g. an end user action or auto-removal by the system)
-
takeNotificationsForResolution
Collection<NotificationBo> 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
Unlocks specified notification- Parameters:
notification- the notification object to unlock
-