|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.schedassist.impl.caldav.CaldavCalendarDataDaoImpl
@Service(value="caldavCalendarDataDao") public class CaldavCalendarDataDaoImpl
Implementation of ICalendarDataDao for CalDAV-capable calendar servers.
Requires the following be provided (via setter injection):
HttpClient instance.HttpCredentialsProvider for authentication.CaldavDialect instance.cancelAppointment(IScheduleVisitor, IScheduleOwner, VEvent)
and leaveAppointment(IScheduleVisitor, IScheduleOwner, VEvent) remove the CANCELLED entries from the visitor's calendar.
This instance constructs a DefaultCaldavEventUtilsImpl instance with a NullAffiliationSourceImpl; if you need to override the IEventUtils
instance, a setter is provided (setEventUtils(IEventUtils)).
Lastly this instance constructs a NoopHttpMethodInterceptorImpl instance; if you need to
override the HttpMethodInterceptor a setter is provided (setMethodInterceptor(HttpMethodInterceptor)).
| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
log
|
| Constructor Summary | |
|---|---|
CaldavCalendarDataDaoImpl()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
void |
cancelAppointment(IScheduleVisitor visitor,
IScheduleOwner owner,
net.fortuna.ical4j.model.component.VEvent appointment)
|
void |
checkForConflicts(IScheduleOwner owner,
AvailableBlock block)
|
protected net.fortuna.ical4j.model.Calendar |
consolidate(List<CalendarWithURI> calendars)
Consolidate the Calendars within the argument, returning 1. |
protected org.apache.http.protocol.HttpContext |
constructHttpContext(ICalendarAccount calendarAccount)
Construct an HttpContext with a CredentialsProvider appropriate
for the ICalendarAccount argument. |
net.fortuna.ical4j.model.component.VEvent |
createAppointment(IScheduleVisitor visitor,
IScheduleOwner owner,
AvailableBlock block,
String eventDescription)
|
protected int |
deleteCalendar(CalendarWithURI calendarWithURI,
ICalendarAccount calendarAccount)
|
protected String |
generateEventUri(ICalendarAccount owner,
String eventUid)
|
protected String |
generateEventUri(ICalendarAccount owner,
net.fortuna.ical4j.model.component.VEvent event)
This method is intended to generate a unique URI to use with the PUT method in createAppointment(IScheduleVisitor, IScheduleOwner, AvailableBlock, String). |
org.apache.http.auth.AuthScope |
getCaldavAdminAuthScope()
|
CaldavDialect |
getCaldavDialect()
|
net.fortuna.ical4j.model.Calendar |
getCalendar(ICalendarAccount calendarAccount,
Date startDate,
Date endDate)
|
protected List<CalendarWithURI> |
getCalendarsInternal(ICalendarAccount calendarAccount,
Date startDate,
Date endDate)
|
CredentialsProviderFactory |
getCredentialsProviderFactory()
|
IEventUtils |
getEventUtils()
|
net.fortuna.ical4j.model.component.VEvent |
getExistingAppointment(IScheduleOwner owner,
AvailableBlock block)
|
protected CalendarWithURI |
getExistingAppointmentInternal(IScheduleOwner owner,
Date startTime,
Date endTime)
This method returns the CalendarWithURI containing a single VEvent that
was created with the Scheduling Assistant with the specified IScheduleOwner as the owner
and the specified start and end times. |
protected CalendarWithURI |
getExistingAppointmentInternalForVisitor(IScheduleVisitor visitor,
Date startTime,
Date endTime,
net.fortuna.ical4j.model.property.Uid eventUid)
Special method used when cancelUpdatesVisitorCalendar is set to true. |
org.apache.http.client.HttpClient |
getHttpClient()
|
org.apache.http.HttpHost |
getHttpHost()
|
HttpMethodInterceptor |
getMethodInterceptor()
|
protected org.apache.http.auth.AuthScheme |
identifyScheme(String scheme)
|
boolean |
isCancelUpdatesVisitorCalendar()
|
boolean |
isGetCalendarPerformsPurgeDeclinedAttendees()
|
boolean |
isPreemptiveAuthenticationEnabled()
|
boolean |
isReflectionEnabled()
|
net.fortuna.ical4j.model.component.VEvent |
joinAppointment(IScheduleVisitor visitor,
IScheduleOwner owner,
net.fortuna.ical4j.model.component.VEvent appointment)
|
net.fortuna.ical4j.model.component.VEvent |
leaveAppointment(IScheduleVisitor visitor,
IScheduleOwner owner,
net.fortuna.ical4j.model.component.VEvent appointment)
|
protected net.fortuna.ical4j.model.Calendar |
merge(net.fortuna.ical4j.model.Calendar left,
net.fortuna.ical4j.model.Calendar right)
Merge the components from all calendars into one result. |
protected void |
merge(net.fortuna.ical4j.model.Calendar target,
net.fortuna.ical4j.model.Calendar left,
net.fortuna.ical4j.model.Calendar right)
Mutative method. |
List<CalendarWithURI> |
peekAtAvailableScheduleReflections(IScheduleOwner owner,
Date startDate,
Date endDate)
|
void |
purgeAvailableScheduleReflections(IScheduleOwner owner,
Date startDate,
Date endDate)
|
protected CalendarWithURI |
purgeDeclinedAttendees(CalendarWithURI calendarWithURI,
ICalendarAccount owner)
This method will inspect IScheduleVisitor Attendees among the SchedulingAssistantAppointments
in the Calendar argument. |
protected int |
putExistingEvent(ICalendarAccount eventOwner,
net.fortuna.ical4j.model.component.VEvent event,
String etag)
Update an existing event using CalDAV PUT. |
protected int |
putNewCalendar(ICalendarAccount eventOwner,
net.fortuna.ical4j.model.Calendar calendar,
String eventUid)
Store a new calendar using CalDAV PUT. |
protected int |
putNewEvent(ICalendarAccount eventOwner,
net.fortuna.ical4j.model.component.VEvent event)
Store a new event using CalDAV PUT. |
void |
reflectAvailableSchedule(IScheduleOwner owner,
AvailableSchedule schedule)
|
void |
setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
|
void |
setCaldavAdminAuthScope(org.apache.http.auth.AuthScope caldavAdminAuthScope)
|
void |
setCaldavDialect(CaldavDialect caldavDialect)
|
void |
setCancelUpdatesVisitorCalendar(boolean cancelUpdatesVisitorCalendar)
|
void |
setCancelUpdatesVisitorCalendar(String cancelUpdatesVisitorCalendar)
|
void |
setCredentialsProviderFactory(CredentialsProviderFactory credentialsProviderFactory)
|
void |
setEventUtils(IEventUtils eventUtils)
|
void |
setGetCalendarPerformsPurgeDeclinedAttendees(boolean getCalendarPerformsPurgeDeclinedAttendees)
|
void |
setHttpClient(org.apache.http.client.HttpClient httpClient)
|
void |
setHttpHost(org.apache.http.HttpHost httpHost)
|
void |
setMethodInterceptor(HttpMethodInterceptor methodInterceptor)
|
void |
setPreemptiveAuthenticationEnabled(boolean preemptiveAuthenticationEnabled)
|
void |
setReflectionEnabled(boolean reflectionEnabled)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public CaldavCalendarDataDaoImpl()
| Method Detail |
|---|
public void setHttpClient(org.apache.http.client.HttpClient httpClient)
httpClient - the httpClient to setpublic org.apache.http.client.HttpClient getHttpClient()
public CredentialsProviderFactory getCredentialsProviderFactory()
public void setCredentialsProviderFactory(CredentialsProviderFactory credentialsProviderFactory)
credentialsProviderFactory - the credentialsProviderFactory to setpublic org.apache.http.HttpHost getHttpHost()
public void setHttpHost(org.apache.http.HttpHost httpHost)
httpHost - public void setCaldavAdminAuthScope(org.apache.http.auth.AuthScope caldavAdminAuthScope)
caldavAdminAuthScope - the caldavAdminAuthScope to setpublic org.apache.http.auth.AuthScope getCaldavAdminAuthScope()
public void setEventUtils(IEventUtils eventUtils)
eventUtils - the eventUtils to setpublic void setCaldavDialect(CaldavDialect caldavDialect)
caldavDialect - the caldavDialect to setpublic void setMethodInterceptor(HttpMethodInterceptor methodInterceptor)
methodInterceptor - the methodInterceptor to setpublic HttpMethodInterceptor getMethodInterceptor()
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
applicationEventPublisher - the applicationEventPublisher to setpublic void setCancelUpdatesVisitorCalendar(String cancelUpdatesVisitorCalendar)
cancelUpdatesVisitorCalendar - the cancelUpdatesVisitorCalendar to setpublic void setReflectionEnabled(boolean reflectionEnabled)
reflectionEnabled - the reflectionEnabled to setpublic boolean isCancelUpdatesVisitorCalendar()
public void setCancelUpdatesVisitorCalendar(boolean cancelUpdatesVisitorCalendar)
cancelUpdatesVisitorCalendar - the cancelUpdatesVisitorCalendar to setpublic IEventUtils getEventUtils()
public CaldavDialect getCaldavDialect()
public boolean isReflectionEnabled()
public boolean isPreemptiveAuthenticationEnabled()
public void setPreemptiveAuthenticationEnabled(boolean preemptiveAuthenticationEnabled)
preemptiveAuthenticationEnabled - the preemptiveAuthenticationEnabled to setpublic boolean isGetCalendarPerformsPurgeDeclinedAttendees()
public void setGetCalendarPerformsPurgeDeclinedAttendees(boolean getCalendarPerformsPurgeDeclinedAttendees)
getCalendarPerformsPurgeDeclinedAttendees - the getCalendarPerformsPurgeDeclinedAttendees to setprotected org.apache.http.auth.AuthScheme identifyScheme(String scheme)
scheme -
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException
public net.fortuna.ical4j.model.Calendar getCalendar(ICalendarAccount calendarAccount,
Date startDate,
Date endDate)
getCalendar in interface ICalendarDataDao
public net.fortuna.ical4j.model.component.VEvent getExistingAppointment(IScheduleOwner owner,
AvailableBlock block)
getExistingAppointment in interface ICalendarDataDao
public net.fortuna.ical4j.model.component.VEvent createAppointment(IScheduleVisitor visitor,
IScheduleOwner owner,
AvailableBlock block,
String eventDescription)
createAppointment in interface ICalendarDataDao
public void cancelAppointment(IScheduleVisitor visitor,
IScheduleOwner owner,
net.fortuna.ical4j.model.component.VEvent appointment)
cancelAppointment in interface ICalendarDataDaoprotected org.apache.http.protocol.HttpContext constructHttpContext(ICalendarAccount calendarAccount)
HttpContext with a CredentialsProvider appropriate
for the ICalendarAccount argument.
Returned value is intended for use with HttpClient.execute(HttpHost, HttpRequest, HttpContext).
calendarAccount -
HttpContext for the ICalendarAccount.
protected int deleteCalendar(CalendarWithURI calendarWithURI,
ICalendarAccount calendarAccount)
calendarWithURI - calendarAccount -
public net.fortuna.ical4j.model.component.VEvent joinAppointment(IScheduleVisitor visitor,
IScheduleOwner owner,
net.fortuna.ical4j.model.component.VEvent appointment)
throws SchedulingException
joinAppointment in interface ICalendarDataDaoSchedulingException
public net.fortuna.ical4j.model.component.VEvent leaveAppointment(IScheduleVisitor visitor,
IScheduleOwner owner,
net.fortuna.ical4j.model.component.VEvent appointment)
throws SchedulingException
leaveAppointment in interface ICalendarDataDaoSchedulingException
public void checkForConflicts(IScheduleOwner owner,
AvailableBlock block)
throws ConflictExistsException
checkForConflicts in interface ICalendarDataDaoConflictExistsException
public void reflectAvailableSchedule(IScheduleOwner owner,
AvailableSchedule schedule)
reflectAvailableSchedule in interface ICalendarDataDao
public void purgeAvailableScheduleReflections(IScheduleOwner owner,
Date startDate,
Date endDate)
purgeAvailableScheduleReflections in interface ICalendarDataDao
public List<CalendarWithURI> peekAtAvailableScheduleReflections(IScheduleOwner owner,
Date startDate,
Date endDate)
owner - startDate - endDate -
protected String generateEventUri(ICalendarAccount owner,
net.fortuna.ical4j.model.component.VEvent event)
createAppointment(IScheduleVisitor, IScheduleOwner, AvailableBlock, String).
It is implemented by the following:
caldavDialect.calculateCalendarAccountHome(owner.getCalendarAccount) + "/sched-assist-" + randomAlphanumeric + ".ics"
owner -
protected String generateEventUri(ICalendarAccount owner,
String eventUid)
owner - eventUid -
protected List<CalendarWithURI> getCalendarsInternal(ICalendarAccount calendarAccount,
Date startDate,
Date endDate)
calendarAccount - startDate - endDate -
IOExceptionprotected net.fortuna.ical4j.model.Calendar consolidate(List<CalendarWithURI> calendars)
Calendars within the argument, returning 1.
calendars -
net.fortuna.ical4j.data.ParserExceptionCalendars.merge(Calendar, Calendar)
protected net.fortuna.ical4j.model.Calendar merge(net.fortuna.ical4j.model.Calendar left,
net.fortuna.ical4j.model.Calendar right)
calendars -
protected void merge(net.fortuna.ical4j.model.Calendar target,
net.fortuna.ical4j.model.Calendar left,
net.fortuna.ical4j.model.Calendar right)
Calendar argument is altered by this method.
target - left - right -
protected CalendarWithURI getExistingAppointmentInternal(IScheduleOwner owner,
Date startTime,
Date endTime)
CalendarWithURI containing a single VEvent that
was created with the Scheduling Assistant with the specified IScheduleOwner as the owner
and the specified start and end times.
owner - startTime - endTime -
VEvent, or null if none for this IScheduleOwner at the specified times
protected CalendarWithURI getExistingAppointmentInternalForVisitor(IScheduleVisitor visitor,
Date startTime,
Date endTime,
net.fortuna.ical4j.model.property.Uid eventUid)
CalendarWithURI in the visitor's account for the event
with the specified start, end and eventuid.
owner - startTime - endTime - eventUid -
protected int putNewCalendar(ICalendarAccount eventOwner,
net.fortuna.ical4j.model.Calendar calendar,
String eventUid)
throws org.apache.http.HttpException,
IOException
eventOwner - event -
org.apache.http.HttpException
IOException
protected int putNewEvent(ICalendarAccount eventOwner,
net.fortuna.ical4j.model.component.VEvent event)
throws org.apache.http.HttpException,
IOException
eventOwner - event -
org.apache.http.HttpException
IOException
protected int putExistingEvent(ICalendarAccount eventOwner,
net.fortuna.ical4j.model.component.VEvent event,
String etag)
throws IOException
eventOwner - event - etag -
org.apache.http.HttpException
IOException
protected CalendarWithURI purgeDeclinedAttendees(CalendarWithURI calendarWithURI,
ICalendarAccount owner)
IScheduleVisitor Attendees among the SchedulingAssistantAppointments
in the Calendar argument.
If an Attendee on an SchedulingAssistantAppointment has Partstat#DECLINED, the appointment
will be cancelled (if one on one or lone visitor on group appt) or the attendee will be removed (group appointment
with multiple attending visitors).
calendarWithURI - session - owner -
SchedulingException
StatusException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||