|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.felix.mosgi.jmx.httpconnector.mx4j.tools.adaptor.http.XSLTProcessor
public class XSLTProcessor
XSLTPostProcessor pass the document through an XSLT transformation
| Constructor Summary | |
|---|---|
XSLTProcessor()
|
|
| Method Summary | |
|---|---|
void |
addMimeType(String extension,
String type)
Maps a given extension with a specified MIME type |
protected javax.xml.transform.Transformer |
createTransformer(String path)
|
String |
getDefaultPage()
Returns the default start page |
String |
getFile()
Returns the jar/zip file or the directory where XSL files are loaded |
protected InputStream |
getInputStream(String path)
|
Locale |
getLocale()
Returns the Locale used to internationalize the output |
String |
getName()
|
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. |
String |
notFoundElement(String path,
HttpOutputStream out,
HttpInputStream in)
Let the processor load internally a not found element. |
String |
preProcess(String path)
Preprocess a path and return a replacement path. |
protected void |
processHttpException(HttpInputStream in,
HttpOutputStream out,
HttpException e)
|
javax.xml.transform.Source |
resolve(String href,
String base)
|
void |
setDefaultPage(String defaultPage)
Sets the default start page, serverbydomain as a default |
void |
setFile(String file)
Sets the jar/zip file or the directory where to find the XSL files |
void |
setLocale(Locale locale)
Sets the locale used to internationalize the output |
void |
setLocaleString(String locale)
Sets the locale used to internationalize the output, as a string |
void |
setPathInJar(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,
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XSLTProcessor()
| Method Detail |
|---|
public void writeResponse(HttpOutputStream out,
HttpInputStream in,
org.w3c.dom.Document document)
throws 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 data
IOExceptionprotected javax.xml.transform.Transformer createTransformer(String path)
protected void processHttpException(HttpInputStream in,
HttpOutputStream out,
HttpException e)
throws IOException
IOException
public void writeError(HttpOutputStream out,
HttpInputStream in,
Exception e)
throws 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 reported
IOExceptionpublic String preProcess(String path)
ProcessorMBean
preProcess in interface ProcessorMBeanpath - The original path
public String notFoundElement(String path,
HttpOutputStream out,
HttpInputStream in)
throws IOException,
HttpException
ProcessorMBean
notFoundElement in interface ProcessorMBeanpath - The request elementout - The output streamin - The input stream
IOException
HttpExceptionprotected InputStream getInputStream(String path)
public javax.xml.transform.Source resolve(String href,
String base)
resolve in interface javax.xml.transform.URIResolverpublic void setFile(String file)
XSLTProcessorMBean
setFile in interface XSLTProcessorMBeanXSLTProcessorMBean.getFile()public String getFile()
XSLTProcessorMBean
getFile in interface XSLTProcessorMBeanXSLTProcessorMBean.setFile(java.lang.String)public String getPathInJar()
XSLTProcessorMBean
getPathInJar in interface XSLTProcessorMBeanXSLTProcessorMBean.setPathInJar(java.lang.String)public void setPathInJar(String path)
XSLTProcessorMBean
setPathInJar in interface XSLTProcessorMBeanXSLTProcessorMBean.getPathInJar()public String getDefaultPage()
XSLTProcessorMBean
getDefaultPage in interface XSLTProcessorMBeanXSLTProcessorMBean.setDefaultPage(java.lang.String)public void setDefaultPage(String defaultPage)
XSLTProcessorMBean
setDefaultPage in interface XSLTProcessorMBeanXSLTProcessorMBean.getDefaultPage()public boolean isUseJar()
XSLTProcessorMBean
isUseJar in interface XSLTProcessorMBeanXSLTProcessorMBean.isUsePath(),
XSLTProcessorMBean.setFile(java.lang.String)public boolean isUsePath()
XSLTProcessorMBean
isUsePath in interface XSLTProcessorMBeanXSLTProcessorMBean.isUseJar(),
XSLTProcessorMBean.setFile(java.lang.String)
public void addMimeType(String extension,
String type)
XSLTProcessorMBean
addMimeType in interface XSLTProcessorMBeanpublic void setUseCache(boolean useCache)
XSLTProcessorMBean
setUseCache in interface XSLTProcessorMBeanpublic boolean isUseCache()
XSLTProcessorMBean
isUseCache in interface XSLTProcessorMBeanpublic String getName()
getName in interface ProcessorMBeanpublic Locale getLocale()
XSLTProcessorMBean
getLocale in interface XSLTProcessorMBeanpublic void setLocale(Locale locale)
XSLTProcessorMBean
setLocale in interface XSLTProcessorMBeanpublic void setLocaleString(String locale)
XSLTProcessorMBean
setLocaleString in interface XSLTProcessorMBean
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||