Class XmlRendererContext

java.lang.Object
com.aquima.interactions.framework.renderer.RendererContextBase
com.aquima.interactions.framework.renderer.XmlRendererContext
All Implemented Interfaces:
IRendererContext, IXmlRendererContext

public class XmlRendererContext extends RendererContextBase implements IXmlRendererContext
This class provides context information to the renderers.
Since:
6.0
Author:
F. van der Meer
  • 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

      public IXmlElement process(IElement element)
      Description copied from interface: IXmlRendererContext
      This function processes the element into an IXMLElement using the converters defined in the renderer.
      Specified by:
      process in interface IXmlRendererContext
      Parameters:
      element - The element to convert to xml.
      Returns:
      A converted element, or null when the element should not be displayed.
    • processChildren

      public IXmlElement[] processChildren(IElement parentElement)
      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 interface IXmlRendererContext
      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