edu.yale.its.tp.portlets.calendar.adapter
Class CalDavCalendarAdapter

java.lang.Object
  extended by edu.yale.its.tp.portlets.calendar.adapter.CalDavCalendarAdapter
All Implemented Interfaces:
ICalendarAdapter

public class CalDavCalendarAdapter
extends java.lang.Object
implements ICalendarAdapter

Implementation of ICalendarAdapter that uses CalDAV for retrieving CalendarEvents.

Version:
$Header: CalDavCalendarAdapter.java Exp $
Author:
Jen Bourey, jennifer.bourey@gmail.com

Constructor Summary
CalDavCalendarAdapter()
           
 
Method Summary
protected  java.util.Set<CalendarEvent> convertCalendarToEvents(java.lang.Long calendarId, net.fortuna.ical4j.model.Calendar calendar, net.fortuna.ical4j.model.Period period)
           
 java.util.Set<CalendarEvent> getEvents(CalendarConfiguration calendarConfiguration, net.fortuna.ical4j.model.Period period, javax.servlet.http.HttpServletRequest request)
          Get events for the defined calendar and time period.
 java.util.Set<CalendarEvent> getEvents(CalendarConfiguration calendarConfiguration, net.fortuna.ical4j.model.Period period, javax.portlet.PortletRequest request)
          Get events for the defined calendar and time period.
 java.lang.String getLink(CalendarConfiguration calendar, net.fortuna.ical4j.model.Period period, javax.portlet.PortletRequest request)
          Get hyper link for the defined calendar.
protected  java.util.List<net.fortuna.ical4j.model.Calendar> retrieveCalendars(java.lang.String url, net.fortuna.ical4j.model.Period period, org.apache.commons.httpclient.Credentials credentials)
           
 void setCache(net.sf.ehcache.Cache cache)
           
 void setCacheKeyGenerator(ICacheKeyGenerator cacheKeyGenerator)
           
 void setCacheKeyPrefix(java.lang.String cacheKeyPrefix)
           
 void setCredentialsExtractor(ICredentialsExtractor credentialsExtractor)
           
 void setUrlCreator(IUrlCreator urlCreator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalDavCalendarAdapter

public CalDavCalendarAdapter()
Method Detail

setCache

public void setCache(net.sf.ehcache.Cache cache)

setUrlCreator

public void setUrlCreator(IUrlCreator urlCreator)

setCredentialsExtractor

public void setCredentialsExtractor(ICredentialsExtractor credentialsExtractor)

setCacheKeyGenerator

public void setCacheKeyGenerator(ICacheKeyGenerator cacheKeyGenerator)

setCacheKeyPrefix

public void setCacheKeyPrefix(java.lang.String cacheKeyPrefix)

getEvents

public java.util.Set<CalendarEvent> getEvents(CalendarConfiguration calendarConfiguration,
                                              net.fortuna.ical4j.model.Period period,
                                              javax.portlet.PortletRequest request)
                                       throws CalendarException
Description copied from interface: ICalendarAdapter
Get events for the defined calendar and time period. The user's PortletRequest is made available to give the calendar adapter access to useful information such as the UserInfo map, session data, etc. These items can be used to identify the user, provide access to authentication resources, or other useful operations.

Specified by:
getEvents in interface ICalendarAdapter
Parameters:
calendarConfiguration - calendar configuration for which to retrieve events
period - time period for which to retrieve events
request - user's portlet request
Returns:
Set of events for this calendar and time period
Throws:
CalendarException

getEvents

public java.util.Set<CalendarEvent> getEvents(CalendarConfiguration calendarConfiguration,
                                              net.fortuna.ical4j.model.Period period,
                                              javax.servlet.http.HttpServletRequest request)
                                       throws CalendarException
Description copied from interface: ICalendarAdapter
Get events for the defined calendar and time period. The user's HttpServletRequest is made available to give the calendar adapter access to useful information such as the request parameters, session data, etc. These items can be used to identify the user, provide access to authentication resources, or other useful operations.

Specified by:
getEvents in interface ICalendarAdapter
Parameters:
calendarConfiguration - calendar configuration for which to retrieve events
period - time period for which to retrieve events
request - user's servlet request
Returns:
Set of events for this calendar and time period
Throws:
CalendarException

getLink

public java.lang.String getLink(CalendarConfiguration calendar,
                                net.fortuna.ical4j.model.Period period,
                                javax.portlet.PortletRequest request)
                         throws CalendarLinkException
Description copied from interface: ICalendarAdapter
Get hyper link for the defined calendar. In cases where the calendar resource has a web interface, this method allows provides access to the url.

Specified by:
getLink in interface ICalendarAdapter
Parameters:
calendar - calendar configuration for which to retrieve events
period - time period for which to retrieve events
request - user's servlet request
Returns:
Set of events for this calendar and time period
Throws:
CalendarLinkException

retrieveCalendars

protected final java.util.List<net.fortuna.ical4j.model.Calendar> retrieveCalendars(java.lang.String url,
                                                                                    net.fortuna.ical4j.model.Period period,
                                                                                    org.apache.commons.httpclient.Credentials credentials)

convertCalendarToEvents

protected final java.util.Set<CalendarEvent> convertCalendarToEvents(java.lang.Long calendarId,
                                                                     net.fortuna.ical4j.model.Calendar calendar,
                                                                     net.fortuna.ical4j.model.Period period)
                                                              throws CalendarException
Throws:
CalendarException


Copyright © 2009 Jasig. All Rights Reserved.