Hello,
A user want to rename lot of page in Xwiki and I don't want this op displayed on
WebHome Activity Stream.
Then, I found these API to use:
http://tiny.cc/2fb0vx
public void deleteActivityEvent(ActivityEvent event)
Delete the passed event form the database.
and
http://tiny.cc/gkb0vx
public List<ActivityEvent> getEventsForUser(String streamName,
String user,
boolean filter,
int nb,
int start)
throws ActivityStreamException
Return the latest events recorded for the given stream name and the given user.
Unfortunaly, my code return only old activity events (probably some old events before my
Xwiki upgrade ... I guess?). I obtain this
XWiki.MyUser - 2014/09/24 13:27 - 2014-09-24 13:27:44.0 - update - 20
MySpace.MyPage - 2014/09/22 17:14 - 2014-09-22 17:14:17.0 - deleteAttachment - 20
BacASable.Tableau filtré - 2014/09/19 15:37 - 2014-09-19 15:37:31.0 - update - 20
Here my code:
{{velocity}}
#set ($MonStream=$xwiki.activitystream.getStreamName("Encyclopédie"))
#foreach ($MonEvent in $xwiki.activitystream.getEventsForUser($MonStream,
"XWiki.christianchambon", false, 1500, 0))
1. $MonEvent.getPage() - $MonEvent.getDisplayDate() - $MonEvent.getDate() -
$MonEvent.getType() - $MonEvent.getPriority()
#end
{{/velocity}}
With this, it is the same thing :#foreach ($MonEvent in
$xwiki.activitystream.getEventsForUser("XWiki.christianchambon", false, 1500,
0)): only old events :-(
Activity stream working well on my Xwiki WebHome
Thxs for any helps
Pascal B