|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.oroad.stxx.transform.document.DefaultSAXSerializer
Serializes objects by firing SAX events
| Field Summary | |
protected boolean |
isStrutsPlugin
Stores whether Struts 1.1+ is present |
protected static org.apache.commons.logging.Log |
log
The logging instance |
protected static java.lang.String |
USE_CSV_PARAM_FORMAT_KEY
Whether to serialize request parameters as comma-separated values |
protected boolean |
useCSVParamFormat
Whether to serialize request parameters as comma-separated values |
| Constructor Summary | |
DefaultSAXSerializer()
|
|
| Method Summary | |
protected org.xml.sax.Attributes |
getAttributes(java.lang.String name,
java.lang.String value)
Gets an Attributes object that has the given attribute |
void |
init(StxxProperties props)
Initializes the serializer |
protected void |
outputJDOM(org.jdom.Document d,
XMLConsumer handler)
Serializes a JDOM document |
protected void |
outputJDOM(org.jdom.Element e,
XMLConsumer handler)
Serializes a JDOM element |
protected void |
outputNode(org.w3c.dom.Node n,
XMLConsumer handler)
Serializes a w3c DOM node |
protected void |
sendElement(java.lang.String eName,
java.lang.String eText,
java.lang.String aName,
java.lang.String aValue,
XMLConsumer handler)
Sends an element that has the given attribute and text |
protected void |
sendElement(java.lang.String eName,
java.lang.String eText,
XMLConsumer handler)
Sends an element that has the given text |
void |
serializeActionError(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
org.apache.struts.action.ActionError error,
java.util.Locale locale,
org.apache.struts.util.MessageResources res,
XMLConsumer handler)
Serializes the action error as an element. |
void |
serializeActionForm(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
org.apache.struts.action.ActionForm form,
XMLConsumer handler)
Serializes the action form as an element. |
void |
serializeActionMessage(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
org.apache.struts.action.ActionMessage message,
java.util.Locale locale,
org.apache.struts.util.MessageResources res,
XMLConsumer handler)
Serializes the action message as an element. |
protected void |
serializeIt(java.lang.Object bean,
java.lang.String name,
XMLConsumer handler,
java.util.Vector stack)
Recursive function to serialize objects to XML. |
void |
serializeRequestAttribute(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
XMLConsumer handler)
Serializes the named request attribute as an element. |
void |
serializeRequestParameter(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
XMLConsumer handler)
Serializes the named request parameter as an element. |
void |
serializeResource(javax.servlet.http.HttpServletRequest request,
java.util.Map resources,
java.lang.String key,
XMLConsumer handler)
Serializes the resource as an element. |
| 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 USE_CSV_PARAM_FORMAT_KEY
protected static final org.apache.commons.logging.Log log
protected boolean useCSVParamFormat
protected boolean isStrutsPlugin
| Constructor Detail |
public DefaultSAXSerializer()
| Method Detail |
public void init(StxxProperties props)
init in interface SAXSerializerprops - The stxx properties
public void serializeRequestParameter(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
XMLConsumer handler)
throws org.xml.sax.SAXException
serializeRequestParameter in interface SAXSerializerrequest - The http requestname - The name of the request parameterhandler - The SAX event consumer
org.xml.sax.SAXException - If something goes wrong
public void serializeRequestAttribute(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
XMLConsumer handler)
throws org.xml.sax.SAXException
serializeRequestAttribute in interface SAXSerializerrequest - The http requestname - The name of the request attributehandler - The SAX event consumer
org.xml.sax.SAXException - If something goes wrong
public void serializeActionError(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
org.apache.struts.action.ActionError error,
java.util.Locale locale,
org.apache.struts.util.MessageResources res,
XMLConsumer handler)
throws org.xml.sax.SAXException
serializeActionError in interface SAXSerializerrequest - The http requestname - The property nameerror - The action errorlocale - The current localeres - The current resource bundlehandler - The SAX event consumer
org.xml.sax.SAXException - If something goes wrong
public void serializeActionMessage(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
org.apache.struts.action.ActionMessage message,
java.util.Locale locale,
org.apache.struts.util.MessageResources res,
XMLConsumer handler)
throws org.xml.sax.SAXException
serializeActionMessage in interface SAXSerializerrequest - The http requestname - The property namemessage - The action messagelocale - The current localeres - The current resource bundlehandler - The SAX event consumer
org.xml.sax.SAXException - If something goes wrong
public void serializeActionForm(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
org.apache.struts.action.ActionForm form,
XMLConsumer handler)
throws org.xml.sax.SAXException
serializeActionForm in interface SAXSerializerrequest - The http requestform - The action formhandler - The SAX event consumername - The name of the form
org.xml.sax.SAXException - If something goes wrong
public void serializeResource(javax.servlet.http.HttpServletRequest request,
java.util.Map resources,
java.lang.String key,
XMLConsumer handler)
throws org.xml.sax.SAXException
serializeResource in interface SAXSerializerrequest - The http requestresources - The resourceskey - The resource keyhandler - The SAX event consumer
org.xml.sax.SAXException - If something goes wrong
protected org.xml.sax.Attributes getAttributes(java.lang.String name,
java.lang.String value)
throws org.xml.sax.SAXException
name - The attribute namevalue - The attribute value
org.xml.sax.SAXException - If something goes wrong
protected void sendElement(java.lang.String eName,
java.lang.String eText,
java.lang.String aName,
java.lang.String aValue,
XMLConsumer handler)
throws org.xml.sax.SAXException
eName - The name of the elementeText - The text valueaName - The name of the attributeaValue - The value of the attributehandler - The SAX event consumer
org.xml.sax.SAXException - If something goes wrong
protected void sendElement(java.lang.String eName,
java.lang.String eText,
XMLConsumer handler)
throws org.xml.sax.SAXException
eName - The name of the elementeText - The text valuehandler - The SAX event consumer
org.xml.sax.SAXException - If something goes wrong
protected void serializeIt(java.lang.Object bean,
java.lang.String name,
XMLConsumer handler,
java.util.Vector stack)
throws org.xml.sax.SAXException
bean - The object you want serialized.name - The name of the object, used for element
<name/>handler - XMLConsumerstack - Vector of objects we're serializing since the
first calling of this function (to prevent looping on circular
references).
org.xml.sax.SAXException - If something goes wrong
protected void outputJDOM(org.jdom.Document d,
XMLConsumer handler)
handler - The SAX event consumer
protected void outputJDOM(org.jdom.Element e,
XMLConsumer handler)
e - The elementhandler - The SAX event consumer
protected void outputNode(org.w3c.dom.Node n,
XMLConsumer handler)
n - The nodehandler - The SAX event consumer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||