|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mx4j.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)
Adds a mime type if the defaults one are not enough. |
protected javax.xml.transform.Transformer |
createTransformer(java.lang.String path)
|
java.lang.String |
getFile()
Returns the file or dir containing the transformation files |
protected java.io.InputStream |
getInputStream(java.lang.String path)
|
java.lang.String |
getName()
|
java.lang.String |
getPathInJar()
Returns the path of the files in the jar file. |
boolean |
isUseCache()
|
boolean |
isUseJar()
Indicates whether the xsl files are read form a jar file |
boolean |
isUsePath()
Indicates whether the xsl files are read form a dir in the filesystem |
java.lang.String |
notFoundElement(java.lang.String path,
mx4j.adaptor.http.HttpOutputStream out,
mx4j.adaptor.http.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. |
javax.xml.transform.Source |
resolve(java.lang.String href,
java.lang.String base)
|
void |
setFile(java.lang.String file)
Sets the root file of the transformation files. |
void |
setPathInJar(java.lang.String path)
If you are using a .jar or .zip file, you may use the root path indicating the location of the files in the jar. |
void |
setUseCache(boolean useCache)
Use cache. |
void |
writeError(mx4j.adaptor.http.HttpOutputStream out,
mx4j.adaptor.http.HttpInputStream in,
java.lang.Exception e)
The method will process the result exception and produce output. |
void |
writeResponse(mx4j.adaptor.http.HttpOutputStream out,
mx4j.adaptor.http.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(mx4j.adaptor.http.HttpOutputStream out, mx4j.adaptor.http.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
mx4j.adaptor.http.ProcessorMBean
out
- The output streamin
- The input streamdocument
- A document containing the dataprotected javax.xml.transform.Transformer createTransformer(java.lang.String path)
public void writeError(mx4j.adaptor.http.HttpOutputStream out, mx4j.adaptor.http.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
mx4j.adaptor.http.ProcessorMBean
out
- The output streamin
- The input streame
- The exception to be reportedpublic java.lang.String preProcess(java.lang.String path)
ProcessorMBean
preProcess
in interface ProcessorMBean
mx4j.adaptor.http.ProcessorMBean
path
- The original pathpublic java.lang.String notFoundElement(java.lang.String path, mx4j.adaptor.http.HttpOutputStream out, mx4j.adaptor.http.HttpInputStream in) throws java.io.IOException, mx4j.adaptor.http.HttpException
ProcessorMBean
notFoundElement
in interface ProcessorMBean
mx4j.adaptor.http.ProcessorMBean
path
- The request elementout
- The output streamin
- The input streamprotected 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
public java.lang.String getFile()
XSLTProcessorMBean
getFile
in interface XSLTProcessorMBean
public java.lang.String getPathInJar()
XSLTProcessorMBean
getPathInJar
in interface XSLTProcessorMBean
public void setPathInJar(java.lang.String path)
XSLTProcessorMBean
setPathInJar
in interface XSLTProcessorMBean
public boolean isUseJar()
XSLTProcessorMBean
isUseJar
in interface XSLTProcessorMBean
public boolean isUsePath()
XSLTProcessorMBean
isUsePath
in interface XSLTProcessorMBean
public void addMimeType(java.lang.String extension, java.lang.String type)
XSLTProcessorMBean
addMimeType(".gif", "image/gif");
addMimeType
in interface XSLTProcessorMBean
public void setUseCache(boolean useCache)
XSLTProcessorMBean
setUseCache
in interface XSLTProcessorMBean
public boolean isUseCache()
isUseCache
in interface XSLTProcessorMBean
public java.lang.String getName()
getName
in interface ProcessorMBean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |