com.waveset.object
Class XmlComponent

java.lang.Object
  extended bycom.waveset.util.AbstractXmlObject
      extended bycom.waveset.object.XmlComponent
All Implemented Interfaces:
javax.naming.Referenceable, XmlObject
Direct Known Subclasses:
FieldDisplay

public class XmlComponent
extends AbstractXmlObject

A class used to describe the construction parameters for an arbitrary Java object that follows the JavaBean convention for property access.


Field Summary
static java.lang.String code_id
           
static java.lang.String ELEMENT
          Name of our element.
static java.lang.String PROP_CLASS
          Recognize a property with this name as an alternative to calling setClassName.
 
Fields inherited from class com.waveset.util.AbstractXmlObject
_trace
 
Constructor Summary
XmlComponent()
           
XmlComponent(org.w3c.dom.Element e)
           
XmlComponent(ExEnvironment env, org.w3c.dom.Element e)
           
 
Method Summary
 void addProperty(java.lang.String name, java.lang.Object value)
          Originally used addProperty rather than setProperty, keep for temporary compatibility.
 void addSubclassAttributes(java.lang.StringBuffer b)
           
static void clearOwner(XmlComponent component)
           
 java.lang.Object create(ExState state, java.lang.String pkg)
          Instantiate the object desicrbed by THIS object.
 java.lang.String getClassName()
           
 java.lang.String getElementName()
          Return the element name.
 java.lang.Object getOwner()
           
 java.util.List getProperties()
           
 java.lang.Object getProperty(ExState state, java.lang.String name)
           
 java.lang.Object getProperty(java.lang.String name)
           
 Property getPropertyObject(java.lang.String name)
           
 void link(ExEnvironment env)
          Link any expressions we may have into the environment.
 void parseSubclassAttributes(org.w3c.dom.Element e)
           
 void parseXml(ExEnvironment env, org.w3c.dom.Element e)
           
 void removeProperty(Property p)
           
 void removeProperty(java.lang.String name)
           
 void setClassName(java.lang.String s)
           
 void setDefaultProperty(java.lang.String name, java.lang.Object value)
           
 void setOwner(java.lang.Object owner)
           
static void setOwner(XmlComponent component, java.lang.Object owner)
           
 void setProperties(ExState state, java.lang.Object obj)
          Given a previously instantiated container object, assign any Property values specified by the display object.
 void setProperties(java.util.List list)
           
 void setProperty(Property p)
           
 void setProperty(java.lang.String name, java.lang.Object value)
          Assign a property value.
 void toXml(java.lang.StringBuffer b, int indent)
          Serialize into a buffer with optional indentation.
 
Methods inherited from class com.waveset.util.AbstractXmlObject
addXmlHeader, cloneObject, dump, dumpFile, getReference, println, setTrace, toIdentityString, toVerboseString, toVerboseString, toXml, toXml, toXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values

ELEMENT

public static final java.lang.String ELEMENT
Name of our element.

See Also:
Constant Field Values

PROP_CLASS

public static final java.lang.String PROP_CLASS
Recognize a property with this name as an alternative to calling setClassName.

See Also:
Constant Field Values
Constructor Detail

XmlComponent

public XmlComponent()

XmlComponent

public XmlComponent(org.w3c.dom.Element e)
             throws WavesetException

XmlComponent

public XmlComponent(ExEnvironment env,
                    org.w3c.dom.Element e)
             throws WavesetException
Method Detail

setClassName

public void setClassName(java.lang.String s)

getOwner

public java.lang.Object getOwner()

setOwner

public void setOwner(java.lang.Object owner)

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
Assign a property value.


addProperty

public void addProperty(java.lang.String name,
                        java.lang.Object value)
Originally used addProperty rather than setProperty, keep for temporary compatibility. This is referenced in some workflows with


setProperty

public void setProperty(Property p)

setDefaultProperty

public void setDefaultProperty(java.lang.String name,
                               java.lang.Object value)

removeProperty

public void removeProperty(java.lang.String name)

removeProperty

public void removeProperty(Property p)

link

public void link(ExEnvironment env)
Link any expressions we may have into the environment.


getElementName

public java.lang.String getElementName()
Description copied from class: AbstractXmlObject
Return the element name.

Specified by:
getElementName in interface XmlObject
Specified by:
getElementName in class AbstractXmlObject

getClassName

public java.lang.String getClassName()

getPropertyObject

public Property getPropertyObject(java.lang.String name)

getProperty

public java.lang.Object getProperty(ExState state,
                                    java.lang.String name)
                             throws WavesetException
Throws:
WavesetException

getProperty

public java.lang.Object getProperty(java.lang.String name)

getProperties

public java.util.List getProperties()

create

public java.lang.Object create(ExState state,
                               java.lang.String pkg)
                        throws WavesetException
Instantiate the object desicrbed by THIS object. The ExState must be passed in if any of the properties use expressions.

Throws:
WavesetException

setProperties

public void setProperties(ExState state,
                          java.lang.Object obj)
                   throws WavesetException
Given a previously instantiated container object, assign any Property values specified by the display object.

Throws:
WavesetException

setProperties

public void setProperties(java.util.List list)

toXml

public void toXml(java.lang.StringBuffer b,
                  int indent)
Description copied from class: AbstractXmlObject
Serialize into a buffer with optional indentation. This must be implemented by the subclass.

Specified by:
toXml in interface XmlObject
Specified by:
toXml in class AbstractXmlObject

addSubclassAttributes

public void addSubclassAttributes(java.lang.StringBuffer b)

parseXml

public void parseXml(ExEnvironment env,
                     org.w3c.dom.Element e)
              throws WavesetException
Throws:
WavesetException

parseSubclassAttributes

public void parseSubclassAttributes(org.w3c.dom.Element e)

setOwner

public static void setOwner(XmlComponent component,
                            java.lang.Object owner)

clearOwner

public static void clearOwner(XmlComponent component)