|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.rice.ken.service.impl.NotificationMessageContentServiceImpl
public class NotificationMessageContentServiceImpl
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.
NotificationMessageContentService| Field Summary | |
|---|---|
private GenericDao |
boDao
Our BusinessObjectDao persistence layer |
(package private) static String |
CONTENT_TYPE_NAMESPACE_PREFIX
Prefix that content type schemas should start with |
private static DateFormat |
DATEFORMAT_CURR_TZ
|
private static org.apache.log4j.Logger |
LOG
|
private NotificationContentTypeService |
notificationContentTypeService
NotificationContentTypeService impl |
| Constructor Summary | |
|---|---|
NotificationMessageContentServiceImpl(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. |
private Notification |
parseNotificationRequestMessage(byte[] bytes)
This method is the meat of the notification message parsing. |
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. |
private void |
validateContent(Notification notification,
String contentType,
Element contentElement,
String content)
This method validates the content of a notification message by matching up the namespace of the expected content type to the actual namespace that is passed in as part of the XML message. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final org.apache.log4j.Logger LOG
static final String CONTENT_TYPE_NAMESPACE_PREFIX
private static final DateFormat DATEFORMAT_CURR_TZ
private GenericDao boDao
private NotificationContentTypeService notificationContentTypeService
| Constructor Detail |
|---|
public NotificationMessageContentServiceImpl(GenericDao boDao,
NotificationContentTypeService notificationContentTypeService)
boDao - | Method Detail |
|---|
public Notification parseNotificationRequestMessage(String notificationMessageAsXml)
throws IOException,
InvalidXMLException
parseNotificationRequestMessage in interface NotificationMessageContentServiceIOException
InvalidXMLExceptionNotificationMessageContentService.parseNotificationRequestMessage(java.lang.String)
public Notification parseNotificationRequestMessage(InputStream stream)
throws IOException,
InvalidXMLException
parseNotificationRequestMessage in interface NotificationMessageContentServicestream - request message stream
IOException
InvalidXMLExceptionNotificationMessageContentService.parseNotificationRequestMessage(java.io.InputStream)
private Notification parseNotificationRequestMessage(byte[] bytes)
throws IOException,
InvalidXMLException
bytes -
IOException
InvalidXMLException
private void validateContent(Notification notification,
String contentType,
Element contentElement,
String content)
throws IOException,
InvalidXMLException
notification - contentType - contentElement - content -
IOException
InvalidXMLExceptionpublic String generateNotificationResponseMessage(NotificationResponse response)
generateNotificationResponseMessage in interface NotificationMessageContentServiceNotificationMessageContentService.generateNotificationResponseMessage(org.kuali.rice.ken.bo.NotificationResponse)
public String generateNotificationMessage(Notification notification,
String userRecipientId)
generateNotificationMessage in interface NotificationMessageContentServiceNotificationMessageContentService.generateNotificationMessage(org.kuali.rice.ken.bo.Notification, java.lang.String)public String generateNotificationMessage(Notification notification)
generateNotificationMessage in interface NotificationMessageContentServiceNotificationMessageContentService.generateNotificationMessage(org.kuali.rice.ken.bo.Notification)
public Notification parseSerializedNotificationXml(byte[] xmlAsBytes)
throws Exception
parseSerializedNotificationXml in interface NotificationMessageContentServiceExceptionorg.kuali.rice.ken.service.NotificationMessageContentService#parseNotificationXml(byte[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||