TR: [opencms-dev] Implement I_CmsEventListener
Apostoly Guillaume
ApostolyG at mail.europcar.com
Tue Aug 5 10:43:01 CEST 2003
Hi Ian,
To make your listener listen you have to :
- implement it
- update registry.xml as below (add the launcher5 by example, line)
- restart your webapp.
<launchers>
<launcher1>com.opencms.flex.CmsXmlTemplateLoader</launcher1>
<launcher2>com.opencms.flex.CmsDumpLoader</launcher2>
<launcher3>com.opencms.launcher.CmsLinkLauncher</launcher3>
<launcher4>com.opencms.flex.CmsJspLoader</launcher4>
<launcher5>com.put.your.listerner.class.HERE!</launc
her5>
</launchers>
Hope this helps,
ps: I see that someone gave the programmatic way to do this, mine is the
config way. Have fun :)
-----Message d'origine-----
De: Ian Spence [mailto:ianspence at yahoo.com]
Date: mardi 5 août 2003 10:17
À: opencms-dev at opencms.org
Objet: [opencms-dev] Implement I_CmsEventListener
Listed below is the javadoc for I_CmsEventListener.
I am very interested in implementing this interface
(by a concrete class). My biggest question is how do
I configure opencms to pick up my new listener class ?
Is there a config file or some other way ?
/**
* Implement this interface in case your class has to
react
* to CmsEvents that are thrown by system.<p>
*
* In order to recieve system events, your class must
register with
* the OpenCms event mechanism. This can be done in
the constructor of a class
* like this:
* <pre>
*
com.opencms.core.A_OpenCms.addCmsEventListener(this);
* </pre>
*
* A typical implementation might look like this:
* <pre>
* public void cmsEvent(com.opencms.flex.CmsEvent
event) {
* switch (event.getType()) {
* case
com.opencms.flex.I_CmsEventListener.EVENT_PUBLISH_PROJECT:
* case
com.opencms.flex.I_CmsEventListener.EVENT_CLEAR_CACHES:
* // do something
* break;
* case
com.opencms.flex.I_CmsEventListener.EVENT_LOGIN_USER:
* // do something else
* break;
* }
* }
* </pre>
*
* @author Alexander Kandzior
(a.kandzior at alkacon.com)
*
* @version $Revision: 1.5 $
* @since FLEX alpha 1
*
* @see CmsEvent
* @see
com.opencms.core.A_OpenCms#addCmsEventListener(I_CmsEventListener)
*/
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
_______________________________________________
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