|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.oroad.stxx.transform.document.SAXDocumentBuilder
Builds a document by firing SAX events. Uses a SAXSerializer to serialize the information into SAX events.
Nested Class Summary | |
protected class |
SAXDocumentBuilder.RootNodeFilter
Swallows the closing of the root node and stores its name. |
Field Summary | |
protected static java.lang.String |
ALWAYS_USE_ROOT_KEY
Whether to always used the chained root node as the document root |
protected boolean |
alwaysUseChainedRoot
Whether to always use the chained root node as the document root |
protected static java.lang.String |
CHAINED_ROOT_NODE
The name of the chained root node |
protected java.lang.String |
chainedRootNode
The name of the chained root node |
protected boolean |
isStrutsPlugin
Whether stxx is being used as a Struts plugin |
protected static org.apache.commons.logging.Log |
log
The logging instance |
protected org.apache.struts.util.MessageResources |
messages
The message resources |
protected BuilderRules |
rules
The builder rules |
protected SAXSerializer |
serializer
The serializer to use |
protected static java.lang.String |
SERIALIZER_CLASS_KEY
The class implementing SAXSerializer |
Constructor Summary | |
SAXDocumentBuilder()
|
Method Summary | |
protected void |
attachActionErrors(javax.servlet.http.HttpServletRequest request,
org.apache.struts.action.ActionErrors aes,
java.util.Locale locale,
org.apache.struts.util.MessageResources appRes,
XMLConsumer handler)
Process the ActionErrors collection to create an XML node list of all errors. |
protected void |
attachActionMessages(javax.servlet.http.HttpServletRequest request,
org.apache.struts.action.ActionMessages aes,
java.util.Locale locale,
org.apache.struts.util.MessageResources appRes,
XMLConsumer handler)
Process the ActionMessages collection to create an XML node list of all messages. |
protected void |
attachRequest(javax.servlet.http.HttpServletRequest request,
boolean includeParameters,
boolean includeAttributes,
XMLConsumer handler)
Process the HttpServletRequest object to create an XML node list of all parameters and attributes. |
protected void |
attachResources(javax.servlet.http.HttpServletRequest req,
java.util.Locale locale,
PropertyMessageResources application,
XMLConsumer handler)
Get's the proper application resources file for a particular locale. |
void |
buildDocument(javax.servlet.http.HttpServletRequest request,
XMLConsumer handler)
Builds the document |
protected java.lang.String |
convertDocument(java.lang.Object xml,
XMLConsumer handler,
javax.xml.transform.Transformer trans,
boolean isRoot)
Converts a single xml document into SAX events. |
void |
init(StxxProperties props,
BuilderRules rules)
Initializes from StxxProperties |
protected java.lang.String |
startDocumentFromActions(javax.servlet.http.HttpServletRequest request,
XMLConsumer handler)
Sends action-created XML documents to the XMLConsumer and returns the name of the root node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String SERIALIZER_CLASS_KEY
protected static final java.lang.String ALWAYS_USE_ROOT_KEY
protected static final java.lang.String CHAINED_ROOT_NODE
protected java.lang.String chainedRootNode
protected boolean alwaysUseChainedRoot
protected SAXSerializer serializer
protected org.apache.struts.util.MessageResources messages
protected BuilderRules rules
protected boolean isStrutsPlugin
protected static org.apache.commons.logging.Log log
Constructor Detail |
public SAXDocumentBuilder()
Method Detail |
public void init(StxxProperties props, BuilderRules rules)
props
- The stxx propertiesrules
- The builder rulespublic void buildDocument(javax.servlet.http.HttpServletRequest request, XMLConsumer handler)
request
- The HTTP requesthandler
- The SAX event consumerprotected java.lang.String startDocumentFromActions(javax.servlet.http.HttpServletRequest request, XMLConsumer handler) throws org.xml.sax.SAXException
request
- The http requesthandler
- The XMLConsumer
org.xml.sax.SAXException
- If something goes wrongprotected java.lang.String convertDocument(java.lang.Object xml, XMLConsumer handler, javax.xml.transform.Transformer trans, boolean isRoot)
xml
- The XML objecthandler
- The XMLConsumertrans
- The transformerisRoot
- Whether the document's root element is the new document's
root element
protected void attachActionErrors(javax.servlet.http.HttpServletRequest request, org.apache.struts.action.ActionErrors aes, java.util.Locale locale, org.apache.struts.util.MessageResources appRes, XMLConsumer handler) throws org.xml.sax.SAXException
aes
- The ActionErrors collectionrequest
- The http requesthandler
- The XMLConsumer
org.xml.sax.SAXException
- If something goes wrongprotected void attachActionMessages(javax.servlet.http.HttpServletRequest request, org.apache.struts.action.ActionMessages aes, java.util.Locale locale, org.apache.struts.util.MessageResources appRes, XMLConsumer handler) throws org.xml.sax.SAXException
aes
- The ActionMessages collectionrequest
- The http requesthandler
- The XMLConsumer
org.xml.sax.SAXException
- If something goes wrongprotected void attachRequest(javax.servlet.http.HttpServletRequest request, boolean includeParameters, boolean includeAttributes, XMLConsumer handler) throws org.xml.sax.SAXException
request
- The request object so that I can get all the
parameters and attributesincludeParameters
- Whether to include parameter informationincludeAttributes
- Whether to include attribute informationhandler
- Where to send the SAX events
org.xml.sax.SAXException
- If something goes wrongprotected void attachResources(javax.servlet.http.HttpServletRequest req, java.util.Locale locale, PropertyMessageResources application, XMLConsumer handler) throws org.xml.sax.SAXException
locale
- The localeapplication
- The application resourcesreq
- The http requesthandler
- Where to send the SAX events
org.xml.sax.SAXException
- If something goes wrong
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |