Hi,
I'd like to commit a new service : criteriaService [1]. This service,
both available from java and velocity, allow to get various criteria
(most of them extracted from the statistics plugin) :
- Duration, a length of time
- Period, a length of time defined by a min date and a max date
- Range (formerly named Interval), an integer range (also allow to
sublist a list according to the range)
- RevisionCriteria, criteria to match document revisions (author, min
date, max date, minor edits)
- Scope, define an xwiki scope (page, space, wiki)
Since 4 of those objects are from the statistics I've refactored the
plugin and the application.
Modifications in the public APIs : duration,period,range and scope
factories won't be available from the statsService anymore since they
have moved to criteriaService.
Please shout if you're using any of those methods from velocity :
- $xwiki.getStatsService().getDurationFactory()
- $xwiki.getStatsService().getPeriodFactory()
- $xwiki.getStatsService().getIntervalFactory()
- $xwiki.getStatsService().getScopeFactory()
Additions :
- Document.getRevisions(RevisionCriteria), allowing to get document
revisions matching the criteria
- ListTool added to the rendering velocity context ($listtool)
First use case, in the watchlist plugin the diffs sent by email will
contain all the revisions since the last email notification (was : a
diff between the last 2 revisions) [2].
[1]
http://jira.xwiki.org/jira/browse/XWIKI-2159
[2]
http://jira.xwiki.org/jira/browse/XPWATCHLIST-15
JV.