Class DefaultRendererFactory
- java.lang.Object
-
- com.aquima.interactions.framework.documents.DefaultRendererFactory
-
- All Implemented Interfaces:
IRendererFactory
public class DefaultRendererFactory extends Object implements IRendererFactory
Renderer factory implementation that provides the default supported document renderer (IBex).
This default renderer uses the XmlDocumentRenderer as default xml renderer. Use the setXmlRenderer method to override the xml renderer.
- Since:
- 6.0
- Author:
- Jon van Leuven, O. Kerpershoek
- See Also:
The default renderer that is used.
-
-
Constructor Summary
Constructors Constructor Description DefaultRendererFactory()
DefaultRendererFactory(IDocumentsProperties documentsProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getDocumentsBaseFolder()
OutputFormat[]
getOutputFormats()
This method returns the output formats that are supported by the renderer factory.IDocumentRenderer
getRenderer(IResourceManager manager, String documentName, OutputFormat[] formats)
Gets the renderer for the documentvoid
setConfig(String config)
Set the config resource.protected void
setDocumentsBaseFolder(IDocumentsProperties documentsProperties)
void
setStylesheet(String stylesheet)
Set the stylesheet resource.void
setXmlRenderer(IXmlRenderer xmlRenderer)
Set the xmlRenderer.
-
-
-
Constructor Detail
-
DefaultRendererFactory
public DefaultRendererFactory()
-
DefaultRendererFactory
public DefaultRendererFactory(IDocumentsProperties documentsProperties)
-
-
Method Detail
-
setDocumentsBaseFolder
protected void setDocumentsBaseFolder(IDocumentsProperties documentsProperties)
-
getDocumentsBaseFolder
protected String getDocumentsBaseFolder()
-
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
Gets the renderer for the document- Specified by:
getRenderer
in interfaceIRendererFactory
- Parameters:
manager
- The resource manager to use, may be nulldocumentName
- name of the document, may be nullformats
- the outputformat(s) to render to, can not be null- Returns:
- this.renderer the document renderer
- Throws:
UnsupportedOutputFormatException
- This exception is thrown when no renderer is available for the requested output format.
-
setStylesheet
public void setStylesheet(String stylesheet)
Set the stylesheet resource. The default resource is documents/ibex/styles.xsl- Parameters:
stylesheet
- The style sheet resource.
-
setConfig
public void setConfig(String config)
Set the config resource. The default resource is documents/ibex/ibex-config.xml- Parameters:
config
- The config sheet resource.
-
setXmlRenderer
public void setXmlRenderer(IXmlRenderer xmlRenderer)
Set the xmlRenderer.- Parameters:
xmlRenderer
- The document xml renderer to be used for document rendering.
-
-