public interface CalendarService
| Modifier and Type | Field and Description |
|---|---|
static String |
CALDAV |
static String |
EXPORTEDCSV |
static String |
ICALENDAR |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListenerPlugin(CalendarEventListener listener) |
void |
addListenerPlugin(CalendarUpdateEventListener listener) |
void |
assignGroupTask(String taskId,
String calendarId,
String assignee)
Assigns a group task for an user
|
void |
autoRemoveShareCalendar(String groupId,
String username)
Un-shares group calendars with an user when he is removed from a membership
|
void |
autoShareCalendar(List<String> groupsOfUser,
String receiver)
Shares group calendars with an user when he is assigned a new membership
|
String |
buildRecurrenceId(Date formTime,
String username) |
Collection<CalendarEvent> |
buildSeries(CalendarEvent originEvent,
Date from,
Date to,
String userId) |
Map<String,String> |
checkFreeBusy(EventQuery eventQuery)
Gets busy time of participants in a period
|
void |
confirmInvitation(String fromUserId,
String toUserId,
int calType,
String calendarId,
String eventId,
int answer)
Deprecated.
|
void |
confirmInvitation(String fromUserId,
String confirmingEmail,
String confirmingUser,
int calType,
String calendarId,
String eventId,
int answer)
Confirms an invitation to participate in an event
|
org.quartz.JobDetail |
findSynchronizeRemoteCalendarJob(org.exoplatform.services.scheduler.JobSchedulerService schedulerService,
String username)
Finds job of synchronizing remote calendar of an user
|
int |
generateRss(String username,
LinkedHashMap<String,Calendar> calendars,
RssData rssData)
Generates RSS Feed link for list of calendars following RSS standard and stores the feed in storage
|
int |
generateRss(String username,
List<String> calendarIds,
RssData rssData)
Generates RSS Feed data for list of calendars following RSS standard and stores the feed in storage
|
Collection<CalendarEvent> |
getAllExcludedEvent(CalendarEvent originEvent,
Date from,
Date to,
String userId) |
List<CalendarEvent> |
getAllNoRepeatEvents(String username,
EventQuery eventQuery,
String[] publicCalendarIds)
A faster version of getEvents used for UIWeekview
|
List<CalendarEvent> |
getAllNoRepeatEventsSQL(String username,
EventQuery eventQuery,
String[] privateCalendars,
String[] publicCalendars,
List<String> emptyCalendars)
A faster version of getAllNoRepeatEvents without thread
|
String |
getCalDavResourceEtag(String username,
String calendarId,
String eventId)
Gets the entity tag of an event in a subscribed calendar.
|
String |
getCalDavResourceHref(String username,
String calendarId,
String eventId)
Gets the reference key to remote event of an event in a subscribed calendar.
|
Calendar |
getCalendarById(String calId)
Gets a calendar by its id
|
CalendarImportExport |
getCalendarImportExports(String type)
Gets the object performing import/export by type of import/export.
|
CalendarSetting |
getCalendarSetting(String username)
Gets calendar settings of an user
|
CalendarEvent |
getEvent(String username,
String eventId)
Gets event/task by its id and its owner
|
CalendarEvent |
getEventById(String eventId)
Gets event by its Id
|
List<EventCategory> |
getEventCategories(String username)
Gets all event categories of an user
|
EventCategory |
getEventCategory(String username,
String eventCategoryId)
Gets event category by its id and its owner
|
EventCategory |
getEventCategoryByName(String username,
String eventCategoryName)
Gets event category by its name and its owner
|
List<CalendarEvent> |
getEvents(String username,
EventQuery eventQuery,
String[] publicCalendarIds)
Gets all the events and tasks that match the conditions in the given
EventQuery object |
List<CalendarEvent> |
getExceptionEvents(String username,
CalendarEvent recurEvent)
Gets all exception occurrences from a original recurrent event, the exception event always belong to same calendar with original recurrent event
|
List<CalendarEvent> |
getExceptionEventsFromDate(String username,
CalendarEvent event,
Date fromDate)
Gets all exception events of a repetitive event that happen after a specified date
|
String[] |
getExportImportType()
Gets array of supported types of import/export
|
List<FeedData> |
getFeeds(String username)
Gets RSS Feed data created by the given user.
|
Calendar |
getGroupCalendar(String calendarId)
Gets a group/public calendar by its Id
|
List<GroupCalendarData> |
getGroupCalendars(String[] groupIds,
boolean isShowAll,
String username)
Gets all the group calendar data of current user
|
CalendarEvent |
getGroupEvent(String eventId)
Gets a group event by its Id
|
CalendarEvent |
getGroupEvent(String calendarId,
String eventId)
Gets event or task from a given group calendar by its id
|
List<CalendarEvent> |
getGroupEventByCalendar(List<String> calendarIds)
Gets all events and tasks from a list of public calendars
|
List<CalendarEvent> |
getHighLightOriginalRecurrenceEvents(String username,
Calendar from,
Calendar to,
String[] publicCalendarIds) |
List<CalendarEvent> |
getHighLightOriginalRecurrenceEventsSQL(String username,
Calendar from,
Calendar to,
EventQuery eventQuery,
String[] privateCalendars,
String[] publicCalendars,
List<String> emptyCalendars) |
Map<String,CalendarEvent> |
getOccurrenceEvents(CalendarEvent recurEvent,
Calendar from,
Calendar to,
String timezone)
Gets all occurrences of a repetitive event in a period of time.
|
List<CalendarEvent> |
getOriginalRecurrenceEvents(String username,
Calendar from,
Calendar to,
String[] publicCalendarIds)
Gets all original repetitive events of an user in period of time
|
List<CalendarEvent> |
getPublicEvents(EventQuery eventQuery)
Gets all public events and tasks that match the conditions in the given EventQuery
|
RemoteCalendar |
getRemoteCalendar(String owner,
String calendarId)
Gets an user's remote calendar, identified by its ID
|
Calendar |
getRemoteCalendar(String owner,
String remoteUrl,
String remoteType)
Gets an user's remote calendar, identified by its URL
|
int |
getRemoteCalendarCount(String username)
Gets number of remote calendars of an user
|
RemoteCalendarService |
getRemoteCalendarService()
Gets the
RemoteCalendarService object |
CalendarEvent |
getRepetitiveEvent(CalendarEvent occurence) |
ResourceBundle |
getResourceBundle()
Gets the resource bundle to support localization
|
javax.jcr.Node |
getRssHome(String username)
Gets RSS home node where RSS data is stored in data storage.
|
GroupCalendarData |
getSharedCalendars(String username,
boolean isShowAll)
Gets all calendars that are shared with the given user
|
CalendarEvent |
getSharedEvent(String username,
String calendarId,
String eventId)
Get shared event by user name, calendar id and event id
|
List<CalendarEvent> |
getSharedEventByCalendars(String username,
List<String> calendarIds)
Gets events in shared calendars
|
int |
getTypeOfCalendar(String userName,
String calendarId)
Gets type of a calendar by user name and calendar id
|
Calendar |
getUserCalendar(String username,
String calendarId)
Gets the given user's private calendar, identified by its ID.
|
List<Calendar> |
getUserCalendars(String username,
boolean isShowAll)
Gets private calendars of the given user.
|
List<CalendarEvent> |
getUserEventByCalendar(String username,
List<String> calendarIds)
Gets all events and tasks from a list of private calendars
|
List<CalendarEvent> |
getUserEvents(String username,
EventQuery eventQuery)
Gets events and tasks that match the conditions in the given EventQuery
|
Calendar |
importRemoteCalendar(RemoteCalendar remoteCalendar)
Imports an online .ics or through CalDav access to local calendar
|
void |
importRemoteCalendarByJob(RemoteCalendar remoteCalendar)
Imports given remote calendar in background
|
void |
initNewUser(String userName,
CalendarSetting defaultCalendarSetting)
Initializes calendar data for a new created user
|
boolean |
isGroupBeingShared(String group,
org.exoplatform.services.scheduler.impl.JobSchedulerServiceImpl schedulerService)
Checks if a group is belong to a list of groups that's being shared
|
boolean |
isRemoteCalendar(String username,
String calendarId)
Checks if the calendar with given calendarId is a remote calendar
|
boolean |
isValidRemoteUrl(String url,
String type,
String remoteUser,
String remotePassword)
Checks if the remote URL is valid, in 2 cases of iCalendar URL or CalDav URL, with authentication
|
void |
loadSynchronizeRemoteCalendarJob(String username)
Initializes job for synchronizing remote calendar
|
void |
moveEvent(String fromCalendar,
String toCalendar,
String formType,
String toType,
List<CalendarEvent> calEvents,
String username)
Saves changes for list of events.
|
Calendar |
refreshRemoteCalendar(String username,
String remoteCalendarId)
Reloads data for a remote calendar
|
void |
removeAllSeriesEvents(CalendarEvent originEvent,
String username)
Remove all occurrence of a recurrent event
|
void |
removeEventCategory(String username,
String eventCategoryId)
Removes an event category, all events and tasks belong to this category will be removed.
|
void |
removeFeedData(String username,
String title)
Removes the feed data of an user by the feed's title
|
void |
removeFollowingSeriesEvents(CalendarEvent originEvent,
CalendarEvent newEvent,
String username)
This method is called when:
User wants to remove only following event in the series, then it will stop the series from time of editing event and remove all exception following event
|
void |
removeOccurrenceInstance(String username,
CalendarEvent occurrence)
Removes only an occurrence instance from recurrence series, this function will get the original event node of the occurrence
and then put the recurrence id of the need-to-delete occurrence to excludeId list of original node.
|
void |
removeOneOccurrenceEvent(CalendarEvent originEvent,
CalendarEvent removedOccurrence,
String username)
Remove an occurrence of a recurrent event
|
Calendar |
removePublicCalendar(String calendarId)
Removes the group calendar form data base, every events, tasks inside this calendar will be removed too
|
CalendarEvent |
removePublicEvent(String calendarId,
String eventId)
Removes a public event or task, all attachments and reminders of this event will be removed
|
void |
removeRecurrenceSeries(String username,
CalendarEvent originalEvent)
Removes all occurrence from an recurrence series.
|
void |
removeSharedCalendar(String username,
String calendarId)
Removes shared calendars of an user
|
void |
removeSharedCalendarByJob(String username,
List<String> unsharedGroups,
String calendarId)
Un-shares a calendar with groups.
|
void |
removeSharedCalendarFolder(String username)
Removes the shared calendar folder of an user and all references (from shared calendars) to this folder.
|
void |
removeSharedEvent(String username,
String calendarId,
String eventId)
Removes event/task from shared calendar
|
Calendar |
removeUserCalendar(String username,
String calendarId)
Removes private calendar by given id, all events and tasks belong to this calendar will be removed
|
CalendarEvent |
removeUserEvent(String username,
String calendarId,
String eventId)
Removes an event from the personal calendar
|
void |
saveAllSeriesEvents(CalendarEvent occurrence,
String username)
Updates all occurrence of a recurrent event
|
void |
saveCalendarSetting(String username,
CalendarSetting setting)
Saves User Calendar setting
|
void |
saveEventCategory(String username,
EventCategory eventCategory,
boolean isNew)
Saves an event category to data base
|
void |
saveEventToSharedCalendar(String username,
String calendarId,
CalendarEvent event,
boolean isNew)
Saves event to shared calendar.
|
void |
saveFollowingSeriesEvents(CalendarEvent originEvent,
CalendarEvent newEvent,
String username)
This method is called when:
User wants to update the following occurences also, then it will break to 2 new series from time of editing event reset all exception event properties
|
void |
saveOneOccurrenceEvent(CalendarEvent originEvent,
CalendarEvent newEvent,
String username)
Updates an occurrence of a recurrent event
|
void |
savePublicCalendar(Calendar calendar,
boolean isNew)
Saves a calendar to public area (group calendar)
|
void |
savePublicEvent(String calendarId,
CalendarEvent event,
boolean isNew)
Saves event or task to a public calendar
|
void |
saveSharedCalendar(String username,
Calendar calendar)
Saves a calendar to shared calendars section
|
void |
saveUserCalendar(String username,
Calendar calendar,
boolean isNew)
Saves an user's private calendar to storage
|
void |
saveUserEvent(String username,
String calendarId,
CalendarEvent event,
boolean isNew)
Saves events/tasks to a personal calendar
|
EventPageList |
searchEvent(String username,
EventQuery eventQuery,
String[] publicCalendarIds)
Gets an
EventPageList of events/tasks of a given list of public calendars that matches the condition in the given EvenQuery object. |
Map<Integer,String> |
searchHighlightRecurrenceEvent(String username,
EventQuery eventQuery,
String[] publicCalendarIds,
String timezone)
Finds all days of month or year that have event/task to highlight from all personal, shared and public calendar of an user
This function is much same like searchHightLightEvent() function but it only counts for recurrent event |
List<Map<Integer,String>> |
searchHighlightRecurrenceEventSQL(String username,
EventQuery eventQuery,
String timezone,
String[] privateCalendars,
String[] publicCalendars) |
Map<Integer,String> |
searchHightLightEvent(String username,
EventQuery eventQuery,
String[] publicCalendarIds)
Gets the day in month on which there are events.
|
List<Map<Integer,String>> |
searchHightLightEventSQL(String username,
EventQuery eventQuery,
String[] privateCalendars,
String[] publicCalendars) |
void |
setGroupTaskStatus(String taskId,
String calendarId,
String status)
Sets status for a group task.
|
void |
shareCalendar(String username,
String calendarId,
List<String> sharedUsers)
Shares the private calendar to other users
|
void |
shareCalendarByRunJob(String username,
String calendarId,
List<String> sharedGroups)
Shares Calendar with groups
|
void |
stopSynchronizeRemoteCalendarJob(String username)
Stops an user's job for synchronizing remote calendar
|
void |
updateOccurrenceEvent(String fromCalendar,
String toCalendar,
String fromType,
String toType,
List<CalendarEvent> calEvents,
String username)
Updates an occurrence of a repetitive event
|
void |
updateRecurrenceSeries(String fromCalendar,
String toCalendar,
String fromType,
String toType,
CalendarEvent occurrence,
String username)
Updates recurrence series from an occurrence, this function is only called if the occurrence event is not changed the from date property.
|
Calendar |
updateRemoteCalendarInfo(RemoteCalendar remoteCalendar)
Updates a remote calendar
|
static final String ICALENDAR
static final String EXPORTEDCSV
static final String CALDAV
Calendar getUserCalendar(String username, String calendarId) throws Exception
List<Calendar> getUserCalendars(String username, boolean isShowAll) throws Exception
The result depends on value of isShowAll parameter. If isShowAll
is true, this method returns all private calendars of this user, otherwise it returns
only calendars selected to be displayed in Calendar setting
username - current user name(or user id)isShowAll - If true, returns all private calendars. If false, returns ExceptionCalendar,
CalendarSettingvoid saveUserCalendar(String username, Calendar calendar, boolean isNew) throws Exception
username - current user name(or user id)calendar - Calendar object that will be storedisNew - Boolean value to know adding a new calendar or just updating this calendarExceptionCalendar removeUserCalendar(String username, String calendarId) throws Exception
username - current user name(or user id)calendarId - given calendar idExceptionvoid saveSharedCalendar(String username, Calendar calendar) throws Exception
username - current user name(or user id)calendar - Calendar objectExceptionCalendar getGroupCalendar(String calendarId) throws Exception
List<GroupCalendarData> getGroupCalendars(String[] groupIds, boolean isShowAll, String username) throws Exception
The GroupCalendarData contains information about list of calendars with the
group that those calendars belong to.
groupIds - The id of groups that current user belongs toisShowAll - to specify getting all calendars or only calendars selected in Calendar user settingusername - current user name(or user id)ExceptionGroupCalendarDatavoid savePublicCalendar(Calendar calendar, boolean isNew) throws Exception
calendar - Calendar to be savedisNew - If true, a new calendar will be saved. If false, an existing calendar will be updated.ExceptionCalendar removePublicCalendar(String calendarId) throws Exception
calendarId - ExceptionList<EventCategory> getEventCategories(String username) throws Exception
username - current user name(or user id)ExceptionEventCategoryvoid saveEventCategory(String username, EventCategory eventCategory, boolean isNew) throws Exception
Every users have their own categories of events. The name of category is unique.
username - current user name(or user id)eventCategory - isNew - Exceptionvoid removeEventCategory(String username, String eventCategoryId) throws Exception
username - current user name(or user id)eventCategoryId - The unique name of categoryExceptionEventCategory getEventCategory(String username, String eventCategoryId) throws Exception
username - user id of the event category's ownereventCategoryId - Id of the event categoryExceptionEventCategoryEventCategory getEventCategoryByName(String username, String eventCategoryName) throws Exception
username - Id of the ownereventCategoryName - The name of the categoryExceptionEventCategoryList<CalendarEvent> getUserEventByCalendar(String username, List<String> calendarIds) throws Exception
username - The owner of the calendarcalendarIds - List of calendar idExceptionList<CalendarEvent> getUserEvents(String username, EventQuery eventQuery) throws Exception
Each property of the EventQuery contains a condition of the query. For example:
text: to search events that have some fields containing this value.calendarIds: array of calendar IDs in which to search events.EventQuery.getQueryStatement()username - current user name(or user id)eventQuery - EventQuery object containing the conditionsCalendarEvent object (events and tasks)ExceptionCalendarEvent,
EventQueryCalendarEvent getEvent(String username, String eventId) throws Exception
username - user id of the event ownereventId - id of the eventExceptionvoid saveUserEvent(String username, String calendarId, CalendarEvent event, boolean isNew) throws Exception
username - current user name(or user id)calendarId - Id of the calendar to which the event will be savedevent - CalendarEvent object to be savedisNew - If true, a new event will be saved. If false, an existing event will be updated.ExceptionCalendarEvent removeUserEvent(String username, String calendarId, String eventId) throws Exception
All attachments and reminders will be removed
username - current user name(or user id)calendarId - Id of the calendar from which the event will be removed.eventId - Id of the removed event.CalendarEvent object. Null if no event was removed.ExceptionCalendarEvent getGroupEvent(String eventId) throws Exception
eventId - CalendarEvent object or null if event was not foundExceptionCalendarEvent getGroupEvent(String calendarId, String eventId) throws Exception
calendarId - given group calendar ideventId - given event idCalendarEvent objectExceptionCalendarEventList<CalendarEvent> getGroupEventByCalendar(List<String> calendarIds) throws Exception
calendarIds - List of Calendar IDsCalendarEvent objectsExceptionCalendarEventList<CalendarEvent> getPublicEvents(EventQuery eventQuery) throws Exception
eventQuery - EventQuery objectExceptionCalendarEvent,
EventQueryvoid savePublicEvent(String calendarId, CalendarEvent event, boolean isNew) throws Exception
calendarId - Id of the public calendar to which the event will be savedevent - CalendarEvent object to be saved.isNew - If true, a new event will be saved. If false, an existing event will be updated.ExceptionCalendarEvent removePublicEvent(String calendarId, String eventId) throws Exception
calendarId - given calendar ideventId - given event or task idExceptionvoid saveCalendarSetting(String username, CalendarSetting setting) throws Exception
username - current user name(or user id)setting - CalendarSetting objectExceptionCalendarSettingCalendarSetting getCalendarSetting(String username) throws Exception
username - current user name(or user id)ExceptionCalendarSettingCalendarImportExport getCalendarImportExports(String type)
There are 2 classes that implements the interface CalendarImportExport:
type - ICS or CSVCalendarImportExportString[] getExportImportType() throws Exception
Now there are 2 types that are supported: ICS and CSV.
ExceptionCalendarImportExport,
RemoteCalendarServiceint generateRss(String username, LinkedHashMap<String,Calendar> calendars, RssData rssData) throws Exception
This method is called when user selects calendars to generate RSS link in UIEditFeed form.
int generateRss(String username, List<String> calendarIds, RssData rssData) throws Exception
List<FeedData> getFeeds(String username) throws Exception
javax.jcr.Node getRssHome(String username) throws Exception
username - current user name(or user id)ExceptionEventPageList searchEvent(String username, EventQuery eventQuery, String[] publicCalendarIds) throws Exception
EventPageList of events/tasks of a given list of public calendars that matches the condition EvenQuery object.username - current user name(or user id)eventQuery - EventQuery objectpublicCalendarIds - Array of public calendar IDs in which to search eventsEventPageList object.ExceptionEventPageListMap<Integer,String> searchHightLightEvent(String username, EventQuery eventQuery, String[] publicCalendarIds) throws Exception
This method is used when UIMiniCalendar is loaded or updated. We need to know on which day there are events
to add class 'highlight' for that day in the template.
The given EventQuery always has from date is the first day of the month, and end date is the last
day of the month. The returned result is a Map with key set is the days having events, the values are all "value".
username - current user name(or user id)eventQuery - EventQuery objectpublicCalendarIds - array of public calendar IDs of which to search eventsMap with key set is the days having events. Ex: {<14,"value">, <15,"value">}ExceptionList<Map<Integer,String>> searchHightLightEventSQL(String username, EventQuery eventQuery, String[] privateCalendars, String[] publicCalendars) throws Exception
Exceptionvoid shareCalendar(String username, String calendarId, List<String> sharedUsers) throws Exception
username - current user name(or user id)calendarId - Id of the shared calendarsharedUsers - list of users with whom to share this calendarExceptionGroupCalendarData getSharedCalendars(String username, boolean isShowAll) throws Exception
username - given user name(or user id)isShowAll - If true, returns all shared calendars, if false, returns only shared calendars
that are selected in Calendar Setting.GroupCalendarData objectExceptionGroupCalendarDataList<CalendarEvent> getEvents(String username, EventQuery eventQuery, String[] publicCalendarIds) throws Exception
EventQuery object The result includes events of private, public and share calendars.
If publicCalendarIds is not null, the result will include also all public events from those
public calendar.
username - current user name(or user id)eventQuery - EventQuery objectpublicCalendarIds - Optional array of public calendar IDs of which to get eventsExceptionCalendarEventList<CalendarEvent> getAllNoRepeatEvents(String username, EventQuery eventQuery, String[] publicCalendarIds) throws Exception
username - eventQuery - publicCalendarIds - ExceptionList<CalendarEvent> getAllNoRepeatEventsSQL(String username, EventQuery eventQuery, String[] privateCalendars, String[] publicCalendars, List<String> emptyCalendars) throws Exception
username - eventQuery - privateCalendars - publicCalendars - Exceptionvoid removeSharedCalendar(String username, String calendarId) throws Exception
username - current user name(or user id)calendarId - given calendar idExceptionvoid removeSharedCalendarFolder(String username) throws Exception
username - the usernameExceptionvoid saveEventToSharedCalendar(String username, String calendarId, CalendarEvent event, boolean isNew) throws Exception
username - current user name(or user id)calendarId - given calendar idevent - CalendarEvent objectisNew - If true, a new event will be saved. If false, an existing event will be updated.ExceptionMap<String,String> checkFreeBusy(EventQuery eventQuery) throws Exception
The list of participants and the period are given in an EventQuery object.
The returned result is a Map with the key is user name of participants
and the value is pairs of {fromtime, totime} in milliseconds , separated by ','.
eventQuery - EventQuery objectExceptionEventQueryvoid removeSharedEvent(String username, String calendarId, String eventId) throws Exception
username - current user name(or user id)calendarId - given calendar ideventId - given event idExceptionvoid moveEvent(String fromCalendar, String toCalendar, String formType, String toType, List<CalendarEvent> calEvents, String username) throws Exception
This method can be used in 2 cases:
fromCalendar - Id of the source calendartoCalendar - Id of the destination calendarformType - type of the source calendar (private/shared/public)toType - type of the destination calendar (private/shared/public)calEvents - List of CalendarEvent objectsusername - current user name(or user id)Exceptionvoid confirmInvitation(String fromUserId, String toUserId, int calType, String calendarId, String eventId, int answer)
This method is called only when user uses exo mail product.
The answer can be: DENY, ACCEPT, NOTSURE
fromUserId - Id of the invitation ownertoUserId - Id of the invited usercalType - type of the invitation event's calendarcalendarId - Id of the invitation event's calendareventId - Id of the invitation eventanswer - The answer of the invited uservoid confirmInvitation(String fromUserId, String confirmingEmail, String confirmingUser, int calType, String calendarId, String eventId, int answer) throws Exception
fromUserId - Id of the invitation ownerconfirmingEmail - Email of the invited participantconfirmingUser - User id of the invited participantcalType - Type of the invitation event's calendarcalendarId - Id of the invitation event's calendareventId - Id of the invitation eventanswer - The answer of the invited user. It can be: DENY/ACCEPT/NOT_SUREExceptionvoid addListenerPlugin(CalendarUpdateEventListener listener) throws Exception
Exceptionvoid addEventListenerPlugin(CalendarEventListener listener) throws Exception
Exceptionint getTypeOfCalendar(String userName, String calendarId) throws Exception
There a 3 types of calendar:
List<CalendarEvent> getSharedEventByCalendars(String username, List<String> calendarIds) throws Exception
username - current user namecalendarIds - list of shared calendars from which to get eventsCalendarEvent objectExceptionCalendarEvent getSharedEvent(String username, String calendarId, String eventId) throws Exception
username - current user namecalendarId - id of shared calendareventId - id of shared eventCalendarEvent objectExceptionvoid removeFeedData(String username, String title)
username - user id of the feed ownertitle - The title of the removed feedResourceBundle getResourceBundle() throws Exception
ResourceBundle objectExceptionvoid initNewUser(String userName, CalendarSetting defaultCalendarSetting) throws Exception
userName - User id of the new created userdefaultCalendarSetting - default calendar settingExceptionvoid assignGroupTask(String taskId, String calendarId, String assignee) throws Exception
taskId - the assigned taskcalendarId - Id of the task's calendarassignee - User id of the assigneeExceptionvoid setGroupTaskStatus(String taskId, String calendarId, String status) throws Exception
taskId - Id of the taskcalendarId - Id of the task's calendarstatus - ExceptionCalendarEventboolean isRemoteCalendar(String username, String calendarId) throws Exception
username - the owner of calendarcalendarId - the Id of calendarExceptionboolean isValidRemoteUrl(String url, String type, String remoteUser, String remotePassword) throws Exception
url - the remote URLtype - the type of remote calendar, iCalendar or CalDavremoteUser - the remote user name used to authenticateremotePassword - the remote password used to authenticateExceptionCalendar importRemoteCalendar(RemoteCalendar remoteCalendar) throws Exception
remoteCalendar - object content all properties for remote calendar.ExceptionCalendar refreshRemoteCalendar(String username, String remoteCalendarId) throws Exception
username - owner of the calendarremoteCalendarId - Id of the remote calendar to refreshRemoteCalendar objectExceptionCalendar updateRemoteCalendarInfo(RemoteCalendar remoteCalendar) throws Exception
remoteCalendar - a RemoteCalendar object.ExceptionRemoteCalendarRemoteCalendar getRemoteCalendar(String owner, String calendarId) throws Exception
owner - user name of the calendar's ownercalendarId - the Id of calendarRemoteCalendar objectExceptionRemoteCalendarRemoteCalendarService getRemoteCalendarService() throws Exception
RemoteCalendarService objectRemoteCalendarService objectExceptionCalendar getRemoteCalendar(String owner, String remoteUrl, String remoteType) throws Exception
owner - user name of the calendar's ownerremoteUrl - URL of the remote calendarremoteType - iCalendar or CalDavCalendar objectExceptionint getRemoteCalendarCount(String username) throws Exception
username - ExceptionString getCalDavResourceHref(String username, String calendarId, String eventId) throws Exception
Each event of a CalDav subscribed calendar has a reference key to its respective remote event. This key allows us to know if
an event is deleted or created from remote calendar.
The JCR property holding this value is exo:caldavHref of the node type exo:caldavCalendarEvent.
username - current user name (or user ID)calendarId - the subscribed calendar's IDeventId - Id of the local eventExceptionString getCalDavResourceEtag(String username, String calendarId, String eventId) throws Exception
Each event of a CalDav subscribed calendar has an entity tag. This value allows us to know if the details content of a remote event
were updated, so that we can update the respective local event properly.
The JCR property holding this value is exo:caldavEtag of the node type exo:caldavCalendarEvent.
username - current user name (or user ID)calendarId - ID of the subscribed calendareventId - Id of the local eventExceptionvoid loadSynchronizeRemoteCalendarJob(String username) throws Exception
username - Exceptionorg.quartz.JobDetail findSynchronizeRemoteCalendarJob(org.exoplatform.services.scheduler.JobSchedulerService schedulerService,
String username)
throws Exception
schedulerService - username - JobDetail objectExceptionvoid stopSynchronizeRemoteCalendarJob(String username) throws Exception
username - ExceptionMap<String,CalendarEvent> getOccurrenceEvents(CalendarEvent recurEvent, Calendar from, Calendar to, String timezone) throws Exception
recurEvent - the original recurrent eventfrom - the from timeto - the to timeCalendarEvent object, each entry will contains an occurrence event object with recurrence-id as the keyExceptionList<CalendarEvent> getOriginalRecurrenceEvents(String username, Calendar from, Calendar to, String[] publicCalendarIds) throws Exception
username - the owner of recurrent eventfrom - from timeto - to timeCalendarEvent objectsExceptionvoid updateOccurrenceEvent(String fromCalendar, String toCalendar, String fromType, String toType, List<CalendarEvent> calEvents, String username) throws Exception
This method is called when:
fromCalendar - ID of the source calendartoCalendar - ID of the destination calendarfromType - type of the source CalendartoType - type of the destination calendarcalEvents - list of events to be updatedusername - current user name (or user ID)Exceptionvoid saveOneOccurrenceEvent(CalendarEvent originEvent, CalendarEvent newEvent, String username)
This method is called when:
originEvent - the original event with occurrence rule will be updatednewEvent - the new event will be separated from that seriesusername - current user name (or user ID) using to retrieve the user calendar in case modify event of personal calendarvoid saveAllSeriesEvents(CalendarEvent occurrence, String username)
This method is called when:
occurrence - the original event with occurrence ruleusername - current user name (or user ID) using to retrieve the user calendar in case modify event of personal calendarvoid saveFollowingSeriesEvents(CalendarEvent originEvent, CalendarEvent newEvent, String username)
This method is called when:
originEvent - Original event with the old rule have to updatenewEvent - new break event with new ruleusername - current user name (or user ID) using to retrieve the user calendar in case modify event of personal calendarvoid removeOneOccurrenceEvent(CalendarEvent originEvent, CalendarEvent removedOccurrence, String username)
This method is called when:
originEvent - the original event with occurrence rule will be updatedremovedOccurrence - the occurrence selected to be removedusername - current user name (or user ID) using to retrieve the user calendar in case modify event of personal calendarvoid removeAllSeriesEvents(CalendarEvent originEvent, String username)
This method is called when:
originEvent - the original event with occurrence rule will be removedusername - current user name (or user ID) using to retrieve the user calendar in case modify event of personal calendarvoid removeFollowingSeriesEvents(CalendarEvent originEvent, CalendarEvent newEvent, String username)
This method is called when:
originEvent - Original event with the old rule have to updatenewEvent - new break will be removedusername - current user name (or user ID) using to retrieve the user calendar in case modify event of personal calendarList<CalendarEvent> getExceptionEventsFromDate(String username, CalendarEvent event, Date fromDate) throws Exception
username - owner of the repetitive eventevent - a repetitive eventfromDate - a date after which we need to find exception eventsExceptionList<CalendarEvent> getExceptionEvents(String username, CalendarEvent recurEvent) throws Exception
username - the owner of this recurrent eventrecurEvent - the original recurrent eventCalendarEvent objectsExceptionvoid removeOccurrenceInstance(String username, CalendarEvent occurrence) throws Exception
username - owner of this occurrence eventoccurrence - the occurrence event object to removeExceptionvoid removeRecurrenceSeries(String username, CalendarEvent originalEvent) throws Exception
username - owner of recurrent event, in case of private or shared calendaroriginalEvent - the original recurrent event objectExceptionvoid updateRecurrenceSeries(String fromCalendar, String toCalendar, String fromType, String toType, CalendarEvent occurrence, String username) throws Exception
fromCalendar - the calendarId of the calendar which the recurrent event belong to before updatingtoCalendar - the new calendarId of the recurrent eventfromType - calendarType of recurrent event before updatingtoType - calendarType of recurrent event after updatingoccurrence - the occurrence contains the new data about recurrence seriesusername - owner of recurrent event, in case of private and shared calendarExceptionMap<Integer,String> searchHighlightRecurrenceEvent(String username, EventQuery eventQuery, String[] publicCalendarIds, String timezone) throws Exception
username - the username of usereventQuery - EventQuery object to limit time-rangepublicCalendarIds - list of public calendartimezone - timezoneExceptionList<Map<Integer,String>> searchHighlightRecurrenceEventSQL(String username, EventQuery eventQuery, String timezone, String[] privateCalendars, String[] publicCalendars) throws Exception
ExceptionList<CalendarEvent> getHighLightOriginalRecurrenceEvents(String username, Calendar from, Calendar to, String[] publicCalendarIds) throws Exception
ExceptionList<CalendarEvent> getHighLightOriginalRecurrenceEventsSQL(String username, Calendar from, Calendar to, EventQuery eventQuery, String[] privateCalendars, String[] publicCalendars, List<String> emptyCalendars) throws Exception
Exceptionvoid shareCalendarByRunJob(String username, String calendarId, List<String> sharedGroups) throws Exception
When a calendar is selected to share with a group, the sharing process will run as job in background to avoid blocking the user. It will send notification for users about starting and finishing the job.
username - Id of current usercalendarId - Id of shared calendarsharedGroups - List of shared groupsExceptionvoid removeSharedCalendarByJob(String username, List<String> unsharedGroups, String calendarId) throws Exception
To avoid letting users wait too long, un-sharing with groups runs as job in background. There are notifications about job starting and finishing
username - Id of current userunsharedGroups - List of un-shared groupscalendarId - Id of shared calendarExceptionCalendarService#shareCalendarByRunJob(String, String, List)}boolean isGroupBeingShared(String group, org.exoplatform.services.scheduler.impl.JobSchedulerServiceImpl schedulerService) throws Exception
group - Id of the group to be checkedschedulerService - The schedule service that manages jobsExceptionCalendarService#shareCalendarByRunJob(String, String, List)}CalendarEvent getEventById(String eventId) throws Exception
eventId - Id of the eventCalendarEventExceptionvoid autoShareCalendar(List<String> groupsOfUser, String receiver) throws Exception
This method is called in NewMembershipListener.postSave(org.exoplatform.services.organization.Membership, boolean).
groupsOfUser - List of group idreceiver - User idExceptionvoid autoRemoveShareCalendar(String groupId, String username) throws Exception
This method is called in NewMembershipListener.preDelete(org.exoplatform.services.organization.Membership).
groupId - username - Exceptionvoid importRemoteCalendarByJob(RemoteCalendar remoteCalendar) throws Exception
Users don't need to wait too long when importing a big calendar
remoteCalendar - ExceptionCollection<CalendarEvent> getAllExcludedEvent(CalendarEvent originEvent, Date from, Date to, String userId)
Collection<CalendarEvent> buildSeries(CalendarEvent originEvent, Date from, Date to, String userId)
CalendarEvent getRepetitiveEvent(CalendarEvent occurence) throws Exception
ExceptionCopyright © 2003–2014 eXo Platform SAS. All rights reserved.