org.exoplatform.calendar.service
Interface RemoteCalendarService

All Known Implementing Classes:
RemoteCalendarServiceImpl

public interface RemoteCalendarService

Created by The eXo Platform SAS Author : khiem.dohoang khiem.dohoang@exoplatform.com Jan 10, 2011


Method Summary
 InputStream connectToRemoteServer(RemoteCalendar remoteCalendar)
          Connect to remote server
 RemoteCalendar getRemoteCalendar(String url, String type, String remoteUser, String remotePassword)
          Read calendar information(name, description,...) from url.
 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
 Calendar refreshRemoteCalendar(String username, String remoteCalendarId)
          Reload remote calendar
 

Method Detail

isValidRemoteUrl

boolean isValidRemoteUrl(String url,
                         String type,
                         String remoteUser,
                         String remotePassword)
                         throws IOException,
                                UnsupportedOperationException
Check if the remote url is valid, in 2 cases of iCalendar url or CalDav url, with authentication

Parameters:
url - the remote url
type - the type of remote calendar, iCalendar or CalDav
username - the remote username used to authenticate
password - the remote password used to authenticate
Returns:
true if remote url is available in case of iCalendar and CalDav access support in case of CalDav
Throws:
Exception
IOException
UnsupportedOperationException

connectToRemoteServer

InputStream connectToRemoteServer(RemoteCalendar remoteCalendar)
                                  throws Exception
Connect to remote server

Parameters:
remoteUrl - the remote url
remoteType - the remote type, iCalendar or CalDav
remoteUser - remote username to authenticate
remotePassword - remote password to authenticate
Returns:
response's input stream
Throws:
Exception

importRemoteCalendar

Calendar importRemoteCalendar(RemoteCalendar remoteCalendar)
                              throws Exception
Import iCalendar to local eXo Calendar

Parameters:
remoteCalendar - object content all properties for remote calendar.
Returns:
Calendar object
Throws:
Exception

refreshRemoteCalendar

Calendar refreshRemoteCalendar(String username,
                               String remoteCalendarId)
                               throws Exception
Reload remote calendar

Parameters:
username -
remoteCalendarId -
Returns:
Throws:
Exception

getRemoteCalendar

RemoteCalendar getRemoteCalendar(String url,
                                 String type,
                                 String remoteUser,
                                 String remotePassword)
                                 throws Exception
Read calendar information(name, description,...) from url.

Parameters:
url - url to the calendar data
type - type of the calendar
remoteUser - username
remotePassword - password
Returns:
null if cannot read the calendar information.
Throws:
Exception


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.