com.raritantechnologies.xml.sax.filter.callbacks
Class TagAttributesMapObjectPropertySetter

java.lang.Object
  extended bycom.raritantechnologies.xml.sax.filter.AttributesModifier
      extended bycom.raritantechnologies.xml.sax.filter.callbacks.TagAttributesMapObjectPropertySetter
All Implemented Interfaces:
IConfigurable

public class TagAttributesMapObjectPropertySetter
extends AttributesModifier

SAX Content handler implementation that uses java Reflection to set a property on a target object when an element is encountered.

Sets the target objects property equal to a java.util.Map of the attribute name,values in the element. Works with ProgrammableSAXFilter.


Developed by Raritan Technologies Inc..

Author:
Ted Sullivan

Constructor Summary
TagAttributesMapObjectPropertySetter(java.lang.Object targetObject, java.lang.String setMethodName)
           
TagAttributesMapObjectPropertySetter(java.lang.Object targetObject, java.lang.String setMethodName, java.io.PrintStream errorLogger)
           
 
Method Summary
protected  org.xml.sax.helpers.AttributesImpl _modifyAttributes(org.xml.sax.helpers.AttributesImpl source)
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 void setErrorLogger(java.io.PrintStream errorLogger)
           
 void setPrintStackTrace(boolean printStackTrace)
           
 void setSetMethodName(java.lang.String setMethodName)
           
 void setTargetObject(java.lang.Object target)
           
 
Methods inherited from class com.raritantechnologies.xml.sax.filter.AttributesModifier
modifyAttributes, modifyAttributes, setNextMod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagAttributesMapObjectPropertySetter

public TagAttributesMapObjectPropertySetter(java.lang.Object targetObject,
                                            java.lang.String setMethodName)

TagAttributesMapObjectPropertySetter

public TagAttributesMapObjectPropertySetter(java.lang.Object targetObject,
                                            java.lang.String setMethodName,
                                            java.io.PrintStream errorLogger)
Method Detail

setTargetObject

public void setTargetObject(java.lang.Object target)

setSetMethodName

public void setSetMethodName(java.lang.String setMethodName)

_modifyAttributes

protected org.xml.sax.helpers.AttributesImpl _modifyAttributes(org.xml.sax.helpers.AttributesImpl source)
Specified by:
_modifyAttributes in class AttributesModifier

setErrorLogger

public void setErrorLogger(java.io.PrintStream errorLogger)

setPrintStackTrace

public void setPrintStackTrace(boolean printStackTrace)

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IConfigurable
Initializes the object from an XML tag or element. This method is called by the Framework as part of the application initializtion. see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory. Configurable objects that are owned or contained by other configurable objects will be initialized in by the parent object.