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

Stephen Swinsburg s.swinsburg at lancaster.ac.uk
Wed Mar 11 14:13:18 PDT 2009


No problem. One thing though, you mentioned in your last post that you  
wnted to add event publishing to other tools:
>> - Repository
>> - Wiki
>> - Members
>> - Blogger
>> - Weblog
>> - etc

You will find that many other Sakai tools publish events, you just  
need to know what events to look for, have a trawl through the  
SAKAI_EVENT table after creating some files in Resources, or editing a  
few pages in the wiki, posting some blog posts etc. If you find that a  
specific tool isn't publishing events then you can search for or file  
a Jira (http://jira.sakaiproject.org/jira) feature request for those  
tools to add event publishing.

If you figure out where the event support should go in particular  
tools that lack it, create some patches and attach to the Jira tickets.

Best of luck!

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 7:11 PM, Luiz Antonio Falaguasta Barbosa wrote:

> 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/7b82f3dd/attachment.html 


More information about the sakai-dev mailing list