com.filenet.wcm.toolkit.server.base
Class WcmDpContainer

java.lang.Object
  extended bycom.filenet.wcm.toolkit.server.base.WcmDpContainer
Direct Known Subclasses:
WcmController, WcmModule

public class WcmDpContainer
extends java.lang.Object

WcmDpContainer provides data provider binding functionality for any classes that derive from it. Accessing bound data providers is accomplished inside of a UI or DP module by calling queryDataProvider(String type).


Constructor Summary
WcmDpContainer()
           
 
Method Summary
 void addDataProvider(WcmDpModuleInterface dp)
          Associate an instance of a data provider with this module.
 void addDataProvider(WcmDpModuleInterface dp, java.lang.Class superClass)
          Associate an instance of a data provider with this module.
 WcmDpModuleInterface queryDataProvider(java.lang.String type)
          Query for an associated data provider (added with addDataProvider) of the specified type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WcmDpContainer

public WcmDpContainer()
Method Detail

addDataProvider

public void addDataProvider(WcmDpModuleInterface dp)
Associate an instance of a data provider with this module. The data providers are keyed by their class name.

Parameters:
dp - A reference to a data provider.

addDataProvider

public void addDataProvider(WcmDpModuleInterface dp,
                            java.lang.Class superClass)
                     throws java.lang.Exception
Associate an instance of a data provider with this module. Typically a data provider is keyed by its class name, but this call allows the specification of a superclass to reference for the class name. The data provider passed in is tested to confirm instanceof the specified superclass. If valid, the data provider is bound using the superclass name instead of its own class name.

Parameters:
dp -
superClass -
Throws:
java.lang.Exception

queryDataProvider

public WcmDpModuleInterface queryDataProvider(java.lang.String type)
Query for an associated data provider (added with addDataProvider) of the specified type.

Parameters:
type - The type name for the data provider. All data providers should follow the convention of providing a public static final TYPE that can be passed here.
Returns:
An instance of the data provider if found, otherwise null.


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.