Class XmlRendererContext
java.lang.Object
com.aquima.interactions.framework.renderer.RendererContextBase
com.aquima.interactions.framework.renderer.XmlRendererContext
- All Implemented Interfaces:
IRendererContext
,IXmlRendererContext
This class provides context information to the renderers.
- Since:
- 6.0
- Author:
- F. van der Meer
-
Constructor Summary
ConstructorsConstructorDescriptionXmlRendererContext
(Map<String, IElementRenderer> converters, ApplicationID applicationId, ILanguage language, ILanguage defaultLanguage, IParameters parameters, IXmlElementRenderer defaultRenderer, IRuntimeKeyPrinter printer) Constructs the context with the required arguments. -
Method Summary
Modifier and TypeMethodDescriptionThis function processes the element into an IXMLElement using the converters defined in the renderer.processChildren
(IElement parentElement) Processes the childs of the passed element into xml.Methods inherited from class com.aquima.interactions.framework.renderer.RendererContextBase
getApplicationID, getDefaultLanguage, getHandlerByClass, getLanguage, getParameters, getRuntimeKeyPrinter, locateRenderer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.aquima.interactions.framework.renderer.IRendererContext
getApplicationID, getDefaultLanguage, getLanguage, getParameters, getRuntimeKeyPrinter
-
Constructor Details
-
XmlRendererContext
public XmlRendererContext(Map<String, IElementRenderer> converters, ApplicationID applicationId, ILanguage language, ILanguage defaultLanguage, IParameters parameters, IXmlElementRenderer defaultRenderer, IRuntimeKeyPrinter printer) Constructs the context with the required arguments.- Parameters:
converters
- Map containing the converters for the supported page elements, may not be null.applicationId
- The ID of the application for which the conversion is done, may not be null.language
- The language that should be used, may not be null.defaultLanguage
- The language that should be used when an element does not have a value for the main language, may not be null.parameters
- Additional parameters for the context, may not be null.defaultRenderer
- Optional default renderer, will be used when renderer could be found, may be null.printer
- Optional runtime key printer, may be null.
-
-
Method Details
-
process
Description copied from interface:IXmlRendererContext
This function processes the element into an IXMLElement using the converters defined in the renderer.- Specified by:
process
in interfaceIXmlRendererContext
- Parameters:
element
- The element to convert to xml.- Returns:
- A converted element, or null when the element should not be displayed.
-
processChildren
Description copied from interface:IXmlRendererContext
Processes the childs of the passed element into xml. The resulting array can be zero-length.- Specified by:
processChildren
in interfaceIXmlRendererContext
- Parameters:
parentElement
- The element of who it's children should be converter.- Returns:
- The IXMLElement[] array after conversion. This array can be zero-length but should never be null
-