|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.oroad.stxx.transform.AbstractSAXTransformer
This class provides common methods and variables used by transformers that convert stxx documents into SAX events.
Field Summary | |
protected boolean |
allowURLDebug
Whether the URL debugging is enabled |
protected SAXDocumentBuilder |
builder
The class that will build the document by firing SAX events |
protected Cache |
cache
Templates cache |
protected javax.servlet.ServletContext |
context
The servlet context used for resolving paths |
protected java.lang.String |
debugXMLPath
The path to write the debugging information |
protected long |
expiryTime
Cached Template expiration time |
protected org.apache.commons.logging.Log |
log
Logging |
protected java.lang.String |
name
The name of this transformer |
protected boolean |
resolveFromTemplatePath
Resolve XSL imports and includes from the directory of the parent XSL |
protected BuilderRules |
rules
Defines what information should be included in the transformation |
protected java.lang.String |
transFactory
The name of the factory to use |
protected boolean |
writeXMLDebug
Whether upon URL debugging, information will be written to disk |
Fields inherited from interface com.oroad.stxx.transform.Transformer |
PROPS_PREFIX |
Constructor Summary | |
AbstractSAXTransformer()
Constructor for the AbstractSAXTransformer object |
Method Summary | |
protected javax.xml.transform.sax.SAXTransformerFactory |
getFactory()
Gets a factory to create transformer objects |
void |
init(java.lang.String name,
StxxProperties props,
javax.servlet.ServletContext context,
BuilderRules rules)
Initializes the transformer |
void |
setCache(Cache cache,
long expiryTime)
Sets the cache for the transformer |
abstract void |
transform(ActionTransform trans,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles the transform stage |
protected void |
writeXML(javax.xml.transform.sax.SAXTransformerFactory factory,
SAXDocumentBuilder builder,
javax.servlet.http.HttpServletRequest request)
Writes the XML to disk |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Cache cache
protected long expiryTime
protected java.lang.String name
protected javax.servlet.ServletContext context
protected BuilderRules rules
protected SAXDocumentBuilder builder
protected boolean resolveFromTemplatePath
protected java.lang.String transFactory
protected boolean allowURLDebug
protected boolean writeXMLDebug
protected java.lang.String debugXMLPath
protected final org.apache.commons.logging.Log log
Constructor Detail |
public AbstractSAXTransformer()
Method Detail |
public void setCache(Cache cache, long expiryTime)
setCache
in interface Transformer
cache
- The cacheexpiryTime
- The expiration time for objects in millisecondspublic void init(java.lang.String name, StxxProperties props, javax.servlet.ServletContext context, BuilderRules rules)
init
in interface Transformer
name
- The name of the transformerprops
- The propertiescontext
- The servlet contextrules
- The builder rulespublic abstract void transform(ActionTransform trans, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws TransformerException
transform
in interface Transformer
trans
- The value object holding transformation
informationresponse
- The response object (to set
content-type, etc)request
- The request object
TransformerException
- If something goes wrongprotected javax.xml.transform.sax.SAXTransformerFactory getFactory() throws TransformerException
TransformerException
- If something goes wrongprotected void writeXML(javax.xml.transform.sax.SAXTransformerFactory factory, SAXDocumentBuilder builder, javax.servlet.http.HttpServletRequest request)
builder
- The document builderrequest
- The http requestfactory
- The sax transformer factory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |