org.jasig.portlet.calendar.adapter
Class ExchangeCalendarAdapter

java.lang.Object
  extended by org.jasig.portlet.calendar.adapter.AbstractCalendarAdapter
      extended by org.jasig.portlet.calendar.adapter.ExchangeCalendarAdapter
All Implemented Interfaces:
ICalendarAdapter

public class ExchangeCalendarAdapter
extends AbstractCalendarAdapter
implements ICalendarAdapter

Queries Exchange Web Services API for calendar events.

Version:
$Revision$
Author:
Jen Bourey, jbourey@unicon.net

Field Summary
protected static String AVAILABILITY_SOAP_ACTION
           
protected  org.apache.commons.logging.Log log
           
protected static String UTC
           
 
Constructor Summary
ExchangeCalendarAdapter()
           
 
Method Summary
protected  GetUserAvailabilityRequest getAvailabilityRequest(org.joda.time.Interval interval, String emailAddress)
           
 CalendarEventSet getEvents(CalendarConfiguration calendarConfiguration, org.joda.time.Interval interval, javax.portlet.PortletRequest request)
          Get events for the defined calendar and time period.
protected  net.fortuna.ical4j.model.component.VEvent getInternalEvent(long calendarId, CalendarEvent msEvent)
          Return an internal API CalendarEvent for an Microsoft CalendarEvent object.
 String getLink(CalendarConfiguration calendar, org.joda.time.Interval interval, javax.portlet.PortletRequest request)
          Get hyper link for the defined calendar.
protected  XMLGregorianCalendar getXmlDate(org.joda.time.DateTime date)
          Get an XMLGregorianCalendar for the specified date.
 Set<net.fortuna.ical4j.model.component.VEvent> retrieveExchangeEvents(CalendarConfiguration calendar, org.joda.time.Interval interval, String emailAddress)
          Retrieve a set of CalendarEvents from the Exchange server for the specified period and email address.
 void setCache(net.sf.ehcache.Cache cache)
           
 void setCacheKeyGenerator(ICacheKeyGenerator cacheKeyGenerator)
           
 void setCacheKeyPrefix(String cacheKeyPrefix)
           
 void setEmailAttribute(String emailAttribute)
           
 void setWebServiceOperations(org.springframework.ws.client.core.WebServiceOperations webServiceOperations)
           
 
Methods inherited from class org.jasig.portlet.calendar.adapter.AbstractCalendarAdapter
getDescriptionKey, getParameters, getTitleKey, setDescriptionKey, setParameters, setTitleKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jasig.portlet.calendar.adapter.ICalendarAdapter
getDescriptionKey, getParameters, getTitleKey
 

Field Detail

AVAILABILITY_SOAP_ACTION

protected static final String AVAILABILITY_SOAP_ACTION
See Also:
Constant Field Values

UTC

protected static final String UTC
See Also:
Constant Field Values

log

protected final org.apache.commons.logging.Log log
Constructor Detail

ExchangeCalendarAdapter

public ExchangeCalendarAdapter()
Method Detail

setWebServiceOperations

public void setWebServiceOperations(org.springframework.ws.client.core.WebServiceOperations webServiceOperations)

setCache

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

setCacheKeyGenerator

public void setCacheKeyGenerator(ICacheKeyGenerator cacheKeyGenerator)

setCacheKeyPrefix

public void setCacheKeyPrefix(String cacheKeyPrefix)

setEmailAttribute

public void setEmailAttribute(String emailAttribute)

getEvents

public CalendarEventSet getEvents(CalendarConfiguration calendarConfiguration,
                                  org.joda.time.Interval interval,
                                  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
request - user's portlet request
Returns:
Set of events for this calendar and time period
Throws:
CalendarException

retrieveExchangeEvents

public Set<net.fortuna.ical4j.model.component.VEvent> retrieveExchangeEvents(CalendarConfiguration calendar,
                                                                             org.joda.time.Interval interval,
                                                                             String emailAddress)
                                                                      throws CalendarException
Retrieve a set of CalendarEvents from the Exchange server for the specified period and email address.

Parameters:
calendar -
period -
emailAddress -
Returns:
Throws:
CalendarException

getLink

public String getLink(CalendarConfiguration calendar,
                      org.joda.time.Interval interval,
                      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
request - user's servlet request
Returns:
Set of events for this calendar and time period
Throws:
CalendarLinkException

getAvailabilityRequest

protected GetUserAvailabilityRequest getAvailabilityRequest(org.joda.time.Interval interval,
                                                            String emailAddress)
                                                     throws DatatypeConfigurationException
Throws:
DatatypeConfigurationException

getInternalEvent

protected net.fortuna.ical4j.model.component.VEvent getInternalEvent(long calendarId,
                                                                     CalendarEvent msEvent)
                                                              throws DatatypeConfigurationException
Return an internal API CalendarEvent for an Microsoft CalendarEvent object.

Parameters:
calendarId -
msEvent -
Returns:
Throws:
DatatypeConfigurationException

getXmlDate

protected XMLGregorianCalendar getXmlDate(org.joda.time.DateTime date)
                                   throws DatatypeConfigurationException
Get an XMLGregorianCalendar for the specified date.

Parameters:
date -
Returns:
Throws:
DatatypeConfigurationException


Copyright © 2012 Jasig. All Rights Reserved.