org.apache.avalon.excalibur.component
Class DefaultRoleManager

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.avalon.excalibur.component.AbstractDualLogEnabled
          extended byorg.apache.avalon.excalibur.component.DefaultRoleManager
All Implemented Interfaces:
Configurable, LogEnabled, Loggable, RoleManager

Deprecated. ECM is no longer supported

public class DefaultRoleManager
extends AbstractDualLogEnabled
implements RoleManager, Configurable

Default RoleManager implementation. It populates the RoleManager from a configuration file.

Since:
4.0
Version:
CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:14 $
Author:
Avalon Development Team

Constructor Summary
DefaultRoleManager()
          Deprecated. Default constructor--this RoleManager has no parent.
DefaultRoleManager(RoleManager parent)
          Deprecated. Alternate constructor--this RoleManager has the specified parent.
 
Method Summary
 void configure(Configuration configuration)
          Deprecated. Reads a configuration object and creates the role, shorthand, and class name mapping.
 java.lang.String getDefaultClassNameForHint(java.lang.String role, java.lang.String shorthand)
          Deprecated. Retrieves a default class name for a role/hint combination.
 java.lang.String getDefaultClassNameForRole(java.lang.String role)
          Deprecated. Retrieves the default class name for the specified role.
 java.lang.String getRoleForName(java.lang.String shorthandName)
          Deprecated. Retrieves the real role name from a shorthand name.
 
Methods inherited from class org.apache.avalon.excalibur.component.AbstractDualLogEnabled
getLogkitLogger, setLogger
 
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

DefaultRoleManager

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


DefaultRoleManager

public DefaultRoleManager(RoleManager parent)
Deprecated. 
Alternate constructor--this RoleManager has the specified parent.

Parameters:
parent - The parent RoleManager.
Method Detail

getRoleForName

public final java.lang.String getRoleForName(java.lang.String shorthandName)
Deprecated. 
Retrieves the real role name from a shorthand name. Usually the shorthand name refers to a configuration element name. If this RoleManager does not have the match, and there is a parent RoleManager, the parent will be asked to resolve the role.

Specified by:
getRoleForName in interface RoleManager
Parameters:
shorthandName - The shortname that is an alias for the role.
Returns:
the official role name.

getDefaultClassNameForRole

public final java.lang.String getDefaultClassNameForRole(java.lang.String role)
Deprecated. 
Retrieves the default class name for the specified role. This is only called when the configuration does not specify the class explicitly. If this RoleManager does not have the match, and there is a parent RoleManager, the parent will be asked to resolve the class name.

Specified by:
getDefaultClassNameForRole in interface RoleManager
Parameters:
role - The role that has a default implementation.
Returns:
the Fully Qualified Class Name (FQCN) for the role.

getDefaultClassNameForHint

public final java.lang.String getDefaultClassNameForHint(java.lang.String role,
                                                         java.lang.String shorthand)
Deprecated. 
Retrieves a default class name for a role/hint combination. This is only called when a role is mapped to a DefaultComponentSelector, and the configuration elements use shorthand names for the type of component. If this RoleManager does not have the match, and there is a parent RoleManager, the parent will be asked to resolve the class name.

Specified by:
getDefaultClassNameForHint in interface RoleManager
Parameters:
role - The role that this shorthand refers to.
shorthand - The shorthand name for the type of Component
Returns:
the FQCN for the role/hint combination.

configure

public final void configure(Configuration configuration)
                     throws ConfigurationException
Deprecated. 
Reads a configuration object and creates the role, shorthand, and class name mapping.

Specified by:
configure in interface Configurable
Parameters:
configuration - The configuration object.
Throws:
ConfigurationException - if the configuration is malformed


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