com.waveset.object
Class Form.Reference

java.lang.Object
  extended bycom.waveset.util.AbstractXmlObject
      extended bycom.waveset.object.FormItem
          extended bycom.waveset.object.Form.Reference
All Implemented Interfaces:
com.sun.idm.debugger.common.Locatable, javax.naming.Referenceable, XmlObject
Direct Known Subclasses:
Form.FieldRef, Form.FormRef
Enclosing class:
Form

public abstract static class Form.Reference
extends FormItem

Inner class used to represent a form or field reference. The inherited "name" field is used to mean the name of the referenced item. // For field references, we assume these // are unique within the included forms. Might want to allow // an optional "form" attribute to select a specific form to // search in, or allow a qualified name?


Field Summary
 
Fields inherited from class com.waveset.util.AbstractXmlObject
_trace, code_id
 
Constructor Summary
Form.Reference()
           
Form.Reference(java.lang.String name)
           
 
Method Summary
 java.lang.String getBaseContext()
          Retreives the base context of this reference whether it was set as an attribute or as a child property called 'baseContext'.
 java.lang.String getBaseContext(ExState state)
          Retreives the base context of this reference whether it was set as an attribute or as a child property called 'baseContext'.
 java.lang.String getName()
          Retreives the name of this reference whether it was set as an attribute or as a child property called 'name'.
 java.lang.String getName(ExState state)
          Retreives the name of this reference whether it was set as an attribute or as a child property called 'name'.
 java.util.List getProperties()
           
 java.lang.Object getProperty(java.lang.String name)
          Retreives the value of a property.
 java.lang.Object getProperty(java.lang.String name, ExState state)
          Retreives the value of a property
 void link(ExEnvironment env)
          Link expressions within us into the environment.
 void parseXml(org.w3c.dom.Element e)
           
 void setBaseContext(java.lang.String s)
           
 void setName(java.lang.String s)
           
 void setProperties(java.util.List props)
           
 void toXml(java.lang.StringBuffer b, int indent)
          Serialize into a buffer with optional indentation.
 
Methods inherited from class com.waveset.object.FormItem
addCommonAttributes, addItem, addItem, addItems, clearItems, getComments, getForm, getItemList, getItems, getLocation, getParent, parseChild, parseCommonAttributes, setComments, setItems, setLocation, setParent, toXmlChildren
 
Methods inherited from class com.waveset.util.AbstractXmlObject
addXmlHeader, cloneObject, dump, dumpFile, getElementName, 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
 

Constructor Detail

Form.Reference

public Form.Reference()

Form.Reference

public Form.Reference(java.lang.String name)
Method Detail

getName

public java.lang.String getName()
Retreives the name of this reference whether it was set as an attribute or as a child property called 'name'. If the name was set via a call to setName(String) or in the constructor it takes priority over the property value. If name was set via a property and the property value is calculated from an expression, this method returns null. For expressions use getName(com.waveset.expression.ExState).

Overrides:
getName in class FormItem
Returns:
name of this form reference

getName

public java.lang.String getName(ExState state)
                         throws WavesetException
Retreives the name of this reference whether it was set as an attribute or as a child property called 'name'. If the name was set via a call to setName(String) or in the constructor it takes priority over the property value.

Returns:
name of this form reference
Throws:
WavesetException

setName

public void setName(java.lang.String s)
Overrides:
setName in class FormItem

getBaseContext

public java.lang.String getBaseContext()
Retreives the base context of this reference whether it was set as an attribute or as a child property called 'baseContext'. If the base context was set via a call to setBaseContext(String) it takes priority over the property value. If base context was set via a property and the property value is calculated from an expression, this method returns null. For expressions use getBaseContext(com.waveset.expression.ExState).

Returns:
name of this form reference

getBaseContext

public java.lang.String getBaseContext(ExState state)
                                throws WavesetException
Retreives the base context of this reference whether it was set as an attribute or as a child property called 'baseContext'. If the base context was set via a call to setBaseContext(String) it takes priority over the property value.

Returns:
name of this form reference
Throws:
WavesetException

setBaseContext

public void setBaseContext(java.lang.String s)

getProperties

public java.util.List getProperties()

getProperty

public java.lang.Object getProperty(java.lang.String name)
Retreives the value of a property. Note that if the value of the property is calculated from an expression this method returns null. In most cases you should favor getProperty(String, com.waveset.expression.ExState)

Parameters:
name -
Returns:
value of the property

getProperty

public java.lang.Object getProperty(java.lang.String name,
                                    ExState state)
                             throws WavesetException
Retreives the value of a property

Parameters:
name -
state -
Returns:
value of the property
Throws:
WavesetException

setProperties

public void setProperties(java.util.List props)

parseXml

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

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

link

public void link(ExEnvironment env)
Link expressions within us into the environment.

Overrides:
link in class FormItem