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(org.kuali.rice.core.framework.persistence.dao.GenericDao boDao, NotificationContentTypeService notificationContentTypeService)
          Constructor which takes a GenericDao Constructs a NotificationMessageContentServiceImpl.java.
 
Method Summary
 String generateNotificationMessage(Notification notification)
          This method will marshall out the Notification object as a String of XML, using XStream.
 String generateNotificationMessage(Notification 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(NotificationResponse response)
          This method will marshall out the NotificationResponse object as a String of XML, using XStream.
 Notification parseNotificationRequestMessage(InputStream stream)
          This method implements by taking in an InputStream and then coverting that to a byte[].
 Notification parseNotificationRequestMessage(String notificationMessageAsXml)
          This method implements by taking in a String and then converting that to a byte[];
 Notification 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(org.kuali.rice.core.framework.persistence.dao.GenericDao boDao,
                                             NotificationContentTypeService notificationContentTypeService)
Constructor which takes a GenericDao Constructs a NotificationMessageContentServiceImpl.java.

Parameters:
boDao -
Method Detail

parseNotificationRequestMessage

public Notification parseNotificationRequestMessage(String notificationMessageAsXml)
                                             throws IOException,
                                                    org.kuali.rice.core.util.xml.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
org.kuali.rice.core.util.xml.XmlException
See Also:
NotificationMessageContentService.parseNotificationRequestMessage(java.lang.String)

parseNotificationRequestMessage

public Notification parseNotificationRequestMessage(InputStream stream)
                                             throws IOException,
                                                    org.kuali.rice.core.util.xml.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
org.kuali.rice.core.util.xml.XmlException
See Also:
NotificationMessageContentService.parseNotificationRequestMessage(java.io.InputStream)

generateNotificationResponseMessage

public String generateNotificationResponseMessage(NotificationResponse 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.NotificationResponse)

generateNotificationMessage

public String generateNotificationMessage(Notification 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.Notification, java.lang.String)

generateNotificationMessage

public String generateNotificationMessage(Notification 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.Notification)

parseSerializedNotificationXml

public Notification 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 © 2004-2011 The Kuali Foundation. All Rights Reserved.