Re: [xwiki-users] Fw : Re: Fight with ActivityStreamPluginApi

2015-03-25 Thread Pascal BASTIEN
I found correct syntax to indicate user :-)
#foreach ($MonEvent in 
$xwiki.activitystream.getEventsForUser('xwiki:XWiki.Admin', false, 1500, 0))
I will open a tiny bug for filter - if true, group the matched events by 
priority parameter.


En date de : Mar 24.3.15, Pascal BASTIEN pbasnews-xw...@yahoo.fr a écrit :

 Objet: [xwiki-users] Fw : Re:  Fight with ActivityStreamPluginApi
 À: XWiki Users users@xwiki.org, Thomas Mortagne 
thomas.morta...@xwiki.com
 Date: Mardi 24 mars 2015, 19h09
 
 
   Do you mean $xwiki.activitystream. API is
  broken?
  

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Fw : Re: Fight with ActivityStreamPluginApi

2015-03-24 Thread Pascal BASTIEN

  Do you mean $xwiki.activitystream. API is
 broken?
 
 I don't
 remember talking about the activity stream API :) I

probably because you didn't talk about it :-))

 don't
 really know it well enough to give
 advices on it.

Finally, I used another method who's working like I want:

{{velocity}}
#set ($MonStream=$xwiki.activitystream.getStreamName(Sandbox))
##foreach ($MonEvent in $xwiki.activitystream.getEventsForUser(XWiki.Admin, 
false, 1500, 0))
#foreach ($MonEvent in $xwiki.activitystream.getEvents($MonStream, false, 1500, 
0))
1. $MonEvent.getPage() - $MonEvent.getDisplayDate() - $MonEvent.getDate() - 
$MonEvent.getType() - $MonEvent.getPriority()
  #if ($MonEvent.getPage() == Sandbox.test3)
* Je supprime l'event
 $xwiki.activitystream.deleteActivityEvent($MonEvent)
  #end
#end



{{/velocity}}

Like I chatted with Vincent I know groovy is powerfull (except the fact that 
With great power comes great responsibility ;-) ), full example application 
in groovy missing (because required PR) and templates contains tons of nice 
velocity code. :-)

Thxs for your help / works :-)


___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users