Class RendererFactory

java.lang.Object
com.aquima.interactions.framework.documents.RendererFactory
All Implemented Interfaces:
IRendererFactory

public class RendererFactory extends Object implements IRendererFactory
Renderer factory, with constructor based creation.
Since:
6.1
Author:
J. van Leuven
  • Constructor Details

    • RendererFactory

      public RendererFactory(Map<Object,IDocumentRenderer> renderers)
      Constructs a renderer factory with a map of key=outputformat and value IDocumentRenderer instances. (This factory does not support versioning and such.)
      Parameters:
      renderers - a map of outputformat to renderer factory implementation
  • Method Details

    • getOutputFormats

      public OutputFormat[] getOutputFormats()
      Description copied from interface: IRendererFactory
      This method returns the output formats that are supported by the renderer factory.
      Specified by:
      getOutputFormats in interface IRendererFactory
      Returns:
      Array containing the output formats that are supported by the renderer factory.
    • getRenderer

      public IDocumentRenderer getRenderer(IResourceManager manager, String documentName, OutputFormat[] formats)
      Description copied from interface: IRendererFactory
      This method returns the document renderer for the specified format.
      Specified by:
      getRenderer in interface IRendererFactory
      Parameters:
      manager - A resource manager that can be used to initialize a renderer.
      documentName - The name of the document for which a renderer is requested.
      formats - The output format(s) for which a renderer is requested.
      Returns:
      The document renderer for the specified output format.