Package org.kuali.rice.ken.service.impl
Class NotificationServiceImpl
java.lang.Object
org.kuali.rice.ken.service.impl.NotificationServiceImpl
- All Implemented Interfaces:
NotificationService
NotificationService implementation - this is the default out-of-the-box implementation of the service.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Constructor Summary
ConstructorsConstructorDescriptionNotificationServiceImpl(DataObjectService dataObjectService, NotificationMessageContentService messageContentService, NotificationAuthorizationService notificationAuthorizationService, NotificationRecipientService notificationRecipientService, NotificationMessageDeliveryService notificationMessageDeliveryService, NotificationDao notDao) Constructs a NotificationServiceImpl class instance. -
Method Summary
Modifier and TypeMethodDescriptionvoiddismissNotificationMessageDelivery(Long id, String user, String cause) This method will "dismiss"/remove a NotificationMessageDelivery with the specified cause.voiddismissNotificationMessageDelivery(NotificationMessageDelivery nmd, String user, String cause) getNotification(Long id) This is the default implementation that uses the businessObjectDao.getNotificationsForRecipientByType(String contentTypeName, String recipientId) This is the default implementation that uses the businessObjectDao and its findMatching method.sendNotification(String notificationMessageAsXml) This method is responsible for parsing out the notification message which is sent in as a String of XML.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
-
Constructor Details
-
NotificationServiceImpl
public NotificationServiceImpl(DataObjectService dataObjectService, NotificationMessageContentService messageContentService, NotificationAuthorizationService notificationAuthorizationService, NotificationRecipientService notificationRecipientService, NotificationMessageDeliveryService notificationMessageDeliveryService, NotificationDao notDao) Constructs a NotificationServiceImpl class instance.- Parameters:
dataObjectService- persistence layer to datasource.messageContentService-notificationAuthorizationService-notificationRecipientService-notificationMessageDeliveryService-
-
-
Method Details
-
getNotification
This is the default implementation that uses the businessObjectDao.- Specified by:
getNotificationin interfaceNotificationService- Parameters:
id-- Returns:
- Notification
- See Also:
-
sendNotification
public NotificationResponseBo sendNotification(String notificationMessageAsXml) throws IOException, XmlException This method is responsible for parsing out the notification message which is sent in as a String of XML. It calls the appropriate services to validate the message content, converts it to a BO, and then passes it to another service where its content and meta-data is validated and if successful, it is saved.- Specified by:
sendNotificationin interfaceNotificationService- Parameters:
notificationMessageAsXml-- Returns:
- NotificationResponse response object
- Throws:
IOExceptionXmlException- See Also:
-
sendNotification
Description copied from interface:NotificationServiceThis method allows consumers to send notification messages. This particular service accepts the actual business object.- Specified by:
sendNotificationin interfaceNotificationService- Parameters:
notification-- Returns:
- NotificationResponse
- See Also:
-
getNotificationsForRecipientByType
This is the default implementation that uses the businessObjectDao and its findMatching method.- Specified by:
getNotificationsForRecipientByTypein interfaceNotificationService- Parameters:
contentTypeName- the name of the content typerecipientId- the recipient id- Returns:
- Collection of notifications
- See Also:
-
dismissNotificationMessageDelivery
Description copied from interface:NotificationServiceThis method will "dismiss"/remove a NotificationMessageDelivery with the specified cause.- Specified by:
dismissNotificationMessageDeliveryin interfaceNotificationService- 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)- See Also:
-
dismissNotificationMessageDelivery
public void dismissNotificationMessageDelivery(NotificationMessageDelivery nmd, String user, String cause) - See Also:
-
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).- Specified by:
takeNotificationsForResolutionin interfaceNotificationService- Returns:
- a list of available notifications that have been marked as taken by the caller
-
unlockNotification
Unlocks specified notification- Specified by:
unlockNotificationin interfaceNotificationService- Parameters:
notification- the notification object to unlock
-