public class CsvImportExport extends Object implements CalendarImportExport
| Modifier and Type | Field and Description |
|---|---|
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 |
PUBLIC_TYPE, SHARED_TYPE| Constructor and Description |
|---|
CsvImportExport(JCRDataStorage dataStore)
Construct a regex-based CSV parser.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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
public CsvImportExport(JCRDataStorage dataStore)
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
Exceptionpublic List<CalendarEvent> getEventObjects(InputStream inputStream) throws Exception
CalendarImportExportgetEventObjects in interface CalendarImportExportinputStream - the input streamExceptionpublic void importCalendar(String username, InputStream inputStream, String calendarId, String calendarName, Calendar from, Calendar to, boolean isNew) throws Exception
CalendarImportExportimportCalendar 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 calendarExceptionpublic boolean isValidate(InputStream icalInputStream) throws Exception
CalendarImportExportisValidate in interface CalendarImportExporticalInputStream - the input streamExceptionpublic OutputStream exportCalendar(String username, List<String> calendarIds, String type, int number) throws Exception
CalendarImportExportexportCalendar 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 eventExceptionpublic OutputStream exportEventCalendar(String username, String calendarId, String type, String eventId) throws Exception
CalendarImportExportexportEventCalendar 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 idExceptionpublic ByteArrayOutputStream exportEventCalendar(CalendarEvent event) throws Exception
CalendarImportExportexportEventCalendar in interface CalendarImportExportevent - : event objectExceptionCopyright © 2003–2020 eXo Platform SAS. All rights reserved.