org.exoplatform.calendar.service
Interface CalendarImportExport

All Known Implementing Classes:
CsvImportExport, ICalendarImportExport

public interface CalendarImportExport

Created by The eXo Platform SARL Author : Hung Nguyen hung.nguyen@exoplatform.com Jul 2, 2007


Field Summary
static String PRIVATE_TYPE
           
static String PUBLIC_TYPE
           
static String SHARED_TYPE
           
 
Method Summary
 OutputStream exportCalendar(String username, List<String> calendarIds, String type, int number)
          The method exports events from eXo Calendar to icalendar file (.ics) or .csv file
 ByteArrayOutputStream exportEventCalendar(CalendarEvent event)
          The method export binary from event object
 OutputStream exportEventCalendar(String username, String calendarId, String type, String eventId)
          The method export calendar event to output stream by given event id
 List<CalendarEvent> getEventObjects(InputStream icalInputStream)
          The method maps the input stream to event object
 void importCalendar(String username, InputStream inputStream, String calendarId, String calendarName, Calendar from, Calendar to, boolean isNew)
          The method imports events form icalendar(.ics) or outlook calendar exported .csv file to the system
 boolean isValidate(InputStream icalInputStream)
          The method return true if the input stream is correct format
 

Field Detail

PRIVATE_TYPE

static final String PRIVATE_TYPE

SHARED_TYPE

static final String SHARED_TYPE

PUBLIC_TYPE

static final String PUBLIC_TYPE
Method Detail

importCalendar

void importCalendar(String username,
                    InputStream inputStream,
                    String calendarId,
                    String calendarName,
                    Calendar from,
                    Calendar to,
                    boolean isNew)
                    throws Exception
The method imports events form icalendar(.ics) or outlook calendar exported .csv file to the system

Parameters:
username - current user name or id
inputStream - data input stream
calendarId - given existed calendar id
calendarName - name of the new calendar, if create new
from - the first date of current time-range to import event
to - to the last date of current time-range to import event
isNew - import to new calendar or existed calendar
Throws:
Exception

exportCalendar

OutputStream exportCalendar(String username,
                            List<String> calendarIds,
                            String type,
                            int number)
                            throws Exception
The method exports events from eXo Calendar to icalendar file (.ics) or .csv file

Parameters:
username - current user name or id
calendarIds - the group calendar ids, if you want to export events from public calendars
type - The type of calendar will be exported
number - the limitation number of event
Returns:
data output stream
Throws:
Exception

exportEventCalendar

OutputStream exportEventCalendar(String username,
                                 String calendarId,
                                 String type,
                                 String eventId)
                                 throws Exception
The method export calendar event to output stream by given event id

Parameters:
username - current user name or id
calendarId - given calendar id, the calendar event belong to
type - The type of calendar will be exported
eventId - given event id
Returns:
data output stream
Throws:
Exception

getEventObjects

List<CalendarEvent> getEventObjects(InputStream icalInputStream)
                                    throws Exception
The method maps the input stream to event object

Parameters:
icalInputStream - the input stream
Returns:
List of calendar event objects contant infomations
Throws:
Exception

isValidate

boolean isValidate(InputStream icalInputStream)
                   throws Exception
The method return true if the input stream is correct format

Parameters:
icalInputStream - the input stream
Throws:
Exception

exportEventCalendar

ByteArrayOutputStream exportEventCalendar(CalendarEvent event)
                                          throws Exception
The method export binary from event object

Parameters:
event - : event object
Returns:
binary ics file
Throws:
Exception


Copyright © 2013 eXo Platform SAS. All Rights Reserved.