com.sapportals.wcm.crt.component

Interface IComponentManager

All Known Subinterfaces:
IContainerManager

public interface IComponentManager

A component manager manages all root components of a CRT client or all components within a container component. Components are identified by a key.

Copyright (c) SAP AG 2001-2002


Nested Class Summary
static interface IComponentManager.IComponentInformation
          Defines a container for a compontent's information.
 
Method Summary
 boolean hasComponent(String key)
          Returns true if the component with the specified key exists.
 String[] listComponentKeys()
          Returns an array of the keys of all components contained in this manager.
 IComponent lookupComponent(String key)
          Returns the component instance for the specified key or null if the component was not found.
 IComponentManager.IComponentInformation lookupComponentInformation(String key)
          Performs a lookup with the specified key and returns information about the component's current state.
 void releaseComponent(IComponent component)
          Releases the component.
 

Method Detail

lookupComponent

IComponent lookupComponent(String key)
                           throws ComponentException
Returns the component instance for the specified key or null if the component was not found. If the component was not started yet (state is NOT_INIT) the manager will try to start it.

Parameters:
key - The component key to look for. Keys are case-sensitive.

The caller must subseqently call releaseComponent() when it is finished using the component. This is optional for thread-safe components.

Returns:
the component instance.
Throws:
ComponentException - If the component could not be instanciated.

hasComponent

boolean hasComponent(String key)
Returns true if the component with the specified key exists.

Parameters:
key - The component key to look for. Keys are case-sensitive.
Returns:
True if the component exists.

releaseComponent

void releaseComponent(IComponent component)
Releases the component. This method should be called when the caller is finished using the component. It must be called for all components that do not implement the IThreadSafe interface - it is optional for thread-safe components.

Parameters:
component - A reference to the component to release.

listComponentKeys

String[] listComponentKeys()
Returns an array of the keys of all components contained in this manager.

Returns:
An array of the keys of all components contained in this manager.

lookupComponentInformation

IComponentManager.IComponentInformation lookupComponentInformation(String key)
                                                                   throws ComponentException
Performs a lookup with the specified key and returns information about the component's current state. In contrast to the lookupComponent() method the manager will NOT try to start the component - that means the returned state might be NOT_INIT. Note that the returned object is NOT an instance of the component (but some special object which only contains the collected data).

Parameters:
key - The component key to look for. Keys are case-sensitive.
Returns:
Information about the component's current state.
Throws:
ComponentException
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice