[opencms-dev] Module Publish event class and I_CmsEventListener

Alexander Kandzior alex at opencms.org
Fri Mar 5 09:59:02 CET 2004


Matt,

> If I want to add a "Publish event class" for my module (one of the 
> options when I create/modify a module), should the class implement 
> com.opencms.flex.I_CmsEventListener?

Yes. You also need to register your class to the event mechanism, please
check e.g. the com.opencms.flex.cache.CmsFlexCache class as a more advanced
example of how to handle the events. 
 
> If I want to add a "Maintenance class" for my module, is there any 
> interface to implement? I've found the code that handles the 
> reflection, 
> but it seems like good programming practices would dictate that a 
> maintenance class ought to implement an interface.

Right. There is an interface "com.oepncms.defaults.I_CmsLifeCycle", but a
moderate way to describe the OpenCms 5 module base API is "it can be much
improved". 

That's also the reason why we have this on our Agenda for 6. We _will_ have
this Interface in 6. We also will have a base module class (likley called
CmsModule) which we also do not have in 5 since all of the stuff the a
module object should do is done in the CmsRegistry class which stores all
stuff in XML instead of Java native data types.

BTW Your help is appreciated if you can spare some development time, as
always ;-)

Best Regards,
Alex.

Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com





More information about the opencms-dev mailing list