|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.foray.demo.servlet.AbstractDemoServlet
public abstract class AbstractDemoServlet
Abstract base class for FOray demo servlets.
| Field Summary | |
|---|---|
static String |
FO_REQUEST_PARAM
Constant for the "fo" request parameter. |
static String |
XML_REQUEST_PARAM
Constant for the "xml" request parameter. |
static String |
XSL_REQUEST_PARAM
Constant for the "xsl" request parameter. |
| Constructor Summary | |
|---|---|
AbstractDemoServlet()
Constructor. |
|
| Method Summary | |
|---|---|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected abstract String |
getContentType()
Return the content type. |
org.apache.commons.logging.Log |
getLogger()
Returns the logger. |
protected abstract OutputTargetType |
getRendererType()
Return the renderer type. |
void |
renderFO(InputSource inputHandler,
javax.servlet.http.HttpServletResponse response)
Renders an FO inputsource into a PDF file which is written directly to the response object's OutputStream. |
void |
renderXML(File xmlFile,
File xslFile,
javax.servlet.http.HttpServletResponse response)
Renders an XML file into a PDF file by applying a stylesheet that converts the XML to XSL:FO. |
protected FOrayDocument |
setupJAXPDocument(File xmlFile,
File xslFile,
FOraySession session)
Creates the FOrayDocument using JAXP. |
protected FOrayDocument |
setupSAXDocument(FOraySession session,
InputSource inputSource)
Creates the FOrayDocument using normal SAX processing. |
protected FOraySession |
setupSession(javax.servlet.http.HttpServletResponse response)
Creates the FOraySession. |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String FO_REQUEST_PARAM
public static final String XML_REQUEST_PARAM
public static final String XSL_REQUEST_PARAM
| Constructor Detail |
|---|
public AbstractDemoServlet()
| Method Detail |
|---|
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionprotected abstract String getContentType()
protected abstract OutputTargetType getRendererType()
protected FOraySession setupSession(javax.servlet.http.HttpServletResponse response)
throws FOrayException
response - The servlet response.
FOrayException - For errors creating the session.
protected FOrayDocument setupSAXDocument(FOraySession session,
InputSource inputSource)
throws FOrayException
session - The parent FOraySession.inputSource - The input source to be processed.
FOrayException - For errors creating the document.
protected FOrayDocument setupJAXPDocument(File xmlFile,
File xslFile,
FOraySession session)
throws TransformerConfigurationException,
FOrayException
xmlFile - The xml file to be processed.xslFile - The stylesheet file to be processed.session - The parent FOraySession.
TransformerConfigurationException - For errors configuring the
transformer.
FOrayException - For errors creating the document.
public void renderFO(InputSource inputHandler,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException
inputHandler - A SAX input handler.response - The Servlet response.
javax.servlet.ServletException - For exceptions during processing.
public void renderXML(File xmlFile,
File xslFile,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException
xmlFile - The semantic XML file to be transformed.xslFile - The stylesheet to be applied to xmlFile.response - The HTTP servlet response.
javax.servlet.ServletException - For errors during processing.public org.apache.commons.logging.Log getLogger()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||