org.enhydra.zeus.binding
Interface Container

All Superinterfaces:
Binding
All Known Implementing Classes:
ContainerProperty, BaseContainer

public interface Container
extends Binding

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.

Examples of bindings that would be containers are Java custom objects with properties. However, Java objects that are pre-defined types but can contain other objects, such as a List, would not be containers, as their contents cannot be controlled in as fine-grained a fashion as custom objects can.

Version:
1.0
Author:
Brett McLaughlin

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 propertyName)
           This will remove a Property from this Container, given the property's name.
 
Methods inherited from interface org.enhydra.zeus.Binding
getJavaName, getJavaType, getXMLName, setJavaType, setXMLName
 

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.

removeProperty

public boolean removeProperty(java.lang.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.

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.

Returns:
List - properties for this Container.

clearProperties

public void clearProperties()

This will clear all the properties for this Container.



Copyright © 2001 Enhydra. All Rights Reserved.