org.kuali.rice.ken.service.impl
Class NotificationMessageContentServiceImpl

java.lang.Object
  extended by org.kuali.rice.ken.service.impl.NotificationMessageContentServiceImpl
All Implemented Interfaces:
NotificationMessageContentService

public class NotificationMessageContentServiceImpl
extends Object
implements NotificationMessageContentService

NotificationMessageContentService implementation - uses both Xalan and XStream in various places to manage the marshalling/unmarshalling of Notification data for processing by various components in the system.

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

Constructor Summary
NotificationMessageContentServiceImpl(GenericDao boDao, NotificationContentTypeService notificationContentTypeService)
          Constructor which takes a GenericDao Constructs a NotificationMessageContentServiceImpl.java.
 
Method Summary
 String generateNotificationMessage(NotificationBo notification)
          This method will marshall out the Notification object as a String of XML, using XStream.
 String generateNotificationMessage(NotificationBo notification, String userRecipientId)
          This method will marshall out the Notification object as a String of XML, using XStream and replaces the full recipient list with just a single recipient.
 String generateNotificationResponseMessage(NotificationResponseBo response)
          This method will marshall out the NotificationResponse object as a String of XML, using XStream.
 NotificationBo parseNotificationRequestMessage(InputStream stream)
          This method implements by taking in an InputStream and then coverting that to a byte[].
 NotificationBo parseNotificationRequestMessage(String notificationMessageAsXml)
          This method implements by taking in a String and then converting that to a byte[];
 NotificationBo parseSerializedNotificationXml(byte[] xmlAsBytes)
          Uses XPath to parse out the serialized Notification xml into a Notification instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotificationMessageContentServiceImpl

public NotificationMessageContentServiceImpl(GenericDao boDao,
                                             NotificationContentTypeService notificationContentTypeService)
Constructor which takes a GenericDao Constructs a NotificationMessageContentServiceImpl.java.

Parameters:
boDao -
Method Detail

parseNotificationRequestMessage

public NotificationBo parseNotificationRequestMessage(String notificationMessageAsXml)
                                               throws IOException,
                                                      XmlException
This method implements by taking in a String and then converting that to a byte[];

Specified by:
parseNotificationRequestMessage in interface NotificationMessageContentService
Returns:
Throws:
IOException
XmlException
See Also:
NotificationMessageContentService.parseNotificationRequestMessage(java.lang.String)

parseNotificationRequestMessage

public NotificationBo parseNotificationRequestMessage(InputStream stream)
                                               throws IOException,
                                                      XmlException
This method implements by taking in an InputStream and then coverting that to a byte[].

Specified by:
parseNotificationRequestMessage in interface NotificationMessageContentService
Parameters:
stream - request message stream
Returns:
Notification business object
Throws:
IOException
XmlException
See Also:
NotificationMessageContentService.parseNotificationRequestMessage(java.io.InputStream)

generateNotificationResponseMessage

public String generateNotificationResponseMessage(NotificationResponseBo response)
This method will marshall out the NotificationResponse object as a String of XML, using XStream.

Specified by:
generateNotificationResponseMessage in interface NotificationMessageContentService
Returns:
String XML representation of a Notification response object
See Also:
NotificationMessageContentService.generateNotificationResponseMessage(org.kuali.rice.ken.bo.NotificationResponseBo)

generateNotificationMessage

public String generateNotificationMessage(NotificationBo notification,
                                          String userRecipientId)
This method will marshall out the Notification object as a String of XML, using XStream and replaces the full recipient list with just a single recipient.

Specified by:
generateNotificationMessage in interface NotificationMessageContentService
Returns:
String of XML.
See Also:
NotificationMessageContentService.generateNotificationMessage(org.kuali.rice.ken.bo.NotificationBo, java.lang.String)

generateNotificationMessage

public String generateNotificationMessage(NotificationBo notification)
This method will marshall out the Notification object as a String of XML, using XStream.

Specified by:
generateNotificationMessage in interface NotificationMessageContentService
Returns:
String of XML.
See Also:
NotificationMessageContentService.generateNotificationMessage(org.kuali.rice.ken.bo.NotificationBo)

parseSerializedNotificationXml

public NotificationBo parseSerializedNotificationXml(byte[] xmlAsBytes)
                                              throws Exception
Uses XPath to parse out the serialized Notification xml into a Notification instance. Warning: this method does NOT validate the payload content XML

Specified by:
parseSerializedNotificationXml in interface NotificationMessageContentService
Returns:
Notification
Throws:
Exception
See Also:
org.kuali.rice.ken.service.NotificationMessageContentService#parseNotificationXml(byte[])


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