public class XSLTProcessor extends java.lang.Object implements ProcessorMBean, XSLTProcessorMBean, javax.xml.transform.URIResolver
| Constructor and Description |
|---|
XSLTProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMimeType(java.lang.String extension,
java.lang.String type)
Maps a given extension with a specified MIME type
|
protected javax.xml.transform.Transformer |
createTransformer(java.lang.String path) |
java.lang.String |
getDefaultPage()
Returns the default start page
|
java.lang.String |
getFile()
Returns the jar/zip file or the directory where XSL files are loaded
|
protected java.io.InputStream |
getInputStream(java.lang.String path) |
java.util.Locale |
getLocale()
Returns the Locale used to internationalize the output
|
java.lang.String |
getName() |
java.lang.String |
getPathInJar()
Returns the path of the XSL templates inside a jar file.
|
boolean |
isUseCache()
Returns if the XSL Templates are cached
|
boolean |
isUseJar()
Returns if the XSL files are contained in a jar/zip file.
|
boolean |
isUsePath()
Returns if the XSL files are contained in a path.
|
java.lang.String |
notFoundElement(java.lang.String path,
HttpOutputStream out,
HttpInputStream in)
Let the processor load internally a not found element.
|
java.lang.String |
preProcess(java.lang.String path)
Preprocess a path and return a replacement path.
|
protected void |
processHttpException(HttpInputStream in,
HttpOutputStream out,
HttpException e) |
javax.xml.transform.Source |
resolve(java.lang.String href,
java.lang.String base) |
void |
setDefaultPage(java.lang.String defaultPage)
Sets the default start page, serverbydomain as a default
|
void |
setFile(java.lang.String file)
Sets the jar/zip file or the directory where to find the XSL files
|
void |
setLocale(java.util.Locale locale)
Sets the locale used to internationalize the output
|
void |
setLocaleString(java.lang.String locale)
Sets the locale used to internationalize the output, as a string
|
void |
setPathInJar(java.lang.String path)
Specifies the path of the XSL templates inside a jar file.
|
void |
setUseCache(boolean useCache)
Sets the caching of the XSL Templates.
|
void |
writeError(HttpOutputStream out,
HttpInputStream in,
java.lang.Exception e)
The method will process the result exception and produce output.
|
void |
writeResponse(HttpOutputStream out,
HttpInputStream in,
org.w3c.dom.Document document)
The method will process the result string and produce an output.
|
public void writeResponse(HttpOutputStream out, HttpInputStream in, org.w3c.dom.Document document) throws java.io.IOException
ProcessorMBean
out.setCode(HttpConstants.STATUS_OKAY);
out.setHeader("Content-type", "text/html");
out.sendHeaders();
out.write("some text");
writeResponse in interface ProcessorMBeanout - The output streamin - The input streamdocument - A document containing the datajava.io.IOExceptionprotected javax.xml.transform.Transformer createTransformer(java.lang.String path)
protected void processHttpException(HttpInputStream in, HttpOutputStream out, HttpException e) throws java.io.IOException
java.io.IOExceptionpublic void writeError(HttpOutputStream out, HttpInputStream in, java.lang.Exception e) throws java.io.IOException
ProcessorMBean
out.setCode(HttpConstants.STATUS_OKAY);
out.setHeader("Content-type", "text/html");
out.sendHeaders();
out.write("some text");
writeError in interface ProcessorMBeanout - The output streamin - The input streame - The exception to be reportedjava.io.IOExceptionpublic java.lang.String preProcess(java.lang.String path)
ProcessorMBeanpreProcess in interface ProcessorMBeanpath - The original pathpublic java.lang.String notFoundElement(java.lang.String path,
HttpOutputStream out,
HttpInputStream in)
throws java.io.IOException,
HttpException
ProcessorMBeannotFoundElement in interface ProcessorMBeanpath - The request elementout - The output streamin - The input streamjava.io.IOExceptionHttpExceptionprotected java.io.InputStream getInputStream(java.lang.String path)
public javax.xml.transform.Source resolve(java.lang.String href,
java.lang.String base)
resolve in interface javax.xml.transform.URIResolverpublic void setFile(java.lang.String file)
XSLTProcessorMBeansetFile in interface XSLTProcessorMBeanXSLTProcessorMBean.getFile()public java.lang.String getFile()
XSLTProcessorMBeangetFile in interface XSLTProcessorMBeanXSLTProcessorMBean.setFile(java.lang.String)public java.lang.String getPathInJar()
XSLTProcessorMBeangetPathInJar in interface XSLTProcessorMBeanXSLTProcessorMBean.setPathInJar(java.lang.String)public void setPathInJar(java.lang.String path)
XSLTProcessorMBeansetPathInJar in interface XSLTProcessorMBeanXSLTProcessorMBean.getPathInJar()public java.lang.String getDefaultPage()
XSLTProcessorMBeangetDefaultPage in interface XSLTProcessorMBeanXSLTProcessorMBean.setDefaultPage(java.lang.String)public void setDefaultPage(java.lang.String defaultPage)
XSLTProcessorMBeansetDefaultPage in interface XSLTProcessorMBeanXSLTProcessorMBean.getDefaultPage()public boolean isUseJar()
XSLTProcessorMBeanisUseJar in interface XSLTProcessorMBeanXSLTProcessorMBean.isUsePath(),
XSLTProcessorMBean.setFile(java.lang.String)public boolean isUsePath()
XSLTProcessorMBeanisUsePath in interface XSLTProcessorMBeanXSLTProcessorMBean.isUseJar(),
XSLTProcessorMBean.setFile(java.lang.String)public void addMimeType(java.lang.String extension,
java.lang.String type)
XSLTProcessorMBeanaddMimeType in interface XSLTProcessorMBeanpublic void setUseCache(boolean useCache)
XSLTProcessorMBeansetUseCache in interface XSLTProcessorMBeanpublic boolean isUseCache()
XSLTProcessorMBeanisUseCache in interface XSLTProcessorMBeanpublic java.lang.String getName()
getName in interface ProcessorMBeanpublic java.util.Locale getLocale()
XSLTProcessorMBeangetLocale in interface XSLTProcessorMBeanpublic void setLocale(java.util.Locale locale)
XSLTProcessorMBeansetLocale in interface XSLTProcessorMBeanpublic void setLocaleString(java.lang.String locale)
XSLTProcessorMBeansetLocaleString in interface XSLTProcessorMBean