org.apache.avalon.fortress.impl.role
Class AbstractMetaInfoManager

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.avalon.fortress.impl.role.AbstractMetaInfoManager
All Implemented Interfaces:
LogEnabled, MetaInfoManager
Direct Known Subclasses:
ECMMetaInfoManager, ServiceMetaManager

public abstract class AbstractMetaInfoManager
extends AbstractLogEnabled
implements MetaInfoManager

Provides the foundation for MetaInfoManagers.

Version:
CVS $Revision: 1.9 $
Author:
Avalon Development Team

Field Summary
 
Fields inherited from interface org.apache.avalon.fortress.MetaInfoManager
ROLE
 
Constructor Summary
AbstractMetaInfoManager()
          Default constructor--this RoleManager has no parent.
AbstractMetaInfoManager(MetaInfoManager parent)
          Create a MetaInfoManager with a parent manager.
AbstractMetaInfoManager(MetaInfoManager parent, java.lang.ClassLoader loader)
          Alternate constructor--this RoleManager has the specified parent.
AbstractMetaInfoManager(RoleManager parent)
          Create a MetaInfoManager with a parent manager.
 
Method Summary
protected  void addComponent(java.lang.String role, java.lang.String className, java.util.Properties meta, java.util.List deps)
          Addition of a component to the meta info manager.
protected  java.lang.ClassLoader getLoader()
          Get the classloader used for the RoleManager for any class that extends this one.
 MetaInfoEntry getMetaInfoForClassname(java.lang.String classname)
          Get a MetaInfoEntry for a component type.
 MetaInfoEntry getMetaInfoForShortName(java.lang.String shortname)
          Return the meta info relative to a supplied short name.
protected  boolean isAlreadyAdded(java.lang.String className)
          Let us know that the meta and dependency info has already been loaded for a given class name.
 
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

AbstractMetaInfoManager

public AbstractMetaInfoManager()
Default constructor--this RoleManager has no parent.


AbstractMetaInfoManager

public AbstractMetaInfoManager(RoleManager parent)
Create a MetaInfoManager with a parent manager.

Parameters:
parent - The parent RoleManager.

AbstractMetaInfoManager

public AbstractMetaInfoManager(MetaInfoManager parent)
Create a MetaInfoManager with a parent manager.

Parameters:
parent - The parent MetaInfoManager.

AbstractMetaInfoManager

public AbstractMetaInfoManager(MetaInfoManager parent,
                               java.lang.ClassLoader loader)
Alternate constructor--this RoleManager has the specified parent.

Parameters:
parent - The parent MetaInfoManager
loader - The class loader
Method Detail

addComponent

protected void addComponent(java.lang.String role,
                            java.lang.String className,
                            java.util.Properties meta,
                            java.util.List deps)
Addition of a component to the meta info manager.

Parameters:
role - the role associated with the component
className - the class name
meta - the properties object for the meta info

getMetaInfoForClassname

public MetaInfoEntry getMetaInfoForClassname(java.lang.String classname)
Get a MetaInfoEntry for a component type. This facilitates self-healing configuration files where the impl reads the configuration and translates all <component/> entries to use the short hand name for readability.

Specified by:
getMetaInfoForClassname in interface MetaInfoManager
Parameters:
classname - The component type name
Returns:
the proper MetaInfoEntry

getMetaInfoForShortName

public MetaInfoEntry getMetaInfoForShortName(java.lang.String shortname)
Return the meta info relative to a supplied short name.

Specified by:
getMetaInfoForShortName in interface MetaInfoManager
Parameters:
shortname - the short name
Returns:
the proper MetaInfoEntry

getLoader

protected java.lang.ClassLoader getLoader()
Get the classloader used for the RoleManager for any class that extends this one.

Returns:
ClassLoader

isAlreadyAdded

protected boolean isAlreadyAdded(java.lang.String className)
Let us know that the meta and dependency info has already been loaded for a given class name.

Parameters:
className - The name of the class to check
Returns:
true if it has been added


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.