org.apache.avalon.excalibur.system
Interface RoleManager

All Known Implementing Classes:
AbstractRoleManager

public interface RoleManager

RoleManager Interface, use this to specify the Components and how they correspond to easy shorthand names. The RoleManager assumes a flat relationship of shorthand names to classes, and classes to roles.

Since:
4.1
Version:
CVS $Revision: 1.3 $ $Date: 2002/01/30 15:44:06 $
Author:
Berin Loritsch

Method Summary
 java.lang.Class[] getClassesForRole(java.lang.String role)
          Get an array of classes registered with the role manager that implement a role.
 java.lang.Class getClassForName(java.lang.String shorthandName)
          Find the Class for the given shorthand name.
 java.lang.Class getHandlerClassForClass(java.lang.Class className)
          Retrieves the handler class name for the specified class.
 java.lang.String getNameForClass(java.lang.Class component)
          This method is merely a hint for serialization.
 java.lang.String getRoleForClass(java.lang.Class component)
          Get the Role name for a specific class.
 

Method Detail

getClassForName

public java.lang.Class getClassForName(java.lang.String shorthandName)
Find the Class for the given shorthand name. If there is no correspondence between the class and the shorthand name, the method returns null. If this RoleManager does not have the match, and there is a parent RoleManager, the parent will be asked to resolve the request.

getNameForClass

public java.lang.String getNameForClass(java.lang.Class component)
This method is merely a hint for serialization. If this RoleManager does not have the match, and there is a parent RoleManager, the parent will be asked to resolve the request.

getRoleForClass

public java.lang.String getRoleForClass(java.lang.Class component)
Get the Role name for a specific class. If the class does not belong to a Component, or the Role is not easily determinable, this method will return null. If this RoleManager does not have the match, and there is a parent RoleManager, the parent will be asked to resolve the request.

getClassesForRole

public java.lang.Class[] getClassesForRole(java.lang.String role)
Get an array of classes registered with the role manager that implement a role. If this RoleManager does not have the match, and there is a parent RoleManager, the parent will be asked to resolve the request.

getHandlerClassForClass

public java.lang.Class getHandlerClassForClass(java.lang.Class className)
Retrieves the handler class name for the specified class. This is called for every Component Implementation. If this RoleManager does not have the match, and there is a parent RoleManager, the parent will be asked to resolve the handler's class name.
Parameters:
class - The class of the Component in question.
Returns:
the Class instance of the ComponentHandler.


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.