Hi devs,

I’d like to move all stats-related code to a new module under 
xwiki-platform-statistics.

It’s not very easy since there are (scripting) APIs in XWiki and Document 
classes.

So I propose the following:

Step 1:

* Deprecate all APIs related to stats in oldcore (XWiki, Document, 
XWikiStatService, XWikiStatsServiceImpl) and move them to oldcore legacy.
* Modify XWikiStatsServiceImpl to not implement EventListener anymore
* Move all other code from com.xpn.xwiki.stats.* in 
xwiki-platform-statistics-api, under an org.xwiki.stats package (and refactor 
XWikiStatsServiceImpl to use them) 
* Create a new StatisticsManager (if you have a better name, shoot! 
StatisticsAccess? StatisticsReader?) component in xwiki-platform-statistics-api 
and copy all the APIs from XWikiStatService (removing XWikiContext ofc). Note 
that the goal here is to make this simple and fast and not to redo a stats 
module with a different API...
* Add a new stats script service in xwiki-platform-statistics-api (accessed 
through: $services.stats.*). It’d be a copy of the stats-related APIs currently 
in Document
* Add a new EventListener in xwiki-platform-statistics-api, copying the 
Event-related code from XWikiStatsServiceImpl. This is the code that saves 
stats in the DB.

Step 2:

* Modify the Stats App to use the new script service

Step 3:

* Introduce a new Admin UI for activating/disabling stats (see 
http://jira.xwiki.org/browse/XWIKI-7919)

WDYT?

Thanks
-Vincent

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to