Table of Contents
Site Stats trunk or >= 2.0 (unreleased) and EntityBroker >= 1.3.5 (present in Sakai 2.6 or trunk) are required for the features demonstrated on this page.
1. How it works
SiteStats consults the EntityProviderManager service to find which tools implement the Statisticable capability from EntityBroker. This capability - implemented by tools - provides the following information to Site Stats:
- Associated sakai tool id
- List of events to be supported in SiteStats
- Localized events description
Suppose you have already a basic Entity Provider capability, as shown on the next code listing:
Adding the Statisticable capability to your class, will require you to implement 3 new methods. The code belows assumes that a 'Events.properties' message bundle exists and contains the event descriptions.
After this, you can log events as usual using the EventTrackingService and these events will be automatically supported in SiteStats (using cover for simplicity):
3. Related configuration bits
By default, SiteStats will use the (localized) event descriptions provided by the Statisticable interfaces and, if not found, fallback to local event descriptions provided within the Site Stats bundles. You can change this behavior with the following setting in sakai.properties:
- checkLocalEventNamesFirst@org.sakaiproject.sitestats.api.event.EntityBrokerEventRegistry = true