org.enhydra.zeus.binding
Class BaseContainer

java.lang.Object
  |
  +--org.enhydra.zeus.binding.BaseBinding
        |
        +--org.enhydra.zeus.binding.BaseContainer
All Implemented Interfaces:
Binding, Container

public abstract class BaseContainer
extends BaseBinding
implements Container

Container implements the Binding interface and defines behavior for a binding that can contain other bindings (usually Property implementations). It is used to represent objects which have nested objects.

This base implementation of Container defines the common functionality for all Container implementations, removing a need for them to duplicate code for this functionality. All implementations of Container should extend this class rather than directly implementing the Container interface.

Author:
Brett McLaughlin

Field Summary
protected  java.util.List properties
          The Property objects this Container holds.
 
Fields inherited from class org.enhydra.zeus.binding.BaseBinding
isJavaSerializable, isXMLRootElement, javaCollectionClass, javaImplementationPackage, javaInterfacePackage, javaName, javaType, javaVariableName, xmlName, xmlNamespaceURI, xmlParentType, xmlParentTypeNamespaceURI, xmlType, xmlTypeNamespaceURI
 
Constructor Summary
BaseContainer()
           
 
Method Summary
 void addProperty(Property property)
           This will add a Property to the member variables of this Container.
 void clearProperties()
           This will clear all the properties for this Container.
 java.util.List getProperties()
           This will return a list of all the Property objects that this Container has.
 boolean removeProperty(java.lang.String javaName)
           This will remove a Property from this Container, given the property's name.
 void setProperties(java.util.List properties)
           This does a wholesale replacement of this binding's current properties, removing all current ones and replacing with the supplied List of new properties.
 
Methods inherited from class org.enhydra.zeus.binding.BaseBinding
getJavaCollectionClass, getJavaImplementationPackage, getJavaInterfacePackage, getJavaName, getJavaType, getJavaVariableName, getXMLName, getXMLNamespaceURI, getXMLParentType, getXMLParentTypeNamespaceURI, getXMLType, getXMLTypeNamespaceURI, isJavaSerializable, isXMLRootElement, setIsJavaSerializable, setIsXMLRootElement, setJavaCollectionClass, setJavaImplementationPackage, setJavaInterfacePackage, setJavaName, setJavaType, setJavaVariableName, setXMLName, setXMLNamespaceURI, setXMLParentType, setXMLParentTypeNamespaceURI, setXMLType, setXMLTypeNamespaceURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.enhydra.zeus.Binding
getJavaCollectionClass, getJavaImplementationPackage, getJavaInterfacePackage, getJavaName, getJavaType, getJavaVariableName, getXMLName, getXMLNamespaceURI, getXMLParentType, getXMLParentTypeNamespaceURI, getXMLType, getXMLTypeNamespaceURI, isJavaSerializable, isXMLRootElement, setIsJavaSerializable, setIsXMLRootElement, setJavaCollectionClass, setJavaImplementationPackage, setJavaInterfacePackage, setJavaName, setJavaType, setJavaVariableName, setXMLName, setXMLNamespaceURI, setXMLParentType, setXMLParentTypeNamespaceURI, setXMLType, setXMLTypeNamespaceURI
 

Field Detail

properties

protected java.util.List properties
The Property objects this Container holds.
Constructor Detail

BaseContainer

public BaseContainer()
Method Detail

addProperty

public void addProperty(Property property)

This will add a Property to the member variables of this Container.

It is important to note that this is simply an instance variable being added to (in most cases) a custom Java class definition. That variable/property doesn't have a value (although it might have a default value) until marshalling and unmarshalling occurs.

Specified by:
addProperty in interface Container
Parameters:
property - Property to add.

removeProperty

public boolean removeProperty(java.lang.String javaName)

This will remove a Property from this Container, given the property's name. If a successful removal occurs, the boolean value true is retruned. If no Property is found with the supplied Java name, the boolean value false is returned.

Specified by:
removeProperty in interface Container
Parameters:
javaName - String Java name of Property to remove.
Returns:
boolean - indicates whether the specified named Property was found and removed.

setProperties

public void setProperties(java.util.List properties)

This does a wholesale replacement of this binding's current properties, removing all current ones and replacing with the supplied List of new properties.

Specified by:
setProperties in interface Container
Parameters:
properties - List of properties to use for this container.

getProperties

public java.util.List getProperties()

This will return a list of all the Property objects that this Container has. If there are none, this will return an empty List.

Specified by:
getProperties in interface Container
Returns:
List - properties for this Container.

clearProperties

public void clearProperties()

This will clear all the properties for this Container.

Specified by:
clearProperties in interface Container


Copyright © 2001 Enhydra. All Rights Reserved.