org.sakaiproject.api.kernel.component
Interface ComponentManager

All Known Implementing Classes:
SpringCompMgr

public interface ComponentManager

...

Version:
$Revision: 3290 $
Author:
University of Michigan, Sakai Software Development Team

Field Summary
static String SAKAI_COMPONENTS_ROOT_SYS_PROP
          The java system property name where the full path to the components packages.
 
Method Summary
 void close()
          Close the component manager, shutting down any created singletons.
 boolean contains(Class iface)
          Check if this interface Class has a registered component.
 boolean contains(String ifaceName)
          Check if this interface Class name has a registered component.
 Object get(Class iface)
          Find a component that is registered to provide this interface.
 Object get(String ifaceName)
          Find a component that is registered to provide this interface.
 Properties getConfig()
          Access the configuration properties used when configuring components.
 Set getRegisteredInterfaces()
          Get all interfaces registered in the component manager.
 void loadComponent(Class iface, Object component)
          Load a singleton already created component for this interface class as a singleton.
 void loadComponent(String ifaceName, Object component)
          Load a singleton already created component for this interface class as a singleton.
 

Field Detail

SAKAI_COMPONENTS_ROOT_SYS_PROP

public static final String SAKAI_COMPONENTS_ROOT_SYS_PROP
The java system property name where the full path to the components packages.

See Also:
Constant Field Values
Method Detail

get

public Object get(Class iface)
Find a component that is registered to provide this interface.

Parameters:
iface - The interface Class.
Returns:
a component instance, or null if not found.

get

public Object get(String ifaceName)
Find a component that is registered to provide this interface.

Parameters:
ifaceName - The fully qualified interface Class name.
Returns:
a component instance, or null if not found.

contains

public boolean contains(Class iface)
Check if this interface Class has a registered component.

Parameters:
iface - The interface Class.
Returns:
true if this interface Class has a registered component, false if not.

contains

public boolean contains(String ifaceName)
Check if this interface Class name has a registered component.

Parameters:
ifaceName - The fully qualified interface Class name.
Returns:
true if this interface has a registered component, false if not.

getRegisteredInterfaces

public Set getRegisteredInterfaces()
Get all interfaces registered in the component manager.

Returns:
A Set (String class name) of all interfaces registered in the component manager.

loadComponent

public void loadComponent(Class iface,
                          Object component)
Load a singleton already created component for this interface class as a singleton.

Parameters:
iface - The interface class.
component - The alread created component.

loadComponent

public void loadComponent(String ifaceName,
                          Object component)
Load a singleton already created component for this interface class as a singleton.

Parameters:
ifaceName - The fully qualified interface Class name.
component - The alread created component.

close

public void close()
Close the component manager, shutting down any created singletons.


getConfig

public Properties getConfig()
Access the configuration properties used when configuring components.

Returns:
The Properties with the configuration values used when configuring components.