org.jasig.schedassist.impl.caldav
Class CaldavEventUtilsImpl

java.lang.Object
  extended by org.jasig.schedassist.model.DefaultEventUtilsImpl
      extended by org.jasig.schedassist.impl.caldav.CaldavEventUtilsImpl
All Implemented Interfaces:
IEventUtils, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
BedeworkEventUtilsImpl

public class CaldavEventUtilsImpl
extends DefaultEventUtilsImpl
implements org.springframework.beans.factory.InitializingBean

Subclass of DefaultEventUtilsImpl specific for caldav. The explicitSetTimeZone field is of significance. If set to true, one must also set the timeZone property. The InitializingBean.afterPropertiesSet() implementation on this class should be called to verify state (this is automatically called by the Spring IoC container; only call this method explicitly specifically if not being constructed by Spring). When true and the timezone can be resolved, the behavior of wrapEventInCalendar(VEvent) and constructAvailableAppointment(AvailableBlock, IScheduleOwner, IScheduleVisitor, String) will change. The explicitSetTimeZone and timeZone properties are encouraged when integrating with an Oracle Communications Suite environment.

Version:
$Id: CaldavEventUtilsImpl.java 51 2011-05-06 14:35:33Z nblair $
Author:
Nicholas Blair, npblair@wisc.edu

Field Summary
 
Fields inherited from class org.jasig.schedassist.model.DefaultEventUtilsImpl
ICAL_DATETIME_FORMAT, LOG, PROD_ID
 
Constructor Summary
CaldavEventUtilsImpl(IAffiliationSource affiliationSource)
           
 
Method Summary
 void afterPropertiesSet()
           
 net.fortuna.ical4j.model.component.VEvent constructAvailableAppointment(AvailableBlock block, IScheduleOwner owner, IScheduleVisitor visitor, String eventDescription)
          Calls the super implementation, and adds an Organizer and an Uid.
 net.fortuna.ical4j.model.property.Attendee constructAvailableAttendee(ICalendarAccount calendarAccount, AppointmentRole role)
           
 net.fortuna.ical4j.model.property.Organizer constructOrganizer(ICalendarAccount calendarAccount)
          Construct an Organizer property for the specified ICalendarAccount.
protected  net.fortuna.ical4j.model.component.VEvent convertBlockToReflectionEvent(AvailableBlock block)
           
 String getTimeZone()
           
 boolean isExplicitSetTimeZone()
           
 void setExplicitSetTimeZone(boolean explicitSetTimeZone)
           
 void setTimeZone(String timeZone)
           
 boolean willEventCauseConflict(ICalendarAccount calendarAccount, net.fortuna.ical4j.model.component.VEvent event)
           
 net.fortuna.ical4j.model.Calendar wrapEventInCalendar(net.fortuna.ical4j.model.component.VEvent event)
          If the explicitSetTimeZone field is true and the corresponding timeZone can be resolved, the corresponding VTimeZone is added to the returned Calendar.
 
Methods inherited from class org.jasig.schedassist.model.DefaultEventUtilsImpl
attendeeMatchesPerson, constructSummaryValueForReflectionEvent, convertScheduleForReflection, convertToICalendarFormat, emailToURI, generateNewUid, getAffiliationSource, getAttendeeForUserFromEvent, getAttendeeListFromEvent, getScheduleVisitorCount, isAttendingAsOwner, isAttendingAsVisitor, isAttendingMatch, isPartStatNeedsAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaldavEventUtilsImpl

public CaldavEventUtilsImpl(IAffiliationSource affiliationSource)
Parameters:
affiliationSource -
Method Detail

isExplicitSetTimeZone

public boolean isExplicitSetTimeZone()
Returns:
the explicitSetTimeZone

setExplicitSetTimeZone

public void setExplicitSetTimeZone(boolean explicitSetTimeZone)
Parameters:
explicitSetTimeZone - the explicitSetTimeZone to set

getTimeZone

public String getTimeZone()
Returns:
the timeZone

setTimeZone

public void setTimeZone(String timeZone)
Parameters:
timeZone - the timeZone to set

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

constructAvailableAppointment

public net.fortuna.ical4j.model.component.VEvent constructAvailableAppointment(AvailableBlock block,
                                                                               IScheduleOwner owner,
                                                                               IScheduleVisitor visitor,
                                                                               String eventDescription)
Calls the super implementation, and adds an Organizer and an Uid. If the explicitSetTimeZone field is true and the corresponding timeZone can be resolved, the DtStart and DtEnd are modified to include the corresponding TZID parameter.

Specified by:
constructAvailableAppointment in interface IEventUtils
Overrides:
constructAvailableAppointment in class DefaultEventUtilsImpl
See Also:
constructOrganizer(ICalendarAccount), (non-Javadoc), DefaultEventUtilsImpl.constructAvailableAppointment(org.jasig.schedassist.model.AvailableBlock, org.jasig.schedassist.model.IScheduleOwner, org.jasig.schedassist.model.IScheduleVisitor, java.lang.String)

constructOrganizer

public net.fortuna.ical4j.model.property.Organizer constructOrganizer(ICalendarAccount calendarAccount)
Construct an Organizer property for the specified ICalendarAccount.

Parameters:
calendarAccount -
Returns:
an Organizer property for the ICalendarAccount

willEventCauseConflict

public boolean willEventCauseConflict(ICalendarAccount calendarAccount,
                                      net.fortuna.ical4j.model.component.VEvent event)
Specified by:
willEventCauseConflict in interface IEventUtils
Overrides:
willEventCauseConflict in class DefaultEventUtilsImpl

constructAvailableAttendee

public net.fortuna.ical4j.model.property.Attendee constructAvailableAttendee(ICalendarAccount calendarAccount,
                                                                             AppointmentRole role)
Specified by:
constructAvailableAttendee in interface IEventUtils
Overrides:
constructAvailableAttendee in class DefaultEventUtilsImpl

convertBlockToReflectionEvent

protected net.fortuna.ical4j.model.component.VEvent convertBlockToReflectionEvent(AvailableBlock block)
Overrides:
convertBlockToReflectionEvent in class DefaultEventUtilsImpl

wrapEventInCalendar

public net.fortuna.ical4j.model.Calendar wrapEventInCalendar(net.fortuna.ical4j.model.component.VEvent event)
If the explicitSetTimeZone field is true and the corresponding timeZone can be resolved, the corresponding VTimeZone is added to the returned Calendar. (non-Javadoc)

Specified by:
wrapEventInCalendar in interface IEventUtils
Overrides:
wrapEventInCalendar in class DefaultEventUtilsImpl
See Also:
DefaultEventUtilsImpl.wrapEventInCalendar(net.fortuna.ical4j.model.component.VEvent)


Copyright © 2011 Jasig. All Rights Reserved.