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

public 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

public 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

public 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

public 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

public 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


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.