[opencms-dev] Module Action class updateModule method

Achim Westermann a.westermann at alkacon.com
Tue Nov 8 08:53:09 CET 2005


Hi Pere,

you have to tell OpenCms what event your module is interested in. Within your initialize implementation first check that all preconditions are proper for your 
module to react upon the events. Then finally register your module to receive events:

OpenCms.addCmsEventListener(this, new int[] {I_CmsEventListener.EVENT_BEFORE_PUBLISH_PROJECT});

look into the interface for other event constants to choose when your module should be invoked.
Your implementation of cmsEvent(CmsEvent) will be called if everything is right.

kind regards,

Achim



Achim Westermann
-------------------
Alkacon Software
http://www.alkacon.com


Pere Torrodellas wrote:
> Hello,
> 
> The initialize method in the module action class I built by subclassing
> A_CmsModuleAction is called all right when OpenCms is started, but its
> moduleUpdate method is not called when I expected.
> 
> Can someone please explain when it is called, i.e. what does "when the
> module is modified" means exactly? When one of the module files is modified
> and published, as I expected? When the whole module is changed?
> 
> Thanks,
> 
> Pere
> 
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list