Activity Stream Plugin

Last modified by Raluca Moisa on 2016/07/20 10:11

cogProvides APIs to store wiki events in the database
TypePlugin
Developed by

XWiki Development Team

Rating
Rate!
1 Votes
LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Enterprise, XWiki Enterprise Manager

Description

In the future this plugin will be replaced by the newer Event Stream Module. At the moment that new module is only an API which replaces the older ActivityStream API. At this stage it still uses the ActivityStream implementation as its back-end.

Features

The activity stream plugin offers to store events in dedicated database tables, in order both to avoid heavy XWiki documents run-time processing (while for example retrieving recent page edits), and to allow new custom types of events, beyond the ones related to the documents life-cycle. The plugin API offers methods to record events in the database, either based on a document or custom events ; as well as methods to retrieve those events. Events can be filtered by the wiki space they concern, the name of the stream they have been recorded to, the user that has triggered its record, and other parameters. They can also be grouped by priority in order to display only the most relevant ones when the stream is very active.

Configuration

The following configuration options can be found in WEB-INF/xwiki.cfg:

#-# [Since 2.0RC1]
#-# Activity Stream plugin.
#-# The Activity Stream plugin stores data in a dedicated table in the database. Each wiki has its own database.
#-# The plugin can be configured to store its data into the database corresponding to the wiki, into the main database
#-# (default: xwiki) or both. These options should not be both set to 0 (in this case the local store will be forced).
#-# Important note: disabling storage in the main store will prevent the watchlist from retrieving events from subwikis.
#-#
#-# Default: 1
# xwiki.plugin.activitystream.uselocalstore=1
#-#
#-# Default: 1
# xwiki.plugin.activitystream.usemainstore=1
#-#
#-# Number of days the events should be kept (0 or any negative value: infinite duration)
#-# Note: if this value is greater than 0 a scheduler job will be created, this job will then be fired every week to
#-# delete events older than the configured value.
#-# Default: 0
# xwiki.plugin.activitystream.daystokeepevents=0

Cleaning up the Activity Stream

If you want to clean older entries from the Activity Stream you have to un-comment the following line from xwiki.cfg:

# xwiki.plugin.activitystream.daystokeepevents=0

Instead of 0, you must put the number of days the events should be kept. For example if you put the value 1, only the events from today and yesterday will be kept, the rest will be removed.
Please note that you will have to restart your wiki. After restarting, XWiki will create a job in the Scheduler space. You can fine tune the job's parameters according to your needs.

Also, if you want to customize your Activity Stream, you can use the Activity Macro

Prerequisites & Installation Instructions

Installation

Download and place the plugin JAR in the  WEB-INF/lib/ folder of your XWiki installation.

Activate the plugin by editing your WEB-INF/xwiki.cfg file as follows and restart your XWiki instance:

xwiki.plugins=[...],com.xpn.xwiki.plugin.activitystream.plugin.ActivityStreamPlugin

Activate the Hibernate mapping by editing your WEB-INF/hibernate.cfg.xml file, and adding the following line as follow under your database standard XWiki configuration :

<!-- Mapping files -->
[...]  
<mapping resource="activitystream.hbm.xml"/>
Tags: obsolete
Created by Jerome on 2008/03/31 17:29
    

Get Connected