|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.filenet.wcm.toolkit.server.base.WcmDpContainer
com.filenet.wcm.toolkit.server.base.WcmModule
WcmModule is the default base class for all UI and data provider modules. It defines behavior and functionality that is common to all modules.
Field Summary | |
protected java.util.Locale |
locale
|
static java.lang.String |
NAME_DELIMITER
The delimiter used between qualifiers in the qualified (parented) module name (getName). |
Constructor Summary | |
WcmModule()
|
Method Summary | |
WcmModuleInterface |
addChild(java.lang.Class moduleClass,
java.lang.String moduleName)
Creates a new instance of a module, sets it's name, and adds it as a child to this module. |
void |
addChild(WcmModuleInterface m)
Add the specified module as a child to this module. |
void |
addChild(WcmModuleInterface m,
java.lang.String moduleName)
Add the specified module as a child to this module. |
void |
cleanup()
Called by WcmController after persist(), when it's about to go to another JSP page. |
void |
debugTrace(java.lang.Object output)
Prints out a debug message to the java console |
java.lang.Object |
getClassProperty(java.lang.String key)
Get a key-value in the data store. |
java.lang.Object |
getClassProperty(java.lang.String key,
java.lang.Object defaultValue,
boolean setIfNotFound,
boolean constructClass)
Get a key-value in the data store. |
protected java.util.List |
getClassPropertyKeys()
Deprecated. |
WcmConfigurationInterface |
getConfiguration()
Returns WcmConfigurationInterface |
WcmController |
getController()
Get the reference to the controller. |
WcmDataStore |
getDataStore()
Get the data store object. |
java.lang.Object |
getModuleProperty(java.lang.String key)
Get a key-value from the data store. |
java.lang.Object |
getModuleProperty(java.lang.String key,
java.lang.Object defaultValue)
Get a key-value from the data store. |
java.lang.Object |
getModuleProperty(java.lang.String key,
java.lang.Object defaultValue,
boolean setIfNotFound)
Get a key-value from the data store. |
java.lang.Object |
getModuleProperty(java.lang.String key,
java.lang.Object defaultValue,
boolean setIfNotFound,
boolean constructClass)
Get a key-value from the data store. |
protected java.util.List |
getModulePropertyKeys()
Deprecated. |
java.lang.String |
getName()
Get the unique name for this module. |
WcmModuleInterface |
getParent()
Get the module's parent if this is a contained module. |
java.lang.Object |
getWindowProperty(java.lang.String key)
Get a key-value in the data store. |
java.lang.Object |
getWindowProperty(java.lang.String key,
java.lang.Object defaultValue,
boolean setIfNotFound,
boolean constructClass)
Get a key-value in the data store. |
void |
initialize()
Called by WcmController when the module is registered, and has access to the data store. |
void |
persist()
Called by WcmController before cleanup(), when it's about to go to another Java™Server Pages (JSP) page. |
WcmDpModuleInterface |
queryDataProvider(java.lang.String type)
Query for an associated data provider (added with addDataProvider) of the specified type. |
void |
setClassProperty(java.lang.String key,
java.lang.Object value)
|
void |
setClassProperty(java.lang.String key,
java.lang.Object value,
boolean bForCache)
Set a key-value in the data store. |
void |
setController(WcmController c)
Called by WcmController as part of module registration/un-registration. |
void |
setModuleProperty(java.lang.String key,
java.lang.Object value)
Set a module-scoped property in the data store. |
void |
setModuleProperty(java.lang.String key,
java.lang.Object value,
boolean bForCache)
Set a key-value in the data store. |
void |
setName(java.lang.String value)
Set the unique name for this module. |
void |
setParent(WcmModuleInterface m)
Set the specified module as the parent of this module. |
protected void |
setPortletParent(WcmModuleInterface m)
We're in a portlet environment where multiple controllers are being created for a single request. |
void |
setWindowProperty(java.lang.String key,
java.lang.Object value,
boolean bForCache)
Set a key-value in the data store. |
Methods inherited from class com.filenet.wcm.toolkit.server.base.WcmDpContainer |
addDataProvider, addDataProvider |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.filenet.wcm.toolkit.server.base.WcmModuleInterface |
addDataProvider |
Field Detail |
public static final java.lang.String NAME_DELIMITER
protected java.util.Locale locale
Constructor Detail |
public WcmModule()
Method Detail |
public void initialize() throws java.lang.Exception
initialize
in interface WcmModuleInterface
java.lang.Exception
public void persist() throws java.lang.Exception
persist
in interface WcmModuleInterface
java.lang.Exception
public void cleanup() throws java.lang.Exception
cleanup
in interface WcmModuleInterface
java.lang.Exception
public void setName(java.lang.String value) throws java.lang.Exception
setName
in interface WcmModuleInterface
value
- The name value.
WcmException
- toolkit.WcmModule.nameInvalid, if the name contains the illegal characters NAME_DELIMITER or ( . ).
java.lang.Exception
public java.lang.String getName()
getName
in interface WcmModuleInterface
public WcmDpModuleInterface queryDataProvider(java.lang.String type)
queryDataProvider
in interface WcmModuleInterface
queryDataProvider
in class WcmDpContainer
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.
public void setModuleProperty(java.lang.String key, java.lang.Object value) throws java.lang.Exception
WcmModuleInterface
setModuleProperty
in interface WcmModuleInterface
key
- The key name to use.value
- The value to set. null is valid, and clears the key.
java.lang.Exception
Calls setModuleProperty(key, value, false)
public void setModuleProperty(java.lang.String key, java.lang.Object value, boolean bForCache) throws java.lang.Exception
key
- The key name to use.value
- The value to set. null is valid, and clears the key.bForCache
- Adds the value as a SoftReference, which means that when the
system is low on memory, the value will automatically be removed.
WcmException
- (toolkit.WcmModule.setModulePropertyNullKey)
java.lang.Exception
public java.lang.Object getModuleProperty(java.lang.String key) throws java.lang.Exception
getModuleProperty
in interface WcmModuleInterface
key
- The key name to use.
WcmException
- (toolkit.WcmModule.getModulePropertyNullKey)
WcmException
- (toolkit.WcmModule.dataStoreUndefined)
java.lang.Exception
protected java.util.List getModulePropertyKeys() throws java.lang.Exception
java.lang.Exception
protected java.util.List getClassPropertyKeys() throws java.lang.Exception
java.lang.Exception
public void setClassProperty(java.lang.String key, java.lang.Object value) throws java.lang.Exception
java.lang.Exception
Calls setClassProperty(key, value, false)
public void setWindowProperty(java.lang.String key, java.lang.Object value, boolean bForCache) throws java.lang.Exception
key
- The key name to use.value
- The value to set. null is valid, and clears the key.bForCache
- Adds the value as a SoftReference, which means that when the
system is low on memory, the value will automatically be removed.
WcmException
- (toolkit.WcmModule.setModulePropertyNullKey)
java.lang.Exception
public void setClassProperty(java.lang.String key, java.lang.Object value, boolean bForCache) throws java.lang.Exception
key
- The key name to use.value
- The value to set. null is valid, and clears the key.
WcmException
- (toolkit.WcmModule.setModulePropertyNullKey)
java.lang.Exception
public java.lang.Object getWindowProperty(java.lang.String key) throws java.lang.Exception
key
- The key name to use.
WcmException
- (toolkit.WcmModule.getModulePropertyNullKey)
java.lang.Exception
public java.lang.Object getWindowProperty(java.lang.String key, java.lang.Object defaultValue, boolean setIfNotFound, boolean constructClass) throws java.lang.Exception
key
- The key name to use.defaultValue
- If no value is found for the key, this object is returned.setIfNotFound
- If no value is found for the key, set the newly returned value.constructClass
- If the defaultValue is instanceof Class, construct an instance using the default constructor and return if not found.
WcmException
- (toolkit.WcmModule.getModulePropertyNullKey)
java.lang.Exception
public java.lang.Object getClassProperty(java.lang.String key) throws java.lang.Exception
key
- The key name to use.
WcmException
- (toolkit.WcmModule.getModulePropertyNullKey)
java.lang.Exception
public java.lang.Object getClassProperty(java.lang.String key, java.lang.Object defaultValue, boolean setIfNotFound, boolean constructClass) throws java.lang.Exception
key
- The key name to use.defaultValue
- If no value is found for the key, this object is returned.setIfNotFound
- If no value is found for the key, set the newly returned value.constructClass
- If the defaultValue is instanceof Class, construct an instance using the default constructor and return if not found.
WcmException
- (toolkit.WcmModule.getModulePropertyNullKey)
java.lang.Exception
public java.lang.Object getModuleProperty(java.lang.String key, java.lang.Object defaultValue) throws java.lang.Exception
key
- The key name to use.defaultValue
- Value to return if the key-value is undefined in the data store.
WcmException
- (toolkit.WcmModule.getModulePropertyNullKey)
java.lang.Exception
public java.lang.Object getModuleProperty(java.lang.String key, java.lang.Object defaultValue, boolean setIfNotFound) throws java.lang.Exception
key
- The key name to use.defaultValue
- Value to return if the key-value is undefined in the data store.setIfNotFound
- If true, and the key-value is not defined in the data store, set the defaultValue in the data store for this key.
WcmException
- (toolkit.WcmModule.getModulePropertyNullKey)
java.lang.Exception
public java.lang.Object getModuleProperty(java.lang.String key, java.lang.Object defaultValue, boolean setIfNotFound, boolean constructClass) throws java.lang.Exception
key
- The key name to use.defaultValue
- Value to return if the key-value is undefined in the data store.setIfNotFound
- If true, and the key-value is not defined in the data store, set the defaultValue in the data store for this key.constructClass
- If the defaultValue is instanceof Class, construct an instance using the default constructor and return if not found.
WcmException
- (toolkit.WcmModule.getModulePropertyNullKey)
java.lang.Exception
public final WcmDataStore getDataStore() throws java.lang.Exception
getDataStore
in interface WcmModuleInterface
WcmException
- (toolkit.WcmModule.moduleNotRegistered)
WcmException
- (toolkit.WcmModule.dataStoreUndefined)
java.lang.Exception
public final void addChild(WcmModuleInterface m) throws java.lang.Exception
m
- A reference to the module that is to become this module's child.
WcmException
- (toolkit.WcmModule.setParentAlreadyRegistered)
java.lang.Exception
public final void addChild(WcmModuleInterface m, java.lang.String moduleName) throws java.lang.Exception
m
- A reference to the module that is to become this module's child.moduleName
- The passed module has its name set to this value.
WcmException
- (toolkit.WcmModule.setParentAlreadyRegistered)
java.lang.Exception
public final WcmModuleInterface addChild(java.lang.Class moduleClass, java.lang.String moduleName) throws java.lang.Exception
moduleClass
- The module class to create an instance of.moduleName
- The name to give the new created child.
WcmException
- (toolkit.WcmModule.setParentAlreadyRegistered)
java.lang.Exception
public final void setParent(WcmModuleInterface m) throws java.lang.Exception
setParent
in interface WcmModuleInterface
m
- The module that is to be this module's parent.
WcmException
- (toolkit.WcmModule.setParentAlreadyRegistered)
java.lang.Exception
protected final void setPortletParent(WcmModuleInterface m) throws java.lang.Exception
m
- The module that is to be this module's parent.
WcmException
- (toolkit.WcmModule.setParentAlreadyRegistered)
java.lang.Exception
public void debugTrace(java.lang.Object output)
output
- value to print out.public WcmConfigurationInterface getConfiguration() throws java.lang.Exception
java.lang.Exception
public final void setController(WcmController c) throws java.lang.Exception
setController
in interface WcmModuleInterface
c
- A valid reference to the controller when registering. null when un-registering.
WcmException
- (toolkit.wcmModule.setControllerOnUnregisteredModule)
WcmException
- (toolkit.wcmModule.setControllerRegisteredModule)
java.lang.Exception
public final WcmController getController()
public WcmModuleInterface getParent()
getParent
in interface WcmModuleInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |