public class EventRendererImpl extends Object implements EventRenderer
EventBean
events.Constructor and Description |
---|
EventRendererImpl() |
Modifier and Type | Method and Description |
---|---|
JSONEventRenderer |
getJSONRenderer(EventType eventType)
Returns a render for the JSON format, valid only for the given event type and its subtypes.
|
JSONEventRenderer |
getJSONRenderer(EventType eventType,
JSONRenderingOptions options)
Returns a render for the JSON format, valid only for the given event type and its subtypes.
|
XMLEventRenderer |
getXMLRenderer(EventType eventType)
Returns a render for the XML format, valid only for the given event type and its subtypes.
|
XMLEventRenderer |
getXMLRenderer(EventType eventType,
XMLRenderingOptions options)
Returns a render for the XML format, valid only for the given event type and its subtypes.
|
String |
renderJSON(String title,
EventBean theEvent)
Quick-access method to render a given event in the JSON format.
|
String |
renderJSON(String title,
EventBean theEvent,
JSONRenderingOptions options)
Quick-access method to render a given event in the JSON format.
|
String |
renderXML(String rootElementName,
EventBean theEvent)
Quick-access method to render a given event in the XML format.
|
String |
renderXML(String rootElementName,
EventBean theEvent,
XMLRenderingOptions options)
Quick-access method to render a given event in the XML format.
|
public JSONEventRenderer getJSONRenderer(EventType eventType, JSONRenderingOptions options)
getJSONRenderer
in interface EventRenderer
eventType
- to return renderer foroptions
- rendering optionspublic JSONEventRenderer getJSONRenderer(EventType eventType)
getJSONRenderer
in interface EventRenderer
eventType
- to return renderer forpublic String renderJSON(String title, EventBean theEvent)
Use the #getJSONRenderer to obtain a renderer instance that allows repeated rendering of the same type of event. For performance reasons obtaining a dedicated renderer instance is the preferred method compared to repeated rendering via this method.
renderJSON
in interface EventRenderer
title
- the JSON root titletheEvent
- the event to renderpublic String renderJSON(String title, EventBean theEvent, JSONRenderingOptions options)
Use the #getJSONRenderer to obtain a renderer instance that allows repeated rendering of the same type of event. For performance reasons obtaining a dedicated renderer instance is the preferred method compared to repeated rendering via this method.
renderJSON
in interface EventRenderer
title
- the JSON root titletheEvent
- the event to renderoptions
- are JSON rendering optionspublic XMLEventRenderer getXMLRenderer(EventType eventType)
getXMLRenderer
in interface EventRenderer
eventType
- to return renderer forpublic XMLEventRenderer getXMLRenderer(EventType eventType, XMLRenderingOptions options)
getXMLRenderer
in interface EventRenderer
eventType
- to return renderer foroptions
- rendering optionspublic String renderXML(String rootElementName, EventBean theEvent)
Use the #getXMLRenderer to obtain a renderer instance that allows repeated rendering of the same type of event. For performance reasons obtaining a dedicated renderer instance is the preferred method compared to repeated rendering via this method.
renderXML
in interface EventRenderer
rootElementName
- the root element name that may also include namespace informationtheEvent
- the event to renderpublic String renderXML(String rootElementName, EventBean theEvent, XMLRenderingOptions options)
Use the #getXMLRenderer to obtain a renderer instance that allows repeated rendering of the same type of event. For performance reasons obtaining a dedicated renderer instance is the preferred method compared to repeated rendering via this method.
renderXML
in interface EventRenderer
rootElementName
- the root element name that may also include namespace informationtheEvent
- the event to renderoptions
- are XML rendering options