Return to Jive Software

Currently Being Moderated

Registering Custom Event Listeners

VERSION 2  Click to view document history

Created on: Jul 13, 2005 4:08 PM by Greg Unrein - Last Modified:  Jun 3, 2008 11:36 AM by Anthony Dotson

Introduction

Jive Forums contains an event system which can be used to add custom functionality. This document describes how to register custom event listeners for the various event types in the system.

Registering Event Listeners

To register event listeners with the system make sure that the custom event class is in the classpath of the application. Then add a Jive Property in Admin Console > System > Jive Properties with a name of the format

eventListeners..

where OBJECT_LISTENER_PREFIX is one of the strings described below. CUSTOM_CLASS_NAME is the name of the class implementing the custom event listener and should be unique. The value for the Jive Property is the full class name of the custom class, including the package specification.

Announcement Events

Announcement event listeners implement the AnnouncementListener interface. The Jive Property prefix for this object type is eventListeners.AnnouncementListener. For example, given a custom listener class of com.example.SpecialAnnouncementListener the Jive Property name is eventListeners.AnnouncementListener.SpecialAnnouncementListener and the value of the Jive Property is com.example.SpecialAnnouncementListener.

Category Events

Category event listeners implement the CategoryListener interface. The Jive Property prefix for this object type is eventListeners.CategoryListener. For example, given a custom listener class of com.example.SpecialCategoryListener the Jive Property name is eventListeners.CategoryListener.SpecialCategoryListener and the value of the Jive Property is com.example.SpecialCategoryListener.

Comment Events

Comment event listeners implement the CommentListener interface.  The Jive Property prefix for this object type is eventListeners.CommentListener. For example, given a custom listener class of com.example.SpecialCommentListner the Jive Property name is eventListeners.CommentListener.SpecialCommentListener and the value of the Jive Property is com.example.SpecialCommentListener.

Forum Events

Forum event listeners implement the ForumListener interface. The Jive Property prefix for this object type is eventListeners.ForumListener. For example, given a custom listener class of com.example.SpecialForumListener the Jive Property name is eventListeners.ForumListener.SpecialForumListener and the value of the Jive Property is com.example.SpecialForumListener.

Message Events

Message event listeners implement the MessageListener interface. The Jive Property prefix for this object type is eventListeners.MessageListener. For example, given a custom listener class of com.example.SpecialMessageListener the Jive Property name is eventListeners.MessageListener.SpecialMessageListener and the value of the Jive Property is com.example.SpecialMessageListener.

Private Message Events

Private Message event listeners implement the PrivateMessageListener

interface. The Jive Property prefix for this object type is eventListeners.PrivateMessageListener. For example, given a custom listener class of com.example.SpecialPrivateMessageListener the Jive Property name is eventListeners.PrivateMessageListener.SpecialPrivateMessageListener and the value of the Jive Property is com.example.SpecialPrivateMessageListener.

Search Index Events

Search Index event listeners implement the SearchIndexListener interface. The Jive Property prefix for this object type is eventListeners.SearchIndexListener. For example, given a custom listener class of com.example.SpecialSearchIndexListener the Jive Property name is eventListeners.SearchIndexListener.SpecialSearchIndexListener and the value of the Jive Property is com.example.SpecialSearchIndexListener.

Thread Events

Thread event listeners implement the ThreadListener interface. The Jive Property prefix for this object type is eventListeners.ThreadListener. For example, given a custom listener class of com.example.SpecialThreadListener the Jive Property name is eventListeners.ThreadListener.SpecialThreadListener and the value of the Jive Property is com.example.SpecialThreadListener.

User Events

User event listeners implement the UserListener interface. The Jive Property prefix for this object type is eventListeners.UserListener. For example, given a custom listener class of com.example.SpecialUserListener the Jive Property name is eventListeners.UserListener.SpecialUserListener and the value of the Jive Property is com.example.SpecialUserListener.

1,388 Views Tags: listener, event, register
Average User Rating
(14 ratings)
My Rating:

There are no comments on this document

Bookmarked By (0)

More Like This

  • Retrieving data ...