Class NotificationServiceImpl

java.lang.Object
org.kuali.rice.ken.service.impl.NotificationServiceImpl
All Implemented Interfaces:
NotificationService

public class NotificationServiceImpl extends Object implements NotificationService
NotificationService implementation - this is the default out-of-the-box implementation of the service.
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Constructor Details

  • Method Details

    • getNotification

      public NotificationBo getNotification(Long id)
      This is the default implementation that uses the businessObjectDao.
      Specified by:
      getNotification in interface NotificationService
      Parameters:
      id -
      Returns:
      Notification
      See Also:
    • sendNotification

      public NotificationResponseBo sendNotification(String notificationMessageAsXml) throws IOException, org.kuali.rice.core.api.util.xml.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:
      sendNotification in interface NotificationService
      Parameters:
      notificationMessageAsXml -
      Returns:
      NotificationResponse response object
      Throws:
      IOException
      org.kuali.rice.core.api.util.xml.XmlException
      See Also:
    • sendNotification

      public NotificationResponseBo sendNotification(NotificationBo notification)
      Description copied from interface: NotificationService
      This method allows consumers to send notification messages. This particular service accepts the actual business object.
      Specified by:
      sendNotification in interface NotificationService
      Parameters:
      notification -
      Returns:
      NotificationResponse
      See Also:
    • getNotificationsForRecipientByType

      public Collection getNotificationsForRecipientByType(String contentTypeName, String recipientId)
      This is the default implementation that uses the businessObjectDao and its findMatching method.
      Specified by:
      getNotificationsForRecipientByType in interface NotificationService
      Parameters:
      contentTypeName - the name of the content type
      recipientId - the recipient id
      Returns:
      Collection of notifications
      See Also:
    • dismissNotificationMessageDelivery

      public void dismissNotificationMessageDelivery(Long id, String user, String cause)
      Description copied from interface: NotificationService
      This method will "dismiss"/remove a NotificationMessageDelivery with the specified cause.
      Specified by:
      dismissNotificationMessageDelivery in interface NotificationService
      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)
      See Also:
      • invalid reference
        org.kuali.rice.ken.service.NotificationService#dismissNotificationMessageDelivery(java.lang.Long, java.lang.String)
    • dismissNotificationMessageDelivery

      public void dismissNotificationMessageDelivery(NotificationMessageDelivery nmd, String user, String cause)
      See Also:
      • invalid reference
        org.kuali.rice.ken.service.NotificationService#dismissNotificationMessageDelivery(org.kuali.rice.ken.bo.NotificationMessageDelivery, java.lang.String, java.lang.String)
    • takeNotificationsForResolution

      public 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).
      Specified by:
      takeNotificationsForResolution in interface NotificationService
      Returns:
      a list of available notifications that have been marked as taken by the caller
    • unlockNotification

      public void unlockNotification(NotificationBo notification)
      Unlocks specified notification
      Specified by:
      unlockNotification in interface NotificationService
      Parameters:
      notification - the notification object to unlock