[opencms-dev] maintenance class for modules

Simon Knightley simon.knightley at syskinetic.co.uk
Fri Apr 26 10:11:21 CEST 2002


Dan,

You will need to define the following in your back office class:

  public Class getContentDefinitionClass()

  public String getCreateUrl(CmsObject cms, String tagcontent,
A_CmsXmlContent doc, Object userObject)

  public String getEditUrl(CmsObject cms, String tagcontent,
A_CmsXmlContent doc, Object userObject)

  public String getBackofficeUrl(CmsObject cms, String tagcontent,
A_CmsXmlContent doc, Object userObject)

you will also need to define a content definition class that describes
how to add and delete records.  The maintenance class is used for when
the module is first added or removed and can do tasks like creating
database tables.

Of course, this only applies if you want to use the OpenCMS back office
module style.  You can of course write the module from scratch then you
won't need any of the above.

I hope this helps

Regards

Simon Knightley
Consulting Director
Syskinetic Consulting Limited
http://www.syskinetic.com


-----Original Message-----
From: owner-opencms-dev at www.opencms.org
[mailto:owner-opencms-dev at www.opencms.org] On Behalf Of Dan Moore
Sent: 25 April 2002 18:07
To: opencms-dev at www.opencms.org
Subject: [opencms-dev] maintenance class for modules

Hi folks,

I was reading the CMSGuide and when looking at the modules section, I
saw a
reference to a maintenance class:

"In the field Maintenance class you can specify a class (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." (page 149)

I was wondering what methods needed to be implemented.  Is there an
interface or documentation?

There are no classes named *maint* in the tree.  I searched the
opencms-dev
archives, and didn't find anything.

I downloaded and unzipped the sample news module.  In the manifest, it
listed com.opencms.modules.homepage.news.NewsChannelContentDefinition as
the maintenance class.  I looked at that class, and the only types that
it
extended or implemented were related to content definition (DAO).  There
is
a method called moduleParameterWasUpdated(), but I found no reference to
that in the javadoc.

I'm not sure where to start looking if I want to create a maintenance
class.  Any pointers would be appreciated.

Thanks,
Dan





More information about the opencms-dev mailing list