Package org.kuali.rice.ken.service.impl
Class NotificationMessageContentServiceImpl
java.lang.Object
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:
-
Constructor Summary
ConstructorsConstructorDescriptionNotificationMessageContentServiceImpl(org.kuali.rice.krad.data.DataObjectService dataObjectService, NotificationContentTypeService notificationContentTypeService, org.kuali.rice.core.framework.security.XStreamSecurityService xStreamSecurityService) Constructor which takes aDataObjectService -
Method Summary
Modifier and TypeMethodDescriptiongenerateNotificationMessage(NotificationBo notification) This method will marshall out the Notification object as a String of XML, using XStream.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.This method will marshall out the NotificationResponse object as a String of XML, using XStream.This method implements by taking in an InputStream and then coverting that to a byte[].parseNotificationRequestMessage(String notificationMessageAsXml) This method implements by taking in a String and then converting that to a byte[];parseSerializedNotificationXml(byte[] xmlAsBytes) Uses XPath to parse out the serialized Notification xml into a Notification instance.
-
Constructor Details
-
NotificationMessageContentServiceImpl
public NotificationMessageContentServiceImpl(org.kuali.rice.krad.data.DataObjectService dataObjectService, NotificationContentTypeService notificationContentTypeService, org.kuali.rice.core.framework.security.XStreamSecurityService xStreamSecurityService) Constructor which takes aDataObjectService- Parameters:
dataObjectService- persistence layernotificationContentTypeService-NotificationContentTypeService
-
-
Method Details
-
parseNotificationRequestMessage
public NotificationBo parseNotificationRequestMessage(String notificationMessageAsXml) throws IOException, org.kuali.rice.core.api.util.xml.XmlException This method implements by taking in a String and then converting that to a byte[];- Specified by:
parseNotificationRequestMessagein interfaceNotificationMessageContentService- Parameters:
notificationMessageAsXml-- Returns:
- Throws:
IOExceptionorg.kuali.rice.core.api.util.xml.XmlException- See Also:
-
parseNotificationRequestMessage
public NotificationBo parseNotificationRequestMessage(InputStream stream) throws IOException, org.kuali.rice.core.api.util.xml.XmlException This method implements by taking in an InputStream and then coverting that to a byte[].- Specified by:
parseNotificationRequestMessagein interfaceNotificationMessageContentService- Parameters:
stream- request message stream- Returns:
- Notification business object
- Throws:
IOExceptionorg.kuali.rice.core.api.util.xml.XmlException- See Also:
-
generateNotificationResponseMessage
This method will marshall out the NotificationResponse object as a String of XML, using XStream.- Specified by:
generateNotificationResponseMessagein interfaceNotificationMessageContentService- Parameters:
response-- Returns:
- String XML representation of a Notification response object
- See Also:
-
generateNotificationMessage
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:
generateNotificationMessagein interfaceNotificationMessageContentService- Parameters:
notification-userRecipientId-- Returns:
- String of XML.
- See Also:
-
generateNotificationMessage
This method will marshall out the Notification object as a String of XML, using XStream.- Specified by:
generateNotificationMessagein interfaceNotificationMessageContentService- Parameters:
notification-- Returns:
- String of XML.
- See Also:
-
parseSerializedNotificationXml
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:
parseSerializedNotificationXmlin interfaceNotificationMessageContentService- Parameters:
xmlAsBytes-- Returns:
- Notification
-