Maintainance and publish events

It is possible to implement a module that maintains it's data stored in the OpenCms COS ('content-object-store'), such as news messages or contact data. You can also invoke specific options during so called "maintainance events", which are described in greater detail below.

Please note that a detailed description of how to write modules that implement these events is outside the scope of this documentation!

To publish COS data during the publish process, you do have to provide the name of the module's content definition class in the field Publish event class when you create a new module.

In the field Maintenance class you specify a classname (with its  fully qualified class name) that handles events like deleting a module, uploading a module and changing of the module parameters. This class has to implement certain methods to handle these events. OpenCms tries to call these methodes when the module is imported, a module parameter is changed or when the module is deleted from the system. The three methods you may want to implement are:

public static void moduleWasUploaded(CmsObject cms);
public static void moduleParameterWasUpdated(CmsObject cms);
public static void moduleWasDeleted(CmsObject cms);
]]>