Activity Stream Plugin

Last modified by Admin on 2024/07/08 00:00

cogAPI to get all activity in the wiki or farm
TypeJAR
Category
Developed by

XWiki Development Team

Active Installs19
Rating
0 Votes
LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Standard

Installable with the Extension Manager

Description

Since XWiki 11.1RC1, this plugin has been fully replaced by the newer Event Stream Module.

If you want to install Activity Stream Plugin anyway, you need to remove the file xwiki-platform-eventstream-store-*.*.jar from the WEB-INF/lib folder, because these 2 modules cannot be installed together.

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"/>

Dependencies

Dependencies for this extension (org.xwiki.platform:xwiki-platform-activitystream-api 12.5.1):

Get Connected