[opencms-dev] Implement I_CmsEventListener

Ian Spence ianspence at yahoo.com
Tue Aug 5 10:37:01 CEST 2003


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



More information about the opencms-dev mailing list