|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.calendar.service.impl.CsvImportExport
public class CsvImportExport
Created by The eXo Platform SAS Author : Pham Tuan tuan.pham@exoplatform.com Apr 1, 2008
| Field Summary | |
|---|---|
static String |
CSV_PATTERN
|
static String |
EV_ALLDAY
|
static String |
EV_ATTACTMENT
|
static String |
EV_ATTENDEES
|
static String |
EV_BILLINGINFO
|
static String |
EV_CATEGORIES
|
static String |
EV_DESCRIPTION
|
static String |
EV_ENDDATE
|
static String |
EV_ENDTIME
|
static String |
EV_HASREMINDER
|
static String |
EV_INVITATION
|
static String |
EV_LOCATION
|
static String |
EV_MEETINGORGANIZER
|
static String |
EV_MILEAGE
|
static String |
EV_PRIORITY
|
static String |
EV_PRIVATE
|
static String |
EV_REMINDERDATE
|
static String |
EV_REMINDERTIME
|
static String |
EV_SENSITIVITY
|
static String |
EV_STARTDATE
|
static String |
EV_STARTTIME
|
static String |
EV_STATUS
|
static String |
EV_SUMMARY
|
| Constructor Summary | |
|---|---|
CsvImportExport(JCRDataStorage dataStore)
Construct a regex-based CSV parser. |
|
| Method Summary | |
|---|---|
OutputStream |
exportCalendar(String username,
List<String> calendarIds,
String type)
|
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 inputStream)
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 |
List<String> |
parse(String line)
Parse one line. |
List<CalendarEvent> |
process(BufferedReader in)
Process one file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CSV_PATTERN
public static String EV_SUMMARY
public static String EV_STARTDATE
public static String EV_STARTTIME
public static String EV_ENDDATE
public static String EV_ENDTIME
public static String EV_ALLDAY
public static String EV_HASREMINDER
public static String EV_REMINDERDATE
public static String EV_REMINDERTIME
public static String EV_MEETINGORGANIZER
public static String EV_ATTENDEES
public static String EV_INVITATION
public static String EV_ATTACTMENT
public static String EV_BILLINGINFO
public static String EV_CATEGORIES
public static String EV_DESCRIPTION
public static String EV_LOCATION
public static String EV_MILEAGE
public static String EV_PRIORITY
public static String EV_PRIVATE
public static String EV_SENSITIVITY
public static String EV_STATUS
| Constructor Detail |
|---|
public CsvImportExport(JCRDataStorage dataStore)
| Method Detail |
|---|
public List<CalendarEvent> process(BufferedReader in)
throws Exception
Exceptionpublic List<String> parse(String line)
public OutputStream exportCalendar(String username,
List<String> calendarIds,
String type)
throws Exception
Exception
public List<CalendarEvent> getEventObjects(InputStream inputStream)
throws Exception
CalendarImportExport
getEventObjects in interface CalendarImportExportinputStream - the input stream
Exception
public void importCalendar(String username,
InputStream inputStream,
String calendarId,
String calendarName,
Calendar from,
Calendar to,
boolean isNew)
throws Exception
CalendarImportExport
importCalendar in interface CalendarImportExportusername - current user name or idinputStream - data input streamcalendarId - given existed calendar idcalendarName - name of the new calendar, if create newfrom - the first date of current time-range to import eventto - to the last date of current time-range to import eventisNew - import to new calendar or existed calendar
Exception
public boolean isValidate(InputStream icalInputStream)
throws Exception
CalendarImportExport
isValidate in interface CalendarImportExporticalInputStream - the input stream
Exception
public OutputStream exportCalendar(String username,
List<String> calendarIds,
String type,
int number)
throws Exception
CalendarImportExport
exportCalendar in interface CalendarImportExportusername - current user name or idcalendarIds - the group calendar ids, if you want to export events from public calendarstype - The type of calendar will be exportednumber - the limitation number of event
Exception
public OutputStream exportEventCalendar(String username,
String calendarId,
String type,
String eventId)
throws Exception
CalendarImportExport
exportEventCalendar in interface CalendarImportExportusername - current user name or idcalendarId - given calendar id, the calendar event belong totype - The type of calendar will be exportedeventId - given event id
Exception
public ByteArrayOutputStream exportEventCalendar(CalendarEvent event)
throws Exception
CalendarImportExport
exportEventCalendar in interface CalendarImportExportevent - : event object
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||