[Building Sakai] How difficult is to implement event registering for other tools?

Luiz Antonio Falaguasta Barbosa lafbarbosa at gmail.com
Wed Mar 11 12:11:48 PDT 2009


Fine!

Now, I need to discover where I should make calls for
someLogic.postEvent(...); in each tool.

Thanks Steve!

Regards,

Luiz

2009/3/11 Stephen Swinsburg <s.swinsburg at lancaster.ac.uk>

> Hi Luiz,
> An event is just a notification that someone did something somewhere. If
> you have a tool that you want to register events into the Sakai Event table,
> then you just need to inject the EventTrackingService like this:
> private EventTrackingService eventTrackingService;
> public void setEventTrackingService(EventTrackingService
> eventTrackingService) {
> this.eventTrackingService = eventTrackingService;
> }
>
> then have a method in your API/IMPL (lets call it someLogic) that post's
> the event:
> public void postEvent(String event,String reference,boolean modify) {
> eventTrackingService.post(eventTrackingService
> .newEvent(event,reference,modify));
> }
>
> then in your tool, when appropriate, ie after said event has just occurred,
> post the event:
>
> someLogic.postEvent("my.tool.event", "whereverTheEventOccurred", true);
>
>
> true for modify type events, ie if something was changed, false for just
> viewing/accessing something.
>
>
> cheers,
> Steve
>
> ---
> Steve Swinsburg
> Portal Systems Developer
> Centre for e-Science
> Lancaster University
> Lancaster
> LA1 4YT
>
> email: s.swinsburg at lancaster.ac.uk
> phone: +44 (0) 1524 594870
>
> On 11/03/2009, at 6:40 PM, Luiz Antonio Falaguasta Barbosa wrote:
>
> Hi people,
>
> I've been looking for a way to implement event storing for other tools,
> like these:
>
> - Repository
> - Wiki
> - Members
> - Blogger
> - Weblog
> - etc
>
> What I could see is that I need to call newEvent method from
> EventTrackingService class, as described in this mail list by Steve
> Swingsburg.
>
> But, besides to call this method, what more may I do to give support to
> event registering for old tools (I don't need to show results into sitestats
> because I'm inserting events in a database of other tool, my own tool; I
> just need send the event to be registered by calling writeBatchEvents
> method)?
>
> Thanks in advance!
>
> Regards,
>
> Luiz
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090311/0e575c64/attachment.html 


More information about the sakai-dev mailing list