com.waveset.object
Class AttributeRef

java.lang.Object
  extended bycom.waveset.util.AbstractXmlObject
      extended bycom.waveset.object.AttributeRef
All Implemented Interfaces:
javax.naming.Referenceable, XmlObject

public class AttributeRef
extends AbstractXmlObject


Field Summary
static java.lang.String ATT_ACCOUNT_ID
           
static java.lang.String ATT_ATTRIBUTE
           
static java.lang.String ATT_TARGET_ATTRIBUTE
           
static java.lang.String ELEMENT
          Our XML element name.
 
Fields inherited from class com.waveset.util.AbstractXmlObject
_trace, code_id
 
Constructor Summary
AttributeRef()
           
AttributeRef(org.w3c.dom.Element e)
           
 
Method Summary
 java.lang.String getAccountId()
           
 java.lang.String getAttribute()
           
 java.lang.String getElementName()
          Return the element name.
 Resource getResource(ObjectCache cache)
           
 ObjectRef getResourceRef()
           
 java.lang.String getTargetAttribute()
           
 boolean isReferencing(ResourceInfo info)
          Return true if a ResourceInfo is associated with the same account as that referenced by this object.
 void parseXml(org.w3c.dom.Element e)
           
 void setAccountId(java.lang.String s)
           
 void setAttribute(java.lang.String s)
           
 void setResource(ObjectRef ref)
           
 void setResource(Resource res)
           
 void setResource(java.lang.String name)
           
 void setTargetAttribute(java.lang.String s)
           
 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

ELEMENT

public static final java.lang.String ELEMENT
Our XML element name.

See Also:
Constant Field Values

ATT_ACCOUNT_ID

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

ATT_ATTRIBUTE

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

ATT_TARGET_ATTRIBUTE

public static final java.lang.String ATT_TARGET_ATTRIBUTE
See Also:
Constant Field Values
Constructor Detail

AttributeRef

public AttributeRef()

AttributeRef

public AttributeRef(org.w3c.dom.Element e)
             throws WavesetException
Method Detail

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

getResourceRef

public ObjectRef getResourceRef()

getResource

public Resource getResource(ObjectCache cache)
                     throws WavesetException
Throws:
WavesetException

setResource

public void setResource(java.lang.String name)

setResource

public void setResource(ObjectRef ref)

setResource

public void setResource(Resource res)

getAccountId

public java.lang.String getAccountId()

setAccountId

public void setAccountId(java.lang.String s)

getAttribute

public java.lang.String getAttribute()

setAttribute

public void setAttribute(java.lang.String s)

getTargetAttribute

public java.lang.String getTargetAttribute()

setTargetAttribute

public void setTargetAttribute(java.lang.String s)

isReferencing

public boolean isReferencing(ResourceInfo info)
Return true if a ResourceInfo is associated with the same account as that referenced by this object. // Think about factoring out an AccountRef class that both // ResourceInfo and AttributeRef can extend. There are several // places in the system where we build dumy ResourceInfo objects // just to represent an account reference.


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