|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CalendarService
Created by The eXo Platform SARL Author : Hung Nguyen Quang hung.nguyen@exoplatform.com Jul 11, 2007
| Field Summary | |
|---|---|
static String |
CALDAV
|
static String |
EXPORTEDCSV
|
static String |
ICALENDAR
|
| Method Summary | |
|---|---|
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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. |
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 |
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 |
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 |
Map<Integer,String> |
searchHightLightEvent(String username,
EventQuery eventQuery,
String[] publicCalendarIds)
Gets the day in month on which there are events. |
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 |
| Field Detail |
|---|
static final String ICALENDAR
static final String EXPORTEDCSV
static final String CALDAV
| Method Detail |
|---|
Calendar getUserCalendar(String username,
String calendarId)
throws Exception
username - current user name(or user id)calendarId - Id of the calendar
ExceptionCalendar
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,
CalendarSetting
void 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 calendar
Exception
Calendar removeUserCalendar(String username,
String calendarId)
throws Exception
username - current user name(or user id)calendarId - given calendar id
Exception
void saveSharedCalendar(String username,
Calendar calendar)
throws Exception
username - current user name(or user id)calendar - Calendar object
Exception
Calendar getGroupCalendar(String calendarId)
throws Exception
calendarId - given calendar id
ExceptionCalendar
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)
ExceptionGroupCalendarData
void 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.
Exception
Calendar removePublicCalendar(String calendarId)
throws Exception
calendarId -
Exception
List<EventCategory> getEventCategories(String username)
throws Exception
username - current user name(or user id)
ExceptionEventCategory
void 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 -
Exception
void removeEventCategory(String username,
String eventCategoryId)
throws Exception
username - current user name(or user id)eventCategoryId - The unique name of category
Exception
EventCategory getEventCategory(String username,
String eventCategoryId)
throws Exception
username - user id of the event category's ownereventCategoryId - Id of the event category
ExceptionEventCategory
EventCategory getEventCategoryByName(String username,
String eventCategoryName)
throws Exception
username - Id of the ownereventCategoryName - The name of the category
ExceptionEventCategory
List<CalendarEvent> getUserEventByCalendar(String username,
List<String> calendarIds)
throws Exception
username - The owner of the calendarcalendarIds - List of calendar id
Exception
List<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 conditions
CalendarEvent object (events and tasks)
ExceptionCalendarEvent,
EventQuery
CalendarEvent getEvent(String username,
String eventId)
throws Exception
username - user id of the event ownereventId - id of the event
Exception
void 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.
Exception
CalendarEvent 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.
Exception
CalendarEvent getGroupEvent(String eventId)
throws Exception
eventId -
CalendarEvent object or null if event was not found
Exception
CalendarEvent getGroupEvent(String calendarId,
String eventId)
throws Exception
calendarId - given group calendar ideventId - given event id
CalendarEvent object
ExceptionCalendarEvent
List<CalendarEvent> getGroupEventByCalendar(List<String> calendarIds)
throws Exception
calendarIds - List of Calendar IDs
CalendarEvent objects
ExceptionCalendarEvent
List<CalendarEvent> getPublicEvents(EventQuery eventQuery)
throws Exception
eventQuery - EventQuery object
ExceptionCalendarEvent,
EventQuery
void 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.
Exception
CalendarEvent removePublicEvent(String calendarId,
String eventId)
throws Exception
calendarId - given calendar ideventId - given event or task id
Exception
void saveCalendarSetting(String username,
CalendarSetting setting)
throws Exception
username - current user name(or user id)setting - CalendarSetting object
ExceptionCalendarSetting
CalendarSetting 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:
ICalendarImportExport CsvImportExport
type - ICS or CSV
CalendarImportExport
String[] getExportImportType()
throws Exception
Now there are 2 types that are supported: ICS and CSV.
ExceptionCalendarImportExport,
RemoteCalendarService
int 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.
username - current user name(or user id)calendars - the RSS feed will contain events and tasks from the calendars given in this paramrssData - object containing basic informations (url, title, description) of the feed
ExceptionRssData
int generateRss(String username,
List<String> calendarIds,
RssData rssData)
throws Exception
username - current user name(or user id)calendarIds - the RSS feed will contain events and tasks from the calendars given in this paramrssData - object containing basic informations (url, title, description) of the feed
ExceptionRssData
List<FeedData> getFeeds(String username)
throws Exception
username - current user name (or user id)
ExceptionFeedData
javax.jcr.Node getRssHome(String username)
throws Exception
username - current user name(or user id)
Exception
EventPageList 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 events
EventPageList object.
ExceptionEventPageList
Map<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 events
Map with key set is the days having events. Ex: {<14,"value">, <15,"value">}
Exception
void 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 calendar
Exception
GroupCalendarData 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 object
ExceptionGroupCalendarData
List<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 events
ExceptionCalendarEvent
void removeSharedCalendar(String username,
String calendarId)
throws Exception
username - current user name(or user id)calendarId - given calendar id
Exception
void removeSharedCalendarFolder(String username)
throws Exception
username - the username
Exception
void 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.
Exception
Map<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 object
ExceptionEventQuery
void removeSharedEvent(String username,
String calendarId,
String eventId)
throws Exception
username - current user name(or user id)calendarId - given calendar ideventId - given event id
Exception
void 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)
Exception
void 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 user
void 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_SURE
Exception
void addListenerPlugin(CalendarUpdateEventListener listener)
throws Exception
Exception
void addEventListenerPlugin(CalendarEventListener listener)
throws Exception
Exception
int getTypeOfCalendar(String userName,
String calendarId)
throws Exception
There a 3 types of calendar:
userName - calendarId -
ExceptionCalendar
List<CalendarEvent> getSharedEventByCalendars(String username,
List<String> calendarIds)
throws Exception
username - current user namecalendarIds - list of shared calendars from which to get events
CalendarEvent object
Exception
CalendarEvent getSharedEvent(String username,
String calendarId,
String eventId)
throws Exception
username - current user namecalendarId - id of shared calendareventId - id of shared event
CalendarEvent object
Exception
void removeFeedData(String username,
String title)
username - user id of the feed ownertitle - The title of the removed feed
ResourceBundle getResourceBundle()
throws Exception
ResourceBundle object
Exception
void initNewUser(String userName,
CalendarSetting defaultCalendarSetting)
throws Exception
userName - User id of the new created userdefaultCalendarSetting - default calendar setting
Exception
void assignGroupTask(String taskId,
String calendarId,
String assignee)
throws Exception
taskId - the assigned taskcalendarId - Id of the task's calendarassignee - User id of the assignee
Exception
void setGroupTaskStatus(String taskId,
String calendarId,
String status)
throws Exception
taskId - Id of the taskcalendarId - Id of the task's calendarstatus -
ExceptionCalendarEvent
boolean isRemoteCalendar(String username,
String calendarId)
throws Exception
username - the owner of calendarcalendarId - the Id of calendar
Exception
boolean 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 authenticate
Exception
Calendar importRemoteCalendar(RemoteCalendar remoteCalendar)
throws Exception
remoteCalendar - object content all properties for remote calendar.
Exception
Calendar refreshRemoteCalendar(String username,
String remoteCalendarId)
throws Exception
username - owner of the calendarremoteCalendarId - Id of the remote calendar to refresh
RemoteCalendar object
Exception
Calendar updateRemoteCalendarInfo(RemoteCalendar remoteCalendar)
throws Exception
remoteCalendar - a RemoteCalendar object.
ExceptionRemoteCalendar
RemoteCalendar getRemoteCalendar(String owner,
String calendarId)
throws Exception
owner - user name of the calendar's ownercalendarId - the Id of calendar
RemoteCalendar object
- Throws:
Exception- See Also:
RemoteCalendar
RemoteCalendarService getRemoteCalendarService()
throws Exception
RemoteCalendarService object
RemoteCalendarService object
Exception
Calendar getRemoteCalendar(String owner,
String remoteUrl,
String remoteType)
throws Exception
owner - user name of the calendar's ownerremoteUrl - URL of the remote calendarremoteType - iCalendar or CalDav
Calendar object
Exception
int getRemoteCalendarCount(String username)
throws Exception
username -
Exception
String 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 event
Exception
String 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 event
Exception
void loadSynchronizeRemoteCalendarJob(String username)
throws Exception
username -
Exception
org.quartz.JobDetail findSynchronizeRemoteCalendarJob(org.exoplatform.services.scheduler.JobSchedulerService schedulerService,
String username)
throws Exception
schedulerService - username -
JobDetail object
Exception
void stopSynchronizeRemoteCalendarJob(String username)
throws Exception
username -
Exception
Map<String,CalendarEvent> getOccurrenceEvents(CalendarEvent recurEvent,
Calendar from,
Calendar to,
String timezone)
throws Exception
recurEvent - the original recurrent eventfrom - the from timeto - the to time
CalendarEvent object, each entry will contains an occurrence event object with recurrence-id as the key
Exception
List<CalendarEvent> getOriginalRecurrenceEvents(String username,
Calendar from,
Calendar to,
String[] publicCalendarIds)
throws Exception
username - the owner of recurrent eventfrom - from timeto - to time
CalendarEvent objects
Exception
void 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)
Exception
List<CalendarEvent> getExceptionEvents(String username,
CalendarEvent recurEvent)
throws Exception
username - the owner of this recurrent eventrecurEvent - the original recurrent event
CalendarEvent objects
Exception
void removeOccurrenceInstance(String username,
CalendarEvent occurrence)
throws Exception
username - owner of this occurrence eventoccurrence - the occurrence event object to remove
Exception
void removeRecurrenceSeries(String username,
CalendarEvent originalEvent)
throws Exception
username - owner of recurrent event, in case of private or shared calendaroriginalEvent - the original recurrent event object
Exception
void 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 calendar
Exception
Map<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 - timezone
Exception
void 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 groups
Exception
void 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 calendar
ExceptionCalendarService#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 jobs
ExceptionCalendarService#shareCalendarByRunJob(String, String, List)}
CalendarEvent getEventById(String eventId)
throws Exception
eventId - Id of the event
CalendarEvent
Exception
Calendar getCalendarById(String calId)
throws Exception
calId - Id of the calendar
Calendar
Exception
void 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 id
Exception
void autoRemoveShareCalendar(String groupId,
String username)
throws Exception
This method is called in NewMembershipListener.preDelete(org.exoplatform.services.organization.Membership).
groupId - username -
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||