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 Summary
Constructors Constructor Description RendererFactory(Map<Object,IDocumentRenderer> renderers)
Constructs a renderer factory with a map of key=outputformat and value IDocumentRenderer instances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OutputFormat[]
getOutputFormats()
This method returns the output formats that are supported by the renderer factory.IDocumentRenderer
getRenderer(IResourceManager manager, String documentName, OutputFormat[] formats)
This method returns the document renderer for the specified format.
-
-
-
Constructor Detail
-
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 Detail
-
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 interfaceIRendererFactory
- Returns:
- Array containing the output formats that are supported by the renderer factory.
-
getRenderer
public IDocumentRenderer getRenderer(IResourceManager manager, String documentName, OutputFormat[] formats) throws UnsupportedOutputFormatException
Description copied from interface:IRendererFactory
This method returns the document renderer for the specified format.- Specified by:
getRenderer
in interfaceIRendererFactory
- 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.
- Throws:
UnsupportedOutputFormatException
- This exception is thrown when no renderer is available for the requested output format.
-
-