public interface EventHelper
Modifier and Type | Method and Description |
---|---|
void |
checkEventType(java.lang.String eventType)
Verifies the correctness of a given event type identifier
|
java.lang.String |
extractBody(java.lang.String eventAsXMLString)
Extracts the event body from an event instance in an XML format.
|
java.lang.String |
extractEventType(java.lang.String eventContent)
Extracts fully qualified event type identifier from an event instance in an XML format.
|
java.lang.String extractEventType(java.lang.String eventContent) throws NervException
<eda:Event xmlns:eda=\"http://namespaces.softwareag.com/EDA/Event\"> <eda:Header> <eda:Type>{http://namespaces.softwareag.com/EDA/WebM/Sample/Pulse}BoothDemo</eda:Type> ... </eda:Header> <eda:Body> ... </eda:Body> </eda:Event>Given the event above, this method will return: "{http://namespaces.softwareag.com/EDA/WebM/Sample/Pulse}BoothDemo"
eventContent
- An XML representation of an eventNervException
java.lang.String extractBody(java.lang.String eventAsXMLString) throws NervException
<eda:Event xmlns:eda=\"http://namespaces.softwareag.com/EDA/Event\"> <eda:Header> ... </eda:Header> <eda:Body> <p1:BoothDemo xmlns:p1=\"http://namespaces.softwareag.com/EDA/WebM/Sample/Pulse\"> <p1:PulseCommon> <p1:Producer>Event Generator</p1:Producer> ... </p1:PulseCommon> ... </p1:BoothDemo> </eda:Body> </eda:Event>Given the event above, this method will return:
<p1:BoothDemo xmlns:p1=\"http://namespaces.softwareag.com/EDA/WebM/Sample/Pulse\"> <p1:PulseCommon> <p1:Producer>Event Generator</p1:Producer> ... </p1:PulseCommon> ... </p1:BoothDemo>
eventAsXMLString
- An XML representation of an eventNervException
void checkEventType(java.lang.String eventType) throws NervException
eventType
- An event type identifier to be checkedNervException
- Thrown if a given event type identifier is incorrect