com.waveset.object
Class Library

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

public class Library
extends AbstractXmlObject
implements Extension

An XmlObject that serves as a hierarchical container for a collection of related objects. This will be stored inside a Configuration object when persisted in the repository.


Nested Class Summary
static interface Library.Member
          An interface that may be supported by objects in the library.
 
Field Summary
static java.lang.String code_id
           
static java.lang.String EL_COMMENTS
           
static java.lang.String ELEMENT
          The name of our XML element.
 
Fields inherited from class com.waveset.util.AbstractXmlObject
_trace
 
Constructor Summary
Library()
           
Library(org.w3c.dom.Element e)
           
 
Method Summary
 void addItem(java.lang.Object o)
           
 WSAttribute getAttributeValues(java.lang.String attrName)
           
 java.lang.String getComments()
           
 PersistentObject getContainer()
           
 java.lang.String getElementName()
          Return the element name.
 ExEnvironment getEnvironment()
           
 java.util.List getItems()
           
 java.lang.String getName()
           
 java.lang.Object getObject(java.lang.String name)
          Locate an object in the library.
 java.lang.Object getOwner()
           
 boolean isDisabled()
           
 void listQueryableAttributes(java.util.List qattrs)
          Allows the extension to contribute defined attributes that this type of extension may expose as queryable attributes.
 void listSummaryAttributes(java.util.List sattrs)
          Allows the extension to contribute defined attributes that this type of extension may expose as summary attributes.
 void parseXml(org.w3c.dom.Element e)
          The signature used by our constructor, and required by XmlObject.
 void removeItem(java.lang.Object obj)
          Remove an item from the library.
 void replaceItem(java.lang.Object old, java.lang.Object neu)
          Replace one library item with another.
 void setComments(java.lang.String s)
           
 void setContainer(PersistentObject po)
           
 void setDisabled(boolean b)
           
 void setItems(java.util.List items)
           
 void setName(java.lang.String s)
           
 void setOwner(java.lang.Object o)
          Allows the extension to keep a back pointer to its container.
 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
The name of our XML element.

See Also:
Constant Field Values

EL_COMMENTS

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

Library

public Library()

Library

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

getContainer

public PersistentObject getContainer()

setContainer

public void setContainer(PersistentObject po)

setName

public void setName(java.lang.String s)

setDisabled

public void setDisabled(boolean b)

setComments

public void setComments(java.lang.String s)

setItems

public void setItems(java.util.List items)

addItem

public void addItem(java.lang.Object o)

replaceItem

public void replaceItem(java.lang.Object old,
                        java.lang.Object neu)
Replace one library item with another. Convenient for the library editor. Retain the same list position so we don't have to rebuild the tree view. If the original item was not found, just add the new one.


removeItem

public void removeItem(java.lang.Object obj)
Remove an item from the library.


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

getName

public java.lang.String getName()

isDisabled

public boolean isDisabled()

getComments

public java.lang.String getComments()

getItems

public java.util.List getItems()

getEnvironment

public ExEnvironment getEnvironment()

getObject

public java.lang.Object getObject(java.lang.String name)
Locate an object in the library. For now we assume that the objects have to have unique names.


parseXml

public void parseXml(org.w3c.dom.Element e)
              throws WavesetException
The signature used by our constructor, and required by XmlObject. We assume we're the root and allocate a new ExEnvironment.

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

getOwner

public java.lang.Object getOwner()
Specified by:
getOwner in interface Extension

setOwner

public void setOwner(java.lang.Object o)
Allows the extension to keep a back pointer to its container.

Specified by:
setOwner in interface Extension

listQueryableAttributes

public void listQueryableAttributes(java.util.List qattrs)
Allows the extension to contribute defined attributes that this type of extension may expose as queryable attributes.

Specified by:
listQueryableAttributes in interface Extension

listSummaryAttributes

public void listSummaryAttributes(java.util.List sattrs)
Allows the extension to contribute defined attributes that this type of extension may expose as summary attributes.

Specified by:
listSummaryAttributes in interface Extension

getAttributeValues

public WSAttribute getAttributeValues(java.lang.String attrName)
Specified by:
getAttributeValues in interface Extension
Returns:
any attribute values that the extension may have for the specified attribute.