com.filenet.wcm.toolkit.server.base

Interface WcmModuleInterface

All known subinterfaces:
WcmDpModuleInterface, WcmHeaderModuleInterface, WcmUiModuleInterface
All known implementing classes:
CompoundDocumentDataProvider, EProcessGranteeUtil, GlobalEventModule, HistoryDataProvider, RecordsManageDataProvider, WcmAnchorList, WcmAnchorTree, WcmAuthoringDataProvider, WcmAuthoringUtil, WcmDpModule, WcmEProcessDataProvider, WcmEProcessUtil, WcmHeaderModule, WcmJSPModule, WcmLayoutModule, WcmModule, WcmMultiPanelModule, WcmMultiPanelSequenceModule, WcmMultiPanelViewModule, WcmNavigationDataProvider, WcmSearchDataProvider, WcmSelectableAnchorList, WcmSignInModule, WcmUiModule, WcmWorkflowUtil, WcmXSLModule, WebContentDataProvider

  1. public interface WcmModuleInterface
WcmModuleInterface is the base for all modules, and defines methods that are common to all modules.

Method Summary

Modifier and Type Method and Description
  1. void
addDataProvider(WcmDpModuleInterface dp)
Associate an instance of a data provider with this module.
  1. void
cleanup()
Called by WcmController after persist(), when it's about to go to another JSP page.
  1. WcmDataStore
getDataStore()
Get the data store object.
  1. java.lang.Object
getModuleProperty(java.lang.String key)
Get a module-scoped property from the Data Store.
  1. java.lang.String
getName()
Get the unique name for this module.
  1. WcmModuleInterface
getParent()
Get the module's parent if this is a contained module.
  1. void
initialize()
Called by WcmController when the module is registered, and has access to the data store.
  1. void
persist()
Called by WcmController before cleanup(), when it's about to go to another Java™Server Pages (JSP) page.
  1. WcmDpModuleInterface
queryDataProvider(java.lang.String type)
Query for a data provider of the specified type.
  1. void
setController(WcmController c)
Called by WcmController as part of module registration/un-registration.
  1. void
setModuleProperty(java.lang.String key,java.lang.Object value)
Set a module-scoped property in the data store.
  1. void
setName(java.lang.String value)
Set the unique name for this module.
  1. void
setParent(WcmModuleInterface m)
Set the specified module as the parent of this module.

Method Detail

persist

  1. void persist()
  2. throws java.lang.Exception
Called by WcmController before cleanup(), when it's about to go to another Java™Server Pages (JSP) page. This is intended for future use.
Throws:
java.lang.Exception

cleanup

  1. void cleanup()
  2. throws java.lang.Exception
Called by WcmController after persist(), when it's about to go to another JSP page. The module should null out any module properties that it can reconstruct later to minimize memory consumption.
Throws:
java.lang.Exception

initialize

  1. void initialize()
  2. throws java.lang.Exception
Called by WcmController when the module is registered, and has access to the data store. Do "constructor" types of things here.
Throws:
java.lang.Exception

setName

  1. void setName(java.lang.String value)
  2. throws java.lang.Exception
Set the unique name for this module.
All modules must be given a unique string name. This will be used for two things:

  1. As part of the DataStore key that gets constructed when you use the setModuleProperty/getModuleProperty methods (to provide scoping)
  2. For the controller to dispatch events (i.e. eventTarget=name )

Parameters:
value - The name value.
Throws:
WcmException - toolkit.WcmModule.nameInvalid, if the name contains the illegal characters NAME_DELIMITER or ( . ).
java.lang.Exception

getName

  1. java.lang.String getName()
Get the unique name for this module. This will be different from the value that you pass to setName, if the module is being parented by another module. The name returned here will be fully qualified with any parent names.
Returns:
The fully qualified name value.
Throws:
WcmException - toolkit.WcmModule.nameInvalid, if the name contains the illegal characters NAME_DELIMITER or ( . ).

addDataProvider

  1. 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.

queryDataProvider

  1. WcmDpModuleInterface queryDataProvider( java.lang.String type)
Query for a data provider of the specified type. If you have one, a reference to it is returned. If not, a null pointer is returned.
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.

setModuleProperty

  1. void setModuleProperty(java.lang.String key,
  2. java.lang.Object value)
  3. throws java.lang.Exception
Set a module-scoped property in the data store.
Parameters:
key - The key name to use.
value - The value to set. null is valid, and clears the key.
Throws:
WcmException - (toolkit.WcmModule.setModulePropertyNullKey)
WcmException - (toolkit.WcmModule.dataStoreUndefined)
java.lang.Exception

getModuleProperty

  1. java.lang.Object getModuleProperty( java.lang.String key)
  2. throws java.lang.Exception
Get a module-scoped property from the Data Store.
Parameters:
key - The key name to use.
Returns:
The value associated with the key, or null.
Throws:
WcmException - (toolkit.WcmModule.getModulePropertyNullKey)
WcmException - (toolkit.WcmModule.dataStoreUndefined)
java.lang.Exception

getDataStore

  1. WcmDataStore getDataStore()
  2. throws java.lang.Exception
Get the data store object.
Returns:
The reference to the data store.
Throws:
WcmException - (toolkit.WcmModule.moduleNotRegistered)
WcmException - (toolkit.WcmModule.dataStoreUndefined)
java.lang.Exception

setParent

  1. void setParent(WcmModuleInterface m)
  2. throws java.lang.Exception
Set the specified module as the parent of this module. This registers the module.
Parameters:
m - The module that is to be this module's parent.
Throws:
WcmException - (toolkit.WcmModule.setParentAlreadyRegistered)
java.lang.Exception

getParent

  1. WcmModuleInterface getParent()
Get the module's parent if this is a contained module.
Returns:
A reference to the parent module or null if this is module is not contained.
Throws:
java.lang.Exception

setController

  1. void setController(WcmController c)
  2. throws java.lang.Exception
Called by WcmController as part of module registration/un-registration.
Throws:
WcmException - (toolkit.wcmModule.setControllerOnUnregisteredModule)
WcmException - (toolkit.wcmModule.setControllerRegisteredModule)
java.lang.Exception