public class CalendarConverterService extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
EXCHANGE_CALENDAR_ID_PREFIX |
static String |
EXCHANGE_CALENDAR_NAME_PREFIX |
static String |
EXCHANGE_EVENT_ID_PREFIX |
static SimpleDateFormat |
RECURRENCE_ID_FORMAT |
| Constructor and Description |
|---|
CalendarConverterService() |
| Modifier and Type | Method and Description |
|---|---|
static Date |
convertDateToUTC(Date date) |
static void |
convertExchangeToExoEvent(org.exoplatform.calendar.service.CalendarEvent event,
microsoft.exchange.webservices.data.Appointment appointment,
String username,
org.exoplatform.calendar.service.impl.JCRDataStorage storage,
org.exoplatform.services.organization.UserHandler userHandler,
TimeZone timeZone)
Converts from Exchange Calendar Event to eXo Calendar Event.
|
static void |
convertExchangeToExoMasterRecurringCalendarEvent(org.exoplatform.calendar.service.CalendarEvent event,
microsoft.exchange.webservices.data.Appointment appointment,
String username,
org.exoplatform.calendar.service.impl.JCRDataStorage storage,
org.exoplatform.services.organization.UserHandler userHandler,
TimeZone timeZone)
Converts from Exchange Calendar Recurring Master Event to eXo Calendar
Event.
|
static List<org.exoplatform.calendar.service.CalendarEvent> |
convertExchangeToExoOccurenceEvent(org.exoplatform.calendar.service.CalendarEvent masterEvent,
List<org.exoplatform.calendar.service.CalendarEvent> updatedEvents,
List<String> appointmentIds,
microsoft.exchange.webservices.data.Appointment masterAppointment,
String username,
org.exoplatform.calendar.service.impl.JCRDataStorage storage,
org.exoplatform.services.organization.UserHandler userHandler,
TimeZone timeZone)
Converts from Exchange Calendar Exceptional Occurence Event to eXo Calendar
Event and return the list of deleted and updated elements.
|
static void |
convertExoToExchangeEvent(microsoft.exchange.webservices.data.Appointment appointment,
org.exoplatform.calendar.service.CalendarEvent calendarEvent,
String username,
org.exoplatform.services.organization.UserHandler userHandler,
microsoft.exchange.webservices.data.TimeZoneDefinition serverTimeZoneDefinition,
TimeZone userCalendarTimeZone)
Converts from Exchange Calendar Event to eXo Calendar Event.
|
static List<microsoft.exchange.webservices.data.Appointment> |
convertExoToExchangeMasterRecurringCalendarEvent(microsoft.exchange.webservices.data.Appointment appointment,
org.exoplatform.calendar.service.CalendarEvent event,
String username,
org.exoplatform.services.organization.UserHandler userHandler,
microsoft.exchange.webservices.data.TimeZoneDefinition serverTimeZoneDefinition,
TimeZone userCalendarTimeZone)
Converts from Exchange Calendar Recurring Master Event to eXo Calendar
Event.
|
static void |
convertExoToExchangeOccurenceEvent(microsoft.exchange.webservices.data.Appointment occAppointment,
org.exoplatform.calendar.service.CalendarEvent occEvent,
String username,
org.exoplatform.services.organization.UserHandler userHandler,
microsoft.exchange.webservices.data.TimeZoneDefinition serverTimeZoneDefinition,
TimeZone userCalendarTimeZone)
Converts from Exchange Calendar Exceptional Occurence Event to eXo Calendar
Event.
|
static microsoft.exchange.webservices.data.Appointment |
getAppointmentOccurence(microsoft.exchange.webservices.data.Appointment masterAppointment,
String recurrenceId) |
static String |
getCalendarId(String folderId)
Converts Exchange Calendar Name to eXo Calendar Id by adding a prefix and
hash coding the original Id.
|
static String |
getCalendarName(String calendarName)
Converts Exchange Calendar Name to eXo Calendar Name by adding a prefix.
|
static String |
getEventId(String appointmentId)
Converts Exchange Calendar Event Id to eXo Calendar Event Id
|
static Date |
getExoDateFromExchangeFormat(Date date) |
static boolean |
isAllDayEvent(org.exoplatform.calendar.service.CalendarEvent eventCalendar,
TimeZone userCalendarTimeZone) |
static boolean |
isExchangeCalendarId(String calendarId)
Checks if Passed eXo Calendar Id becomes from the synchronization with
exchange, by testing if the prefix exists or not.
|
static boolean |
isExchangeEventId(String eventId)
Checks if Passed eXo Calendar Id becomes from the synchronization with
exchange, by testing if the prefix exists or not.
|
static boolean |
isSameDate(Date value1,
Date value2)
Compares two dates.
|
static boolean |
verifyModifiedDatesConflict(org.exoplatform.calendar.service.CalendarEvent event,
microsoft.exchange.webservices.data.Appointment item) |
public static final String EXCHANGE_CALENDAR_NAME_PREFIX
public static final String EXCHANGE_CALENDAR_ID_PREFIX
public static final String EXCHANGE_EVENT_ID_PREFIX
public static final SimpleDateFormat RECURRENCE_ID_FORMAT
public static void convertExchangeToExoEvent(org.exoplatform.calendar.service.CalendarEvent event,
microsoft.exchange.webservices.data.Appointment appointment,
String username,
org.exoplatform.calendar.service.impl.JCRDataStorage storage,
org.exoplatform.services.organization.UserHandler userHandler,
TimeZone timeZone)
throws Exception
event - appointment - username - storage - userHandler - timeZone - Exceptionpublic static void convertExchangeToExoMasterRecurringCalendarEvent(org.exoplatform.calendar.service.CalendarEvent event,
microsoft.exchange.webservices.data.Appointment appointment,
String username,
org.exoplatform.calendar.service.impl.JCRDataStorage storage,
org.exoplatform.services.organization.UserHandler userHandler,
TimeZone timeZone)
throws Exception
event - appointment - username - storage - userHandler - timeZone - Exceptionpublic static List<org.exoplatform.calendar.service.CalendarEvent> convertExchangeToExoOccurenceEvent(org.exoplatform.calendar.service.CalendarEvent masterEvent, List<org.exoplatform.calendar.service.CalendarEvent> updatedEvents, List<String> appointmentIds, microsoft.exchange.webservices.data.Appointment masterAppointment, String username, org.exoplatform.calendar.service.impl.JCRDataStorage storage, org.exoplatform.services.organization.UserHandler userHandler, TimeZone timeZone) throws Exception
masterEvent - updatedEvents - empty list that will be updated by modified occurencesappointmentIds - masterAppointment - username - storage - userHandler - timeZone - Exceptionpublic static boolean verifyModifiedDatesConflict(org.exoplatform.calendar.service.CalendarEvent event,
microsoft.exchange.webservices.data.Appointment item)
throws Exception
event - eXo Calendar eventitem - Exchange itemExceptionpublic static void convertExoToExchangeEvent(microsoft.exchange.webservices.data.Appointment appointment,
org.exoplatform.calendar.service.CalendarEvent calendarEvent,
String username,
org.exoplatform.services.organization.UserHandler userHandler,
microsoft.exchange.webservices.data.TimeZoneDefinition serverTimeZoneDefinition,
TimeZone userCalendarTimeZone)
throws Exception
calendarEvent - appointment - username - calendarService - Exceptionpublic static List<microsoft.exchange.webservices.data.Appointment> convertExoToExchangeMasterRecurringCalendarEvent(microsoft.exchange.webservices.data.Appointment appointment, org.exoplatform.calendar.service.CalendarEvent event, String username, org.exoplatform.services.organization.UserHandler userHandler, microsoft.exchange.webservices.data.TimeZoneDefinition serverTimeZoneDefinition, TimeZone userCalendarTimeZone) throws Exception
event - appointment - username - calendarService - Exceptionpublic static void convertExoToExchangeOccurenceEvent(microsoft.exchange.webservices.data.Appointment occAppointment,
org.exoplatform.calendar.service.CalendarEvent occEvent,
String username,
org.exoplatform.services.organization.UserHandler userHandler,
microsoft.exchange.webservices.data.TimeZoneDefinition serverTimeZoneDefinition,
TimeZone userCalendarTimeZone)
throws Exception
masterEvent - listEvent - masterAppointment - username - calendarService - Exceptionpublic static String getCalendarName(String calendarName)
calendarName - public static String getCalendarId(String folderId)
folderId - public static boolean isExchangeCalendarId(String calendarId)
calendarId - public static boolean isExchangeEventId(String eventId)
calendarId - public static String getEventId(String appointmentId) throws Exception
appointmentId - Exceptionpublic static boolean isSameDate(Date value1, Date value2)
value1 - value2 - public static boolean isAllDayEvent(org.exoplatform.calendar.service.CalendarEvent eventCalendar,
TimeZone userCalendarTimeZone)
public static Date convertDateToUTC(Date date) throws ParseException
ParseExceptionCopyright © 2003-2014 eXo Platform SAS. All Rights Reserved.