org.foray.app
Class OutputTargetFactory

java.lang.Object
  extended by org.foray.app.OutputTargetFactory

public final class OutputTargetFactory
extends Object

Utility class used to create output targets.


Method Summary
static OutputTargetType getRendererType(String format)
          Converts a String description of the desired Renderer to a valid renderer code.
static org.axsl.output.OutputTarget makeOutputTarget(OutputTargetType rendererType, OutputConfig outputOptions, OutputStream outputStream, org.apache.commons.logging.Log logger, org.axsl.graphic.GraphicServer graphicServer)
          Factory method that makes a new Renderer instance for the standard renderers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

makeOutputTarget

public static org.axsl.output.OutputTarget makeOutputTarget(OutputTargetType rendererType,
                                                            OutputConfig outputOptions,
                                                            OutputStream outputStream,
                                                            org.apache.commons.logging.Log logger,
                                                            org.axsl.graphic.GraphicServer graphicServer)
                                                     throws FOrayException
Factory method that makes a new Renderer instance for the standard renderers.

Parameters:
rendererType - The integral id for the Renderer that should be used. Must be one of:
  • RENDER_PDF
  • RENDER_AWT
  • RENDER_MIF
  • RENDER_XML
  • RENDER_PCL
  • RENDER_PS
  • RENDER_TXT
  • RENDER_SVG
outputOptions - Map containing the options to be used with the Renderer.
outputStream - The output stream to which the target will be written.
logger - The logger.
graphicServer - The GraphicServer to be used for output targets that create a graphic (like the SVG Renderer).
Returns:
The newly-created OutputTarget instance.
Throws:
FOrayException - For errors creating the target.

getRendererType

public static OutputTargetType getRendererType(String format)
Converts a String description of the desired Renderer to a valid renderer code.

Parameters:
format - The String description of the desired Renderer, either a mime type or a standard description.
Returns:
The OutputTargetType for the given mime type, or null if the input is not valid.


Copyright © 2017. All rights reserved.