org.apache.fulcrum.testcontainer
Class ECMContainer

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.fulcrum.testcontainer.ECMContainer
All Implemented Interfaces:
org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.logger.LogEnabled, Container

public class ECMContainer
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements Container

This is a simple ECM based container that can be used in unit test of the fulcrum components.

Version:
$Id: ECMContainer.java 223140 2004-11-01 13:29:25Z epugh $
Author:
Quinton McCombs

Field Summary
 
Fields inherited from interface org.apache.fulcrum.testcontainer.Container
COMPONENT_APP_ROOT, URN_AVALON_HOME, URN_AVALON_TEMP
 
Constructor Summary
ECMContainer()
          Constructor
 
Method Summary
 void dispose()
          Disposes of the container and releases resources
 void initialize()
          Initializes the container
 java.lang.Object lookup(java.lang.String roleName)
          Returns an instance of the named component
 void release(org.apache.avalon.framework.component.Component component)
          Releases the component
 void release(java.lang.Object component)
           
 void startup(java.lang.String configFileName, java.lang.String roleFileName, java.lang.String parametersFileName)
          Starts up the container and initializes it.
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ECMContainer

public ECMContainer()
Constructor

Method Detail

startup

public void startup(java.lang.String configFileName,
                    java.lang.String roleFileName,
                    java.lang.String parametersFileName)
Starts up the container and initializes it.

Specified by:
startup in interface Container
Parameters:
configFileName - Name of the component configuration file
roleFileName - Name of the role configuration file

initialize

public void initialize()
                throws java.lang.Exception
Initializes the container

Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable
Throws:
java.lang.Exception - generic exception

dispose

public void dispose()
Disposes of the container and releases resources

Specified by:
dispose in interface org.apache.avalon.framework.activity.Disposable

lookup

public java.lang.Object lookup(java.lang.String roleName)
                        throws org.apache.avalon.framework.component.ComponentException
Returns an instance of the named component

Specified by:
lookup in interface Container
Parameters:
roleName - Name of the role the component fills.
Throws:
org.apache.avalon.framework.component.ComponentException - generic exception

release

public void release(org.apache.avalon.framework.component.Component component)
Releases the component

Parameters:
component -

release

public void release(java.lang.Object component)
Specified by:
release in interface Container


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.