ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able
Interface AbleBeanContainer

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
AbleAgent

public interface AbleBeanContainer
extends java.io.Serializable

The AbleBeanContainer interface defines behavior for ABLE objects that can contain multiple AbleBean objects.


Method Summary
 void addBean(AbleBean theAbleBean)
          Adds a bean to this container.
 boolean containsBean(AbleBean theAbleBean)
          Indicates if a specific bean is present.
 boolean containsBean(java.lang.String theName)
          Indicates if a bean with a specific name is present.
 AbleBean getBean(java.lang.String theName)
          Returns a bean with a specific name from this container.
 java.util.Vector getBeans()
          Returns a list of all contained beans.
 java.lang.String getName()
          Returns the name of this container bean.
 void removeAllBeans()
          Removes all beans from this container.
 void removeBean(AbleBean theAbleBean)
          Removes a bean from this container, and sets the bean's parent to null.
 void removeBean(java.lang.String theName)
          A convenience method to remove a bean by name which calls removeBean(AbleBean).
 

Method Detail

addBean

public void addBean(AbleBean theAbleBean)
             throws AbleException
Adds a bean to this container.
Parameters:
theAbleBean - A bean that is to be added to this container. If the specified bean is already present, the implementation may choose to throw an exception.

Throws:
AbleException - If an error occurs.

removeBean

public void removeBean(AbleBean theAbleBean)
                throws AbleException
Removes a bean from this container, and sets the bean's parent to null.
Parameters:
theAbleBean - A bean that is to be removed from this container. If the specified bean is not present, the implementor may either throw an exception or ignore the request as desired.
Throws:
AbleException - If an error occurs.

removeBean

public void removeBean(java.lang.String theName)
                throws AbleException
A convenience method to remove a bean by name which calls removeBean(AbleBean).
Parameters:
theName - A name of a bean that is to be removed from this container.
Throws:
AbleException - If an error occurs.

removeAllBeans

public void removeAllBeans()
                    throws AbleException
Removes all beans from this container. Sets each bean's parent to null.
Throws:
AbleException - If an error occurs.

containsBean

public boolean containsBean(AbleBean theAbleBean)
Indicates if a specific bean is present. The determination is done by using AbleBean equality.
Parameters:
theAbleBean - A bean that to find in this container.

Returns:
true if the specific bean is present, false otherwise.

containsBean

public boolean containsBean(java.lang.String theName)
Indicates if a bean with a specific name is present. The determination is done by comparing bean names.
Parameters:
theName - The specific name of a bean to find in this container.

Returns:
true if the named bean is present, false otherwise.

getBean

public AbleBean getBean(java.lang.String theName)
Returns a bean with a specific name from this container.
Parameters:
theName - The specific name of a bean to be returned.
Returns:
A reference to the found bean, or null if the bean is not contained.

getBeans

public java.util.Vector getBeans()
Returns a list of all contained beans.
Returns:
All contained beans. Note that the result may be empty, and that there is no implied order to the list elements.

getName

public java.lang.String getName()
Returns the name of this container bean.
Returns:
The current name of this AbleBean object or the empty string if no name has been set. The value is never expected to be null.

ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003