public class RemoteCalendarServiceImpl extends Object implements RemoteCalendarService
| Modifier and Type | Field and Description |
|---|---|
static String |
ICAL_PROPS_CALENDAR_DESCRIPTION |
static String |
ICAL_PROPS_CALENDAR_NAME |
| Constructor and Description |
|---|
RemoteCalendarServiceImpl(JCRDataStorage storage) |
| Modifier and Type | Method and Description |
|---|---|
static CalendarEvent |
calculateEvent(net.fortuna.ical4j.model.component.VEvent event,
CalendarEvent exoEvent) |
org.apache.jackrabbit.webdav.MultiStatus |
connectToCalDavServer(RemoteCalendar remoteCalendar)
First time connect to CalDav server to get data
|
InputStream |
connectToRemoteServer(RemoteCalendar remoteCalendar)
Connect to remote server
|
org.apache.jackrabbit.webdav.MultiStatus |
doCalendarMultiGet(org.apache.commons.httpclient.HttpClient client,
String uri,
String[] hrefs) |
org.apache.jackrabbit.webdav.MultiStatus |
doCalendarQuery(org.apache.commons.httpclient.HttpClient client,
String uri,
Calendar from,
Calendar to)
Send a calendar-query REPORT request to CalDav server
|
static CalendarEvent |
generateEvent(net.fortuna.ical4j.model.component.VEvent event,
CalendarEvent exoEvent,
String username,
String calendarId) |
net.fortuna.ical4j.model.Calendar |
getCalDavResource(RemoteCalendar remoteCalendar,
String href) |
Map<String,String> |
getEntityTags(org.apache.commons.httpclient.HttpClient client,
String uri,
Calendar from,
Calendar to)
Get a map of pairs (href,etag) from caldav server
This calendar query doesn't include calendar-data element to get data faster
|
RemoteCalendar |
getRemoteCalendar(String url,
String type,
String remoteUser,
String remotePassword)
Read calendar information(name, description,...) from url.
|
org.apache.commons.httpclient.HttpClient |
getRemoteClient(RemoteCalendar remoteCalendar)
Get the HttpClient object to prepare for the connection with remote server
|
void |
importCaldavEvent(String username,
String calendarId,
String eventId,
net.fortuna.ical4j.model.Calendar iCalendar,
String href,
String etag,
Boolean isNew) |
Calendar |
importRemoteCalendar(RemoteCalendar remoteCalendar)
Import iCalendar to local eXo Calendar
|
boolean |
isValidRemoteUrl(String url,
String type,
String remoteUser,
String remotePassword)
Check if the remote url is valid, in 2 cases of iCalendar url or CalDav url, with authentication
|
org.apache.jackrabbit.webdav.client.methods.ReportMethod |
makeCalDavQueryReport(String uri,
Calendar from,
Calendar to)
Make the new REPORT method object to query calendar component on CalDav server
|
Calendar |
refreshRemoteCalendar(String username,
String remoteCalendarId)
Reload remote calendar
|
static CalendarEvent |
setEventAttachment(net.fortuna.ical4j.model.component.VEvent event,
CalendarEvent exoEvent,
String eValue,
String sValue) |
static CalendarEvent |
setTaskAttachment(net.fortuna.ical4j.model.component.VToDo task,
CalendarEvent exoEvent,
String username,
String calendarId,
Map<String,net.fortuna.ical4j.model.component.VFreeBusy> vFreeBusyData) |
Calendar |
synchronizeWithCalDavServer(RemoteCalendar remoteCalendar)
Do reload data from CalDav server for remote calendar with a time-range condition.
|
public static final String ICAL_PROPS_CALENDAR_NAME
public static final String ICAL_PROPS_CALENDAR_DESCRIPTION
public RemoteCalendarServiceImpl(JCRDataStorage storage)
public InputStream connectToRemoteServer(RemoteCalendar remoteCalendar) throws Exception
RemoteCalendarServiceconnectToRemoteServer in interface RemoteCalendarServiceremoteCalendar - the remote calendarExceptionpublic boolean isValidRemoteUrl(String url, String type, String remoteUser, String remotePassword) throws IOException, UnsupportedOperationException
RemoteCalendarServiceisValidRemoteUrl in interface RemoteCalendarServiceurl - the remote urltype - the type of remote calendar, iCalendar or CalDavremoteUser - the remote username used to authenticateremotePassword - the remote password used to authenticateIOExceptionUnsupportedOperationExceptionpublic Calendar importRemoteCalendar(RemoteCalendar remoteCalendar) throws Exception
RemoteCalendarServiceimportRemoteCalendar in interface RemoteCalendarServiceremoteCalendar - object content all properties for remote calendar.Exceptionpublic Calendar refreshRemoteCalendar(String username, String remoteCalendarId) throws Exception
RemoteCalendarServicerefreshRemoteCalendar in interface RemoteCalendarServiceExceptionpublic org.apache.jackrabbit.webdav.MultiStatus connectToCalDavServer(RemoteCalendar remoteCalendar) throws Exception
remoteCalendar - Exceptionpublic net.fortuna.ical4j.model.Calendar getCalDavResource(RemoteCalendar remoteCalendar, String href) throws Exception
Exceptionpublic Map<String,String> getEntityTags(org.apache.commons.httpclient.HttpClient client, String uri, Calendar from, Calendar to) throws Exception
client - uri - from - to - Exceptionpublic Calendar synchronizeWithCalDavServer(RemoteCalendar remoteCalendar) throws Exception
remoteCalendar - Exceptionpublic org.apache.jackrabbit.webdav.MultiStatus doCalendarMultiGet(org.apache.commons.httpclient.HttpClient client,
String uri,
String[] hrefs)
throws Exception
Exceptionpublic org.apache.jackrabbit.webdav.MultiStatus doCalendarQuery(org.apache.commons.httpclient.HttpClient client,
String uri,
Calendar from,
Calendar to)
throws Exception
client - uri - from - to - Exceptionpublic void importCaldavEvent(String username, String calendarId, String eventId, net.fortuna.ical4j.model.Calendar iCalendar, String href, String etag, Boolean isNew) throws Exception
Exceptionpublic static CalendarEvent generateEvent(net.fortuna.ical4j.model.component.VEvent event, CalendarEvent exoEvent, String username, String calendarId) throws Exception
Exceptionpublic static CalendarEvent setEventAttachment(net.fortuna.ical4j.model.component.VEvent event, CalendarEvent exoEvent, String eValue, String sValue) throws Exception
Exceptionpublic static CalendarEvent setTaskAttachment(net.fortuna.ical4j.model.component.VToDo task, CalendarEvent exoEvent, String username, String calendarId, Map<String,net.fortuna.ical4j.model.component.VFreeBusy> vFreeBusyData) throws Exception
Exceptionpublic static CalendarEvent calculateEvent(net.fortuna.ical4j.model.component.VEvent event, CalendarEvent exoEvent) throws Exception
Exceptionpublic org.apache.commons.httpclient.HttpClient getRemoteClient(RemoteCalendar remoteCalendar) throws Exception
remoteCalendar - holds information about remote serverExceptionpublic org.apache.jackrabbit.webdav.client.methods.ReportMethod makeCalDavQueryReport(String uri, Calendar from, Calendar to) throws Exception
uri - the URI to the calendar collection on serverfrom - start date of the time range to filter calendar componentsto - end date of the time range to filter calendar componentsExceptionpublic RemoteCalendar getRemoteCalendar(String url, String type, String remoteUser, String remotePassword) throws Exception
RemoteCalendarServicegetRemoteCalendar in interface RemoteCalendarServiceurl - url to the calendar datatype - type of the calendarremoteUser - usernameremotePassword - passwordExceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.