public class RendererFactory
extends java.lang.Object
Constructor and Description |
---|
RendererFactory()
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addDocumentHandlerMaker(AbstractIFDocumentHandlerMaker maker)
Add a new document handler maker.
|
void |
addDocumentHandlerMaker(java.lang.String className)
Add a new document handler maker.
|
void |
addFOEventHandlerMaker(AbstractFOEventHandlerMaker maker)
Add a new FOEventHandlerMaker.
|
void |
addFOEventHandlerMaker(java.lang.String className)
Add a new FOEventHandlerMaker.
|
void |
addRendererMaker(AbstractRendererMaker maker)
Add a new RendererMaker.
|
void |
addRendererMaker(java.lang.String className)
Add a new RendererMaker.
|
IFDocumentHandler |
createDocumentHandler(FOUserAgent userAgent,
java.lang.String outputFormat)
Creates a
IFDocumentHandler object based on the desired output format. |
FOEventHandler |
createFOEventHandler(FOUserAgent userAgent,
java.lang.String outputFormat,
java.io.OutputStream out)
Creates FOEventHandler instances based on the desired output.
|
Renderer |
createRenderer(FOUserAgent userAgent,
java.lang.String outputFormat)
Creates a Renderer object based on render-type desired
|
AbstractIFDocumentHandlerMaker |
getDocumentHandlerMaker(java.lang.String mime)
Returns a RendererMaker which handles the given MIME type.
|
AbstractFOEventHandlerMaker |
getFOEventHandlerMaker(java.lang.String mime)
Returns a FOEventHandlerMaker which handles the given MIME type.
|
AbstractRendererMaker |
getRendererMaker(java.lang.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. |
java.lang.String[] |
listSupportedMimeTypes() |
void |
setRendererPreferred(boolean value)
Controls whether a
Renderer is preferred over a IFDocumentHandler if
both are available for the same MIME type. |
public void setRendererPreferred(boolean value)
Renderer
is preferred over a IFDocumentHandler
if
both are available for the same MIME type.value
- 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(java.lang.String className)
className
- the fully qualified class name of the RendererMakerpublic void addFOEventHandlerMaker(java.lang.String className)
className
- the fully qualified class name of the FOEventHandlerMakerpublic void addDocumentHandlerMaker(java.lang.String className)
className
- the fully qualified class name of the document handler makerpublic AbstractRendererMaker getRendererMaker(java.lang.String mime)
mime
- the requested output formatpublic AbstractFOEventHandlerMaker getFOEventHandlerMaker(java.lang.String mime)
mime
- the requested output formatpublic AbstractIFDocumentHandlerMaker getDocumentHandlerMaker(java.lang.String mime)
mime
- the requested output formatpublic Renderer createRenderer(FOUserAgent userAgent, java.lang.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, java.lang.String outputFormat, java.io.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, java.lang.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 java.lang.String[] listSupportedMimeTypes()
Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.