|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.module.A_CmsModuleAction
public abstract class A_CmsModuleAction
Simple base implementation of the I_CmsModuleAction
interface,
extend this class for more sophisticated module action implementations.
Field Summary |
---|
Constructor Summary | |
---|---|
A_CmsModuleAction()
|
Method Summary | |
---|---|
void |
cmsEvent(CmsEvent event)
Acknowledge the occurrence of the specified event, implement this method to check for CmsEvents in your class. |
void |
initialize(CmsObject adminCms,
CmsConfigurationManager configurationManager,
CmsModule module)
Will be called by the OpenCms system during server startup. |
void |
moduleUninstall(CmsModule module)
Will be called if a module is uninstalled from an OpenCms system. |
void |
moduleUpdate(CmsModule module)
Will be called if the module this action instance belongs to is updated. |
void |
publishProject(CmsObject cms,
CmsPublishList publishList,
int publishTag,
I_CmsReport report)
Will be called during a the publish process after the resources have been published, but before the publish event is fired. |
void |
shutDown(CmsModule module)
Will be called by the OpenCms system during server shutdown. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public A_CmsModuleAction()
Method Detail |
---|
public void cmsEvent(CmsEvent event)
I_CmsEventListener
cmsEvent
in interface I_CmsEventListener
event
- CmsEvent that has occurredI_CmsEventListener.cmsEvent(org.opencms.main.CmsEvent)
public void initialize(CmsObject adminCms, CmsConfigurationManager configurationManager, CmsModule module)
I_CmsModuleAction
If a module requires special initialization code, this is a good place to to implement this functions.
Moreover, if the module requires special "one time" setup code, this should also be implemented here. For example if the module requires special DB tables to be created, you should implement a check if theses tables exist in this method, and if they don't exist create them as needed.
initialize
in interface I_CmsModuleAction
adminCms
- an initialized CmsObject with "Admin" permissionsconfigurationManager
- the initialized OpenCms configuration managermodule
- the module of this action instanceI_CmsModuleAction.initialize(org.opencms.file.CmsObject, CmsConfigurationManager, CmsModule)
public void moduleUninstall(CmsModule module)
I_CmsModuleAction
If you require special code to be executed if a module is uninstalled, implement it in this function.
Please note that there is no install()
method.
This is because the class loader will not have the module class
instance available after module installation/upload. If you
need to execute setup/install code, do this in the I_CmsModuleAction.initialize(CmsObject, CmsConfigurationManager, CmsModule)
method during the next server startup.
This method is not called if the module this action instance belongs to
is "replaced". In this case I_CmsModuleAction.moduleUpdate(CmsModule)
is called after the
new version of the module is installed.
moduleUninstall
in interface I_CmsModuleAction
module
- the module of this action instanceI_CmsModuleAction.moduleUninstall(CmsModule)
public void moduleUpdate(CmsModule module)
I_CmsModuleAction
moduleUpdate
in interface I_CmsModuleAction
module
- the module of this action instance with the updated valuesI_CmsModuleAction.moduleUpdate(org.opencms.module.CmsModule)
public void publishProject(CmsObject cms, CmsPublishList publishList, int publishTag, I_CmsReport report)
I_CmsModuleAction
If you require special code to be executed after a resource is published, implement it in this function any analyze the publish list for "interesting" resources.
publishProject
in interface I_CmsModuleAction
cms
- the user context the publish was executed withpublishList
- the list of published resourcespublishTag
- the publish tagreport
- the report to write messages toI_CmsModuleAction.publishProject(org.opencms.file.CmsObject, org.opencms.db.CmsPublishList, int, org.opencms.report.I_CmsReport)
public void shutDown(CmsModule module)
I_CmsModuleAction
If a module requires special "clean up" functions, for example removing temporary files, this is a good place to implement this functions.
shutDown
in interface I_CmsModuleAction
module
- the module of this action instanceI_CmsModuleAction.shutDown(CmsModule)
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |