org.enhydra.zeus.binding
Class BaseContainer

org.enhydra.zeus.binding.BaseBinding
  |
  +--org.enhydra.zeus.binding.BaseContainer

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
Version: 1.0

Method Summary
 voidaddProperty(Property property)
           This will add a Property to the member variables of this Container.
 voidclearProperties()
           This will clear all the properties for this Container.
 ListgetProperties()
           This will return a list of all the Property objects that this Container has.
 booleanremoveProperty(String propertyName)
           This will remove a Property from this Container, given the property's name.

Methods inherited from class org.enhydra.zeus.binding.BaseBinding
getJavaType, getName, setJavaType, setName

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.

Parameters:
property - Property to add.

clearProperties

public void clearProperties()

This will clear all the properties for this Container.


getProperties

public 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.

Returns: List - properties for this Container.

removeProperty

public boolean removeProperty(String propertyName)

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 name, the boolean value false is returned.

Parameters:
propertyName - String name of Property to remove.
Returns: boolean - indicates whether the specified named Property was found and removed.

Association Links

to Class java.util.List

The {@link Property} objects this Container holds.