org.ujac.web.servlet
Class ServletDocumentTransformHelper

java.lang.Object
  extended by org.ujac.web.servlet.ServletDocumentTransformHelper

public class ServletDocumentTransformHelper
extends Object

Name: ServletDocumentTransformHelper
Description: A helper class that eases the output of the DocumentTransformHelper within servlets.

Author:
lauerc

Constructor Summary
ServletDocumentTransformHelper()
          Constructs a ServletDocumentPrinter instance with no specific attributes.
 
Method Summary
 void finish(HttpServletResponse response)
          Finishes the document processing.
 DocumentTransformHelper getTransformHelper()
          Gets the document transform helper instance.
 Result prepare(HttpServletRequest request, boolean supportToc)
          Generates a PDF and writes it to the servlet output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletDocumentTransformHelper

public ServletDocumentTransformHelper()
Constructs a ServletDocumentPrinter instance with no specific attributes.

Method Detail

getTransformHelper

public DocumentTransformHelper getTransformHelper()
Gets the document transform helper instance.

Returns:
The document transform helper instance.

prepare

public Result prepare(HttpServletRequest request,
                      boolean supportToc)
               throws IOException,
                      UjacException
Generates a PDF and writes it to the servlet output stream.

Parameters:
request - The HTTP request.
supportToc - Tells whether or not to support the output of a leading table of contents. Notice: if you use this option, the main document will be completely generated in memory, this may lead to problems if you process huge documents.
Returns:
The transformation result.
Throws:
IOException - In case an I/O problem occurred.
UjacException - In case an UJAC related problem occurred.

finish

public void finish(HttpServletResponse response)
            throws UjacException,
                   IOException
Finishes the document processing.

Parameters:
response - The HTTP response to write the output to.
Throws:
IOException - In case something went wrong during output.
UjacException - In case an UJAC related problem occurred.


Copyright © 2003-2004 UJAC.org. All Rights Reserved.