public class RendererFactory extends Object
| Constructor and Description |
|---|
RendererFactory(boolean rendererPreferred)
Main constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDocumentHandlerMaker(AbstractIFDocumentHandlerMaker maker)
Add a new document handler maker.
|
void |
addDocumentHandlerMaker(String className)
Add a new document handler maker.
|
void |
addFOEventHandlerMaker(AbstractFOEventHandlerMaker maker)
Add a new FOEventHandlerMaker.
|
void |
addFOEventHandlerMaker(String className)
Add a new FOEventHandlerMaker.
|
void |
addRendererMaker(AbstractRendererMaker maker)
Add a new RendererMaker.
|
void |
addRendererMaker(String className)
Add a new RendererMaker.
|
IFDocumentHandler |
createDocumentHandler(FOUserAgent userAgent,
String outputFormat)
Creates a
IFDocumentHandler object based on the desired output format. |
FOEventHandler |
createFOEventHandler(FOUserAgent userAgent,
String outputFormat,
OutputStream out)
Creates FOEventHandler instances based on the desired output.
|
Renderer |
createRenderer(FOUserAgent userAgent,
String outputFormat)
Creates a Renderer object based on render-type desired
|
AbstractFOEventHandlerMaker |
getFOEventHandlerMaker(String mime)
Returns a FOEventHandlerMaker which handles the given MIME type.
|
AbstractRendererMaker |
getRendererMaker(String mime)
Returns a RendererMaker which handles the given MIME type.
|
boolean |
isRendererPreferred()
Indicates whether a
Renderer is preferred over a IFDocumentHandler if
both are available for the same MIME type. |
String[] |
listSupportedMimeTypes() |
public RendererFactory(boolean rendererPreferred)
rendererPreferred - Controls whether a Renderer is preferred over a
IFDocumentHandler if both are available for the same MIME type. True to prefer the
Renderer, false to prefer the IFDocumentHandler.public boolean isRendererPreferred()
Renderer is preferred over a IFDocumentHandler if
both are available for the same MIME type.Renderer is preferred,
false if the IFDocumentHandler is preferred.public void addRendererMaker(AbstractRendererMaker maker)
maker - the RendererMakerpublic void addFOEventHandlerMaker(AbstractFOEventHandlerMaker maker)
maker - the FOEventHandlerMakerpublic void addDocumentHandlerMaker(AbstractIFDocumentHandlerMaker maker)
maker - the intermediate format document handler makerpublic void addRendererMaker(String className)
className - the fully qualified class name of the RendererMakerpublic void addFOEventHandlerMaker(String className)
className - the fully qualified class name of the FOEventHandlerMakerpublic void addDocumentHandlerMaker(String className)
className - the fully qualified class name of the document handler makerpublic AbstractRendererMaker getRendererMaker(String mime)
mime - the requested output formatpublic AbstractFOEventHandlerMaker getFOEventHandlerMaker(String mime)
mime - the requested output formatpublic Renderer createRenderer(FOUserAgent userAgent, String outputFormat) throws FOPException
userAgent - the user agent for access to configurationoutputFormat - the MIME type of the output format to use (ex. "application/pdf").FOPException - if the renderer cannot be properly constructedpublic FOEventHandler createFOEventHandler(FOUserAgent userAgent, String outputFormat, OutputStream out) throws FOPException
userAgent - the user agent for access to configurationoutputFormat - the MIME type of the output format to use (ex. "application/pdf").out - the OutputStream where the output is written to (if applicable)FOPException - if the FOEventHandler cannot be properly constructedpublic IFDocumentHandler createDocumentHandler(FOUserAgent userAgent, String outputFormat) throws FOPException
IFDocumentHandler object based on the desired output format.userAgent - the user agent for access to configurationoutputFormat - the MIME type of the output format to use (ex. "application/pdf").IFDocumentHandler instanceFOPException - if the document handler cannot be properly constructedpublic String[] listSupportedMimeTypes()
Copyright © 2025 Apache Software Foundation. All rights reserved.