Modifier and Type | Field and Description |
---|---|
static String |
JAXP_SCHEMA_LANGUAGE |
static NamespaceContext |
NOTIFICATION_NAMESPACE_CONTEXT |
static String |
W3C_XML_SCHEMA |
Modifier and Type | Method and Description |
---|---|
static NotificationBo |
cloneNotificationWithoutObjectReferences(NotificationBo notification)
This method will clone a given Notification object, one level deep, returning a fresh new instance
without any references.
|
static Element |
getChildElement(Node parent,
String name)
Returns a node child with the specified tag name of the specified parent node,
or null if no such child node is found.
|
static String |
getCurrentDateTime()
Returns the current date formatted for the UI
|
static EntityResolver |
getNotificationEntityResolver(NotificationContentTypeService notificationContentTypeService)
Returns an EntityResolver to resolve XML entities (namely schema resources) in the notification system
|
static NamespaceContext |
getNotificationNamespaceContext(Document doc)
Returns a compound NamespaceContext that defers to the preconfigured notification namespace context
first, then delegates to the document prefix/namespace definitions second.
|
static String |
getNotificationSystemUser() |
static Document |
parse(InputSource source,
boolean validate,
boolean namespaceAware,
EntityResolver entityResolver)
This method uses DOM to parse the input source of XML.
|
static Date |
parseUIDateTime(String s)
Parses the string in UI date time format
|
static Document |
parseWithNotificationEntityResolver(InputSource source,
boolean validate,
boolean namespaceAware,
NotificationContentTypeService notificationContentTypeService)
This method uses DOM to parse the input source of XML, supplying a notification-system-specific
entity resolver.
|
static Date |
parseXSDDateTime(String dateTimeString)
Parses a date/time string under XSD dateTime type syntax
|
static <T> T |
retrieveFieldReference(String fieldName,
String keyName,
String keyValue,
Class clazz,
GenericDao boDao)
This method generically retrieves a reference to foreign key objects that are part of the content, to get
at the reference objects' pk fields so that those values can be used to store the notification with proper
foreign key relationships in the database.
|
static String |
toUIDateTimeString(Date d)
Returns the specified date formatted for the UI
|
static String |
toXSDDateTimeString(Date d)
Formats a Date into XSD dateTime format
|
static String |
transformContent(NotificationBo notification)
transformContent - transforms xml content in notification to a string
using the xsl in the datastore for a given documentType
|
public static final String JAXP_SCHEMA_LANGUAGE
public static final String W3C_XML_SCHEMA
public static final NamespaceContext NOTIFICATION_NAMESPACE_CONTEXT
public static String getNotificationSystemUser()
public static Date parseXSDDateTime(String dateTimeString) throws ParseException
dateTimeString
- an XSD dateTime-formatted StringParseException
- if an error occurs during parsingZULU_FORMAT
public static String toXSDDateTimeString(Date d)
d
- the date value to formatpublic static String getCurrentDateTime()
public static String toUIDateTimeString(Date d)
public static Date parseUIDateTime(String s) throws ParseException
ParseException
public static NamespaceContext getNotificationNamespaceContext(Document doc)
doc
- the Document to use for prefix/namespace resolutionpublic static EntityResolver getNotificationEntityResolver(NotificationContentTypeService notificationContentTypeService)
notificationContentTypeService
- the NotificationContentTypeServicepublic static String transformContent(NotificationBo notification)
notification
- public static Document parse(InputSource source, boolean validate, boolean namespaceAware, EntityResolver entityResolver) throws ParserConfigurationException, IOException, SAXException
source
- the input sourcevalidate
- whether to turn on validationnamespaceAware
- whether to turn on namespace awarenessParserConfigurationException
IOException
SAXException
public static Document parseWithNotificationEntityResolver(InputSource source, boolean validate, boolean namespaceAware, NotificationContentTypeService notificationContentTypeService) throws ParserConfigurationException, IOException, SAXException
source
- the input sourcevalidate
- whether to turn on validationnamespaceAware
- whether to turn on namespace awarenessParserConfigurationException
IOException
SAXException
public static Element getChildElement(Node parent, String name)
parent
- the parent nodename
- the name of the child nodepublic static final NotificationBo cloneNotificationWithoutObjectReferences(NotificationBo notification)
notification
- the object to clonepublic static <T> T retrieveFieldReference(String fieldName, String keyName, String keyValue, Class clazz, GenericDao boDao) throws IllegalArgumentException
T
- fieldName
- keyName
- keyValue
- clazz
- boDao
- IllegalArgumentException
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.