Expresso 5-5-0

com.jcorporate.expresso.kernel
Class ContainerComponentBase

java.lang.Object
  extended bycom.jcorporate.expresso.kernel.ComponentBase
      extended bycom.jcorporate.expresso.kernel.ContainerComponentBase
All Implemented Interfaces:
Containable, Describable, ExpressoComponent, Serializable
Direct Known Subclasses:
DataContext, JdbcPersistenceManager, PersistenceManager, RootContainer, Schema

public abstract class ContainerComponentBase
extends ComponentBase
implements Containable

This class provides basic implementations of the Containable Interface to save the typical programmer lots of typing. Under 99% of the conditions it should be sufficient to derivce your container component from this class instead of implementing the interfaces in a raw fashion.

Since:
Expresso 5.1
Version:
$Revision: 1.6 $ on $Date: 2003/06/03 06:12:21 $
Author:
Michael Rimov
See Also:
Serialized Form

Constructor Summary
ContainerComponentBase()
          Default constructor that currently does nothing.
 
Method Summary
 ComponentContainer getContainerImplementation()
          Retrieves the actual container implementation
 ExpressoComponent locateComponent(String componentName)
          Convenience method for Container clients.
 void setContainerImplementation(ComponentContainer newContainer)
          Sets the marker to the ComponentContainer (which has a 1:1 instance mapping with Containable).
 
Methods inherited from class com.jcorporate.expresso.kernel.ComponentBase
getMetaData, getMetadataLocation, getParent, setMetaData, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jcorporate.expresso.kernel.ExpressoComponent
getMetaData, getParent, setParent
 

Constructor Detail

ContainerComponentBase

public ContainerComponentBase()
Default constructor that currently does nothing.

Method Detail

setContainerImplementation

public void setContainerImplementation(ComponentContainer newContainer)
Sets the marker to the ComponentContainer (which has a 1:1 instance mapping with Containable). This is often called by the actual implementation of the ComponentContainer.

Specified by:
setContainerImplementation in interface Containable
Parameters:
newContainer - a ComponentCo

getContainerImplementation

public ComponentContainer getContainerImplementation()
Retrieves the actual container implementation

Specified by:
getContainerImplementation in interface Containable
Returns:
ComponentContainer

locateComponent

public ExpressoComponent locateComponent(String componentName)

Convenience method for Container clients. Recommended Implementation:

ExpressoComponent getComponent(String componentName) {
   return this.getContainerImplementation().getComponent(componentName); }

Specified by:
locateComponent in interface Containable
Parameters:
componentName - The name of the component to retrieve
Returns:
an ExpressoComponent or null if the specified name doesn't exist

Expresso 5-5-0

Please see www.jcorporate.com for information about new Expresso releases.