|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.calendar.service.impl.RemoteCalendarServiceImpl
public class RemoteCalendarServiceImpl
Created by The eXo Platform SAS Author : eXoPlatform exo@exoplatform.com Jan 10, 2011
| Field Summary | |
|---|---|
static String |
ICAL_PROPS_CALENDAR_DESCRIPTION
|
static String |
ICAL_PROPS_CALENDAR_NAME
|
| Constructor Summary | |
|---|---|
RemoteCalendarServiceImpl(JCRDataStorage storage)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ICAL_PROPS_CALENDAR_NAME
public static final String ICAL_PROPS_CALENDAR_DESCRIPTION
| Constructor Detail |
|---|
public RemoteCalendarServiceImpl(JCRDataStorage storage)
| Method Detail |
|---|
public InputStream connectToRemoteServer(RemoteCalendar remoteCalendar)
throws Exception
RemoteCalendarService
connectToRemoteServer in interface RemoteCalendarServiceException
public boolean isValidRemoteUrl(String url,
String type,
String remoteUser,
String remotePassword)
throws IOException,
UnsupportedOperationException
RemoteCalendarService
isValidRemoteUrl in interface RemoteCalendarServiceurl - the remote urltype - the type of remote calendar, iCalendar or CalDav
IOException
UnsupportedOperationException
public Calendar importRemoteCalendar(RemoteCalendar remoteCalendar)
throws Exception
RemoteCalendarService
importRemoteCalendar in interface RemoteCalendarServiceremoteCalendar - object content all properties for remote calendar.
Exception
public Calendar refreshRemoteCalendar(String username,
String remoteCalendarId)
throws Exception
RemoteCalendarService
refreshRemoteCalendar in interface RemoteCalendarServiceException
public org.apache.jackrabbit.webdav.MultiStatus connectToCalDavServer(RemoteCalendar remoteCalendar)
throws Exception
remoteCalendar -
Exception
public net.fortuna.ical4j.model.Calendar getCalDavResource(RemoteCalendar remoteCalendar,
String href)
throws Exception
Exception
public Map<String,String> getEntityTags(org.apache.commons.httpclient.HttpClient client,
String uri,
Calendar from,
Calendar to)
throws Exception
client - uri - from - to -
Exception
public Calendar synchronizeWithCalDavServer(RemoteCalendar remoteCalendar)
throws Exception
remoteCalendar -
Exception
public org.apache.jackrabbit.webdav.MultiStatus doCalendarMultiGet(org.apache.commons.httpclient.HttpClient client,
String uri,
String[] hrefs)
throws Exception
Exception
public org.apache.jackrabbit.webdav.MultiStatus doCalendarQuery(org.apache.commons.httpclient.HttpClient client,
String uri,
Calendar from,
Calendar to)
throws Exception
client - uri - from - to -
Exception
public void importCaldavEvent(String username,
String calendarId,
String eventId,
net.fortuna.ical4j.model.Calendar iCalendar,
String href,
String etag,
Boolean isNew)
throws Exception
Exception
public static CalendarEvent generateEvent(net.fortuna.ical4j.model.component.VEvent event,
CalendarEvent exoEvent,
String username,
String calendarId)
throws Exception
Exception
public static CalendarEvent setEventAttachment(net.fortuna.ical4j.model.component.VEvent event,
CalendarEvent exoEvent,
String eValue,
String sValue)
throws Exception
Exception
public 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
Exception
public static CalendarEvent calculateEvent(net.fortuna.ical4j.model.component.VEvent event,
CalendarEvent exoEvent)
throws Exception
Exception
public org.apache.commons.httpclient.HttpClient getRemoteClient(RemoteCalendar remoteCalendar)
throws Exception
remoteCalendar - holds information about remote server
Exception
public 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 components
Exception
public RemoteCalendar getRemoteCalendar(String url,
String type,
String remoteUser,
String remotePassword)
throws Exception
RemoteCalendarService
getRemoteCalendar in interface RemoteCalendarServiceurl - url to the calendar datatype - type of the calendarremoteUser - usernameremotePassword - password
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||