|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mx4j.tools.adaptor.http.XSLTProcessor
XSLTPostProcessor pass the document through an XSLT transformation
Constructor Summary | |
XSLTProcessor()
|
Method Summary | |
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. |
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 java.io.IOException
ProcessorMBean
out.setCode(HttpConstants.STATUS_OKAY);
out.setHeader("Content-type", "text/html");
out.sendHeaders();
out.write("some text");
writeResponse
in interface ProcessorMBean
out
- The output streamin
- The input streamdocument
- A document containing the data
java.io.IOException
protected javax.xml.transform.Transformer createTransformer(java.lang.String path)
protected void processHttpException(HttpInputStream in, HttpOutputStream out, HttpException e) throws java.io.IOException
java.io.IOException
public 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 ProcessorMBean
out
- The output streamin
- The input streame
- The exception to be reported
java.io.IOException
public java.lang.String preProcess(java.lang.String path)
ProcessorMBean
preProcess
in interface ProcessorMBean
path
- The original path
public java.lang.String notFoundElement(java.lang.String path, HttpOutputStream out, HttpInputStream in) throws java.io.IOException, HttpException
ProcessorMBean
notFoundElement
in interface ProcessorMBean
path
- The request elementout
- The output streamin
- The input stream
java.io.IOException
HttpException
protected 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.URIResolver
public void setFile(java.lang.String file)
XSLTProcessorMBean
setFile
in interface XSLTProcessorMBean
XSLTProcessorMBean.getFile()
public java.lang.String getFile()
XSLTProcessorMBean
getFile
in interface XSLTProcessorMBean
XSLTProcessorMBean.setFile(java.lang.String)
public java.lang.String getPathInJar()
XSLTProcessorMBean
getPathInJar
in interface XSLTProcessorMBean
XSLTProcessorMBean.setPathInJar(java.lang.String)
public void setPathInJar(java.lang.String path)
XSLTProcessorMBean
setPathInJar
in interface XSLTProcessorMBean
XSLTProcessorMBean.getPathInJar()
public java.lang.String getDefaultPage()
XSLTProcessorMBean
getDefaultPage
in interface XSLTProcessorMBean
XSLTProcessorMBean.setDefaultPage(java.lang.String)
public void setDefaultPage(java.lang.String defaultPage)
XSLTProcessorMBean
setDefaultPage
in interface XSLTProcessorMBean
XSLTProcessorMBean.getDefaultPage()
public boolean isUseJar()
XSLTProcessorMBean
isUseJar
in interface XSLTProcessorMBean
XSLTProcessorMBean.isUsePath()
,
XSLTProcessorMBean.setFile(java.lang.String)
public boolean isUsePath()
XSLTProcessorMBean
isUsePath
in interface XSLTProcessorMBean
XSLTProcessorMBean.isUseJar()
,
XSLTProcessorMBean.setFile(java.lang.String)
public void addMimeType(java.lang.String extension, java.lang.String type)
XSLTProcessorMBean
addMimeType
in interface XSLTProcessorMBean
public void setUseCache(boolean useCache)
XSLTProcessorMBean
setUseCache
in interface XSLTProcessorMBean
public boolean isUseCache()
XSLTProcessorMBean
isUseCache
in interface XSLTProcessorMBean
public java.lang.String getName()
getName
in interface ProcessorMBean
public java.util.Locale getLocale()
XSLTProcessorMBean
getLocale
in interface XSLTProcessorMBean
public void setLocale(java.util.Locale locale)
XSLTProcessorMBean
setLocale
in interface XSLTProcessorMBean
public void setLocaleString(java.lang.String locale)
XSLTProcessorMBean
setLocaleString
in interface XSLTProcessorMBean
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |