[Building Sakai] Calendar Events for a site

Steve Swinsburg steve.swinsburg at gmail.com
Fri Nov 4 03:44:31 PDT 2011


A reference is an entity reference. You can construct the reference to pass to it.

If you just want the events for a given site, it looks like you could do:

Calendar cal = calendarService.getCalendar(ref);
List<CalendarEvent> events = cal.getEvents(range, filter);

cheers,
Steve

On 04/11/2011, at 7:44 PM, David Wafula wrote:

> 
> Thanks Steve. I do have all the javadocs. But i guess that still doesn't really answer my question (probably i was not that clear). Take for instance, javadocs say
> 
> references - The List of calendar References
> 
> I still battle to figure out where  to get valid values for this. In this case,  a List is rather abstract.  I suppose i could could do with some sample code, or some pointers where this method is used in a module somewhere.
> 
> 
> Regards,
> 
> david.
> 
> 
> 
> On Fri, Nov 4, 2011 at 12:14 AM, Steve Swinsburg <steve.swinsburg at gmail.com> wrote:
> Hi David,
> 
> I recommend you build the javadocs for your Sakai source:
> 
> mvn javadoc:javadoc -Daggregate=true
> 
> getEvents
> 
> CalendarEventVector getEvents(List references,
>                               org.sakaiproject.time.api.TimeRange range)
> Takes several calendar References and merges their events from within a given time range.
> 
> Parameters:
> references - The List of calendar References.
> range - The time period to use to select events.
> Returns:
> CalendarEventVector object with the union of all events from the list of calendars in the given time range.
> 
> cheers,
> Steve
> 
> On 04/11/2011, at 8:15 AM, David Wafula wrote:
> 
>> Team,
>> I have CalendarService object instantiated correctly, via spring. I need to get calendar events for a site. 
>> I was thinking:
>> 
>>  calendarService.getEvents(list, timerange)
>> 
>> is it appropriate? If so, i need help with arguments to the method: what exactly is List ? And how do you instantiate TimeRange object ? 
>> 
>> Kind regards,
>> -- 
>> David Wafula
>> _______________________________________________
>> 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"
> 
> 
> 
> 
> -- 
> David Wafula

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20111104/5a763583/attachment.html 


More information about the sakai-dev mailing list