public class CalendarServiceImpl extends Object implements CalendarService, org.picocontainer.Startable
| Modifier and Type | Field and Description |
|---|---|
String |
defaultCalendarId |
String |
defaultCalendarName |
String[] |
defaultEventCategoryIds |
String[] |
defaultEventCategoryNames |
protected List<CalendarEventListener> |
eventListeners_ |
protected List<CalendarUpdateEventListener> |
listeners_ |
protected JCRDataStorage |
storage_ |
ADDRESSESGROUP, ADDRESSESGROUPNAME, CALDAV, COMA, DEFAULT_CALENDAR_ID, DEFAULT_CALENDAR_NAME, DEFAULT_EVENT_CATEGORY_IDS, DEFAULT_EVENTCATEGORY_ID_ALL, DEFAULT_EVENTCATEGORY_ID_ANNIVERSARY, DEFAULT_EVENTCATEGORY_ID_CALLS, DEFAULT_EVENTCATEGORY_ID_CLIENTS, DEFAULT_EVENTCATEGORY_ID_HOLIDAY, DEFAULT_EVENTCATEGORY_ID_MEETING, DEFAULT_EVENTCATEGORY_NAME_ALL, DEFAULT_EVENTCATEGORY_NAME_ANNIVERSARY, DEFAULT_EVENTCATEGORY_NAME_CALLS, DEFAULT_EVENTCATEGORY_NAME_CLIENTS, DEFAULT_EVENTCATEGORY_NAME_HOLIDAY, DEFAULT_EVENTCATEGORY_NAME_MEETING, DEFAULTGROUP, DEFAULTGROUPDES, DEFAULTGROUPNAME, EVENT_CATEGORIES, EXPORTEDCSV, ICALENDAR, PERSISTED_TIMEZONE, ST_BASE_URL, ST_DATE_FORMAT, ST_LOCALE, ST_TIME_BEGIN, ST_TIME_END, ST_TIME_FORMAT, ST_TIME_INTEVAL, ST_TIMEZONE, ST_VIEW_TYPE, ST_WEEK_START, ST_WORKINGTIME| Constructor and Description |
|---|
CalendarServiceImpl(org.exoplatform.container.xml.InitParams params,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
org.exoplatform.services.jcr.RepositoryService reposervice,
org.exoplatform.services.resources.ResourceBundleService rbs,
org.exoplatform.services.cache.CacheService cservice,
org.exoplatform.services.organization.OrganizationService organizationService) |
| 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)
Confirms invitation to participate in an event
|
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
|
CalendarCollection<Calendar> |
getAllCalendars(String username,
int calType,
int offset,
int limit)
Return all calendar of given user
|
Collection<CalendarEvent> |
getAllExcludedEvent(CalendarEvent originEvent,
Date from,
Date to,
String userId)
Those methods are not used anywhere
|
List<CalendarEvent> |
getAllNoRepeatEvents(String username,
EventQuery eventQuery,
String[] publicCalendarIds)
We do not use this method anymore, so i mark this method as deprecated
to notify other team do not use this method any more and we do not need to maintain this method.
|
List<CalendarEvent> |
getAllNoRepeatEventsSQL(String username,
EventQuery eventQuery,
String[] privateCalendars,
String[] publicCalendars,
List<String> emptyCalendars)
A faster version of getAllNoRepeatEvents without thread
|
Attachment |
getAttachmentById(String attId)
Get specified attachment object by given attachment id
|
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)
This method is deprecated, use
ExtendedCalendarService.getCalendarHandler() and CalendarHandler.getCalendarById(String)
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
|
JCRDataStorage |
getDataStorage() |
String |
getDefaultCalendarId() |
String |
getDefaultCalendarName() |
String[] |
getDefaultEventCategoryIds() |
String[] |
getDefaultEventCategoryNames() |
CalendarEvent |
getEvent(String username,
String eventId)
Gets event/task by its id and its owner
|
CalendarEvent |
getEventById(String eventId)
Deprecated, use
EventHandler.getEventById(String)
Gets event by its Id |
List<EventCategory> |
getEventCategories(String username)
Gets all event categories of an user
|
CalendarCollection<EventCategory> |
getEventCategories(String username,
int offset,
int limit) |
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
|
EventDAO |
getEventDAO() |
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)
Deprecated, use
CalendarHandler.getCalendarById(String)
Gets a group/public calendar by its Id |
List<GroupCalendarData> |
getGroupCalendars(String[] groupIds,
boolean isShowAll,
String username)
Deprecated, use
CalendarHandler.findCalendars(CalendarQuery)
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)
We do not use this method anymore, so i mark this method as deprecated
to notify other team do not use this method any more and we do not need to maintain this method.
|
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
|
org.exoplatform.commons.utils.ListAccess<Calendar> |
getPublicCalendars()
Return calendars that have publicUrl enabled
|
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)
This method is deprecated, use
CalendarHandler.getCalendarById(String)
Gets the given user's private calendar, identified by its ID. |
List<Calendar> |
getUserCalendars(String username,
boolean isShowAll)
Deprecated, use
CalendarHandler.findCalendars(CalendarQuery)
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
|
boolean |
hasCalendarSetting(String username)
Test whether user has calendar settings or not
|
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 personal data and default settings.
|
void |
initUserDefaultSettings(org.exoplatform.container.xml.InitParams params) |
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 fromType,
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 |
removeAttachmentById(String attId) |
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 selectedOccurrence,
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 removedOccurence,
String username)
Remove an occurrence of a recurrent event
|
Calendar |
removePublicCalendar(String calendarId)
Deprecated, use
CalendarHandler.removeCalendar(String)
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)
Deprecated, use
CalendarHandler.removeCalendar(String)
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
|
Calendar |
saveCalendar(String username,
Calendar calendar,
int caltype,
boolean isNew)
Deprecated, use
CalendarHandler.saveCalendar(org.exoplatform.calendar.model.Calendar)
Saves an calendar to storage with given type |
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 |
saveEventCategory(String username,
EventCategory eventCategory,
String[] values,
boolean isNew) |
void |
saveEventToSharedCalendar(String username,
String calendarId,
CalendarEvent event,
boolean isNew)
Saves event to shared calendar.
|
void |
saveFollowingSeriesEvents(CalendarEvent originEvent,
CalendarEvent selectedOccurrence,
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 selectedOccurrence,
String username)
Updates an occurrence of a recurrent event
|
void |
savePublicCalendar(Calendar calendar,
boolean isNew)
Deprecated, use
CalendarHandler.saveCalendar(org.exoplatform.calendar.model.Calendar)
Saves a calendar to public area (group calendar) |
void |
savePublicEvent(String calendarId,
CalendarEvent event,
boolean isNew)
Deprecated.
|
void |
savePublicEvent(String username,
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)
Deprecated, use
CalendarHandler.saveCalendar(org.exoplatform.calendar.model.Calendar)
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 query,
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)
We do not use this method anymore, so i mark this method as deprecated
to notify other team do not use this method any more and we do not need to maintain this method.
|
List<Map<Integer,String>> |
searchHightLightEventSQL(String username,
EventQuery eventQuery,
String[] privateCalendars,
String[] publicCalendars) |
void |
setCalDavResourceEtag(String username,
String calendarId,
String eventId,
String etag) |
void |
setCalDavResourceHref(String username,
String calendarId,
String eventId,
String href) |
void |
setGroupTaskStatus(String taskId,
String calendarId,
String status)
Sets status for a group task.
|
void |
shareCalendar(String username,
String calendarId,
List<String> receiverUsers)
Shares the private calendar to other users
|
void |
shareCalendarByRunJob(String username,
String calendarId,
List<String> sharedGroups)
Shares Calendar with groups
|
void |
start() |
void |
stop() |
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
|
public String[] defaultEventCategoryIds
public String[] defaultEventCategoryNames
public String defaultCalendarId
public String defaultCalendarName
protected List<CalendarUpdateEventListener> listeners_
protected List<CalendarEventListener> eventListeners_
protected JCRDataStorage storage_
public CalendarServiceImpl(org.exoplatform.container.xml.InitParams params,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
org.exoplatform.services.jcr.RepositoryService reposervice,
org.exoplatform.services.resources.ResourceBundleService rbs,
org.exoplatform.services.cache.CacheService cservice,
org.exoplatform.services.organization.OrganizationService organizationService)
throws Exception
Exceptionpublic Calendar getCalendarById(String calId) throws Exception
CalendarServiceExtendedCalendarService.getCalendarHandler() and CalendarHandler.getCalendarById(String)
getCalendarById in interface CalendarServicecalId - Id of the calendarCalendarExceptionpublic CalendarCollection<Calendar> getAllCalendars(String username, int calType, int offset, int limit)
CalendarServicegetAllCalendars in interface CalendarServiceusername - current user idcalType - type of calendar to filteroffset - offset to continue to return datalimit - limit item will be returnedpublic Calendar getUserCalendar(String username, String calendarId) throws Exception
CalendarHandler.getCalendarById(String)
getUserCalendar in interface CalendarServiceusername - current user name(or user id)calendarId - Id of the calendarExceptionCalendarpublic List<Calendar> getUserCalendars(String username, boolean isShowAll) throws Exception
CalendarHandler.findCalendars(CalendarQuery)
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
getUserCalendars in interface CalendarServiceusername - current user name(or user id)isShowAll - If true, returns all private calendars. If false, returns ExceptionCalendar,
CalendarSettingpublic org.exoplatform.commons.utils.ListAccess<Calendar> getPublicCalendars() throws Exception
CalendarServicegetPublicCalendars in interface CalendarServiceExceptionpublic void saveUserCalendar(String username, Calendar calendar, boolean isNew)
CalendarHandler.saveCalendar(org.exoplatform.calendar.model.Calendar)
saveUserCalendar in interface CalendarServiceusername - 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 calendarpublic Calendar saveCalendar(String username, Calendar calendar, int caltype, boolean isNew)
CalendarServiceCalendarHandler.saveCalendar(org.exoplatform.calendar.model.Calendar)
Saves an calendar to storage with given typesaveCalendar in interface CalendarServiceusername - current user name(or user id)calendar - Calendar object that will be storedcaltype - the type of calendarisNew - Boolean value to know adding a new calendar or just updating this calendarpublic Calendar removeUserCalendar(String username, String calendarId) throws Exception
CalendarHandler.removeCalendar(String)
removeUserCalendar in interface CalendarServiceusername - current user name(or user id)calendarId - given calendar idExceptionpublic Calendar getGroupCalendar(String calendarId) throws Exception
CalendarHandler.getCalendarById(String)
getGroupCalendar in interface CalendarServicecalendarId - given calendar idExceptionCalendarpublic List<GroupCalendarData> getGroupCalendars(String[] groupIds, boolean isShowAll, String username) throws Exception
CalendarHandler.findCalendars(CalendarQuery)
The GroupCalendarData contains information about list of calendars with the
group that those calendars belong to.
getGroupCalendars in interface CalendarServicegroupIds - 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)ExceptionGroupCalendarDatapublic void savePublicCalendar(Calendar calendar, boolean isNew)
CalendarHandler.saveCalendar(org.exoplatform.calendar.model.Calendar)
savePublicCalendar in interface CalendarServicecalendar - Calendar to be savedisNew - If true, a new calendar will be saved. If false, an existing calendar will be updated.public Calendar removePublicCalendar(String calendarId) throws Exception
CalendarHandler.removeCalendar(String)
Removes the group calendar form data base, every events, tasks inside this calendar will be removed tooremovePublicCalendar in interface CalendarServiceExceptionpublic boolean isRemoteCalendar(String username, String calendarId) throws Exception
isRemoteCalendar in interface CalendarServiceusername - the owner of calendarcalendarId - the Id of calendarExceptionpublic int getTypeOfCalendar(String userName, String calendarId) throws Exception
CalendarService There a 3 types of calendar:
getTypeOfCalendar in interface CalendarServiceExceptionCalendarpublic void autoShareCalendar(List<String> groupsOfUser, String receiver) throws Exception
This method is called in NewMembershipListener.postSave(org.exoplatform.services.organization.Membership, boolean).
autoShareCalendar in interface CalendarServicegroupsOfUser - List of group idreceiver - User idExceptionpublic void autoRemoveShareCalendar(String groupId, String username) throws Exception
This method is called in NewMembershipListener.preDelete(org.exoplatform.services.organization.Membership).
autoRemoveShareCalendar in interface CalendarServiceExceptionpublic 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.
shareCalendarByRunJob in interface CalendarServiceusername - Id of current usercalendarId - Id of shared calendarsharedGroups - List of shared groupsExceptionpublic 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
removeSharedCalendarByJob in interface CalendarServiceusername - Id of current userunsharedGroups - List of un-shared groupscalendarId - Id of shared calendarExceptionCalendarService.shareCalendarByRunJob(String, String, List)public void removeSharedCalendar(String username, String calendarId) throws Exception
removeSharedCalendar in interface CalendarServiceusername - current user name(or user id)calendarId - given calendar idExceptionpublic void removeSharedCalendarFolder(String username) throws Exception
CalendarServiceremoveSharedCalendarFolder in interface CalendarServiceusername - the usernameExceptionpublic boolean isGroupBeingShared(String group, org.exoplatform.services.scheduler.impl.JobSchedulerServiceImpl schedulerService_) throws Exception
CalendarServiceisGroupBeingShared in interface CalendarServicegroup - Id of the group to be checkedschedulerService_ - The schedule service that manages jobsExceptionCalendarService.shareCalendarByRunJob(String, String, List)public void saveSharedCalendar(String username, Calendar calendar) throws Exception
saveSharedCalendar in interface CalendarServiceusername - current user name(or user id)calendar - Calendar objectExceptionpublic void shareCalendar(String username, String calendarId, List<String> receiverUsers) throws Exception
shareCalendar in interface CalendarServiceusername - current user name(or user id)calendarId - Id of the shared calendarreceiverUsers - list of users with whom to share this calendarExceptionpublic GroupCalendarData getSharedCalendars(String username, boolean isShowAll) throws Exception
getSharedCalendars in interface CalendarServiceusername - 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 objectExceptionGroupCalendarDatapublic CalendarEvent getEventById(String eventId) throws Exception
CalendarServiceEventHandler.getEventById(String)
Gets event by its IdgetEventById in interface CalendarServiceeventId - Id of the eventCalendarEventExceptionpublic CalendarEvent getEvent(String username, String eventId) throws Exception
CalendarServicegetEvent in interface CalendarServiceusername - user id of the event ownereventId - id of the eventExceptionpublic 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.
getEvents in interface CalendarServiceusername - current user name(or user id)eventQuery - EventQuery objectpublicCalendarIds - Optional array of public calendar IDs of which to get eventsExceptionCalendarEventpublic EventPageList searchEvent(String username, EventQuery query, String[] publicCalendarIds) throws Exception
EventPageList of events/tasks of a given list of public calendars that matches the condition EvenQuery object.searchEvent in interface CalendarServiceusername - current user name(or user id)query - EventQuery objectpublicCalendarIds - Array of public calendar IDs in which to search eventsEventPageList object.ExceptionEventPageListpublic List<CalendarEvent> getUserEventByCalendar(String username, List<String> calendarIds) throws Exception
getUserEventByCalendar in interface CalendarServiceusername - The owner of the calendarcalendarIds - List of calendar idExceptionpublic 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()getUserEvents in interface CalendarServiceusername - current user name(or user id)eventQuery - EventQuery object containing the conditionsCalendarEvent object (events and tasks)ExceptionCalendarEvent,
EventQuerypublic void saveUserEvent(String username, String calendarId, CalendarEvent event, boolean isNew) throws Exception
saveUserEvent in interface CalendarServiceusername - 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.Exceptionpublic CalendarEvent removeUserEvent(String username, String calendarId, String eventId) throws Exception
All attachments and reminders will be removed
removeUserEvent in interface CalendarServiceusername - 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.Exceptionpublic CalendarEvent getGroupEvent(String eventId) throws Exception
getGroupEvent in interface CalendarServiceCalendarEvent object or null if event was not foundExceptionpublic CalendarEvent getGroupEvent(String calendarId, String eventId) throws Exception
getGroupEvent in interface CalendarServicecalendarId - given group calendar ideventId - given event idCalendarEvent objectExceptionCalendarEventpublic List<CalendarEvent> getGroupEventByCalendar(List<String> calendarIds) throws Exception
getGroupEventByCalendar in interface CalendarServicecalendarIds - List of Calendar IDsCalendarEvent objectsExceptionCalendarEventpublic List<CalendarEvent> getPublicEvents(EventQuery eventQuery) throws Exception
getPublicEvents in interface CalendarServiceeventQuery - EventQuery objectExceptionCalendarEvent,
EventQuerypublic void savePublicEvent(String calendarId, CalendarEvent event, boolean isNew) throws Exception
savePublicEvent in interface CalendarServicecalendarId - 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.Exceptionpublic void savePublicEvent(String username, String calendarId, CalendarEvent event, boolean isNew) throws Exception
savePublicEvent in interface CalendarServiceusername - The user who's saving the eventcalendarId - 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.Exceptionpublic CalendarEvent removePublicEvent(String calendarId, String eventId) throws Exception
removePublicEvent in interface CalendarServicecalendarId - given calendar ideventId - given event or task idExceptionpublic CalendarEvent getRepetitiveEvent(CalendarEvent occurence) throws Exception
getRepetitiveEvent in interface CalendarServiceExceptionpublic void saveEventToSharedCalendar(String username, String calendarId, CalendarEvent event, boolean isNew) throws Exception
saveEventToSharedCalendar in interface CalendarServiceusername - 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.Exceptionpublic void assignGroupTask(String taskId, String calendarId, String assignee) throws Exception
CalendarServiceassignGroupTask in interface CalendarServicetaskId - the assigned taskcalendarId - Id of the task's calendarassignee - User id of the assigneeExceptionpublic void setGroupTaskStatus(String taskId, String calendarId, String status) throws Exception
CalendarServicesetGroupTaskStatus in interface CalendarServicetaskId - Id of the taskcalendarId - Id of the task's calendarExceptionCalendarEventpublic void removeSharedEvent(String username, String calendarId, String eventId) throws Exception
removeSharedEvent in interface CalendarServiceusername - current user name(or user id)calendarId - given calendar ideventId - given event idExceptionpublic List<CalendarEvent> getSharedEventByCalendars(String username, List<String> calendarIds) throws Exception
CalendarServicegetSharedEventByCalendars in interface CalendarServiceusername - current user namecalendarIds - list of shared calendars from which to get eventsCalendarEvent objectExceptionpublic CalendarEvent getSharedEvent(String username, String calendarId, String eventId) throws Exception
CalendarServicegetSharedEvent in interface CalendarServiceusername - current user namecalendarId - id of shared calendareventId - id of shared eventCalendarEvent objectExceptionpublic EventDAO getEventDAO()
getEventDAO in interface CalendarServicepublic Collection<CalendarEvent> getAllExcludedEvent(CalendarEvent originEvent, Date from, Date to, String userId)
CalendarServicegetAllExcludedEvent in interface CalendarServicepublic Collection<CalendarEvent> buildSeries(CalendarEvent originEvent, Date from, Date to, String userId)
buildSeries in interface CalendarServicepublic String buildRecurrenceId(Date formTime, String username)
buildRecurrenceId in interface CalendarServicepublic List<EventCategory> getEventCategories(String username) throws Exception
getEventCategories in interface CalendarServiceusername - current user name(or user id)ExceptionEventCategorypublic CalendarCollection<EventCategory> getEventCategories(String username, int offset, int limit) throws Exception
getEventCategories in interface CalendarServiceExceptionpublic void saveEventCategory(String username, EventCategory eventCategory, boolean isNew) throws Exception
Every users have their own categories of events. The name of category is unique.
saveEventCategory in interface CalendarServiceusername - current user name(or user id)Exceptionpublic void saveEventCategory(String username, EventCategory eventCategory, String[] values, boolean isNew) throws Exception
Exceptionpublic void removeEventCategory(String username, String eventCategoryId) throws Exception
removeEventCategory in interface CalendarServiceusername - current user name(or user id)eventCategoryId - The unique name of categoryExceptionpublic CalendarImportExport getCalendarImportExports(String type)
There are 2 classes that implements the interface CalendarImportExport:
getCalendarImportExports in interface CalendarServicetype - ICS or CSVCalendarImportExportpublic String[] getExportImportType() throws Exception
Now there are 2 types that are supported: ICS and CSV.
getExportImportType in interface CalendarServiceExceptionCalendarImportExport,
RemoteCalendarServicepublic void saveCalendarSetting(String username, CalendarSetting setting) throws Exception
saveCalendarSetting in interface CalendarServiceusername - current user name(or user id)setting - CalendarSetting objectExceptionCalendarSettingpublic CalendarSetting getCalendarSetting(String username) throws Exception
getCalendarSetting in interface CalendarServiceusername - current user name(or user id)ExceptionCalendarSettingpublic boolean hasCalendarSetting(String username) throws Exception
hasCalendarSetting in interface CalendarServiceExceptionpublic 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.
generateRss in interface CalendarServiceusername - 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 feedExceptionRssDatapublic List<FeedData> getFeeds(String username) throws Exception
getFeeds in interface CalendarServiceusername - current user name (or user id)ExceptionFeedDatapublic javax.jcr.Node getRssHome(String username) throws Exception
getRssHome in interface CalendarServiceusername - current user name(or user id)Exceptionpublic EventCategory getEventCategory(String username, String eventCategoryId) throws Exception
getEventCategory in interface CalendarServiceusername - user id of the event category's ownereventCategoryId - Id of the event categoryExceptionEventCategorypublic Map<Integer,String> searchHightLightEvent(String username, EventQuery eventQuery, String[] publicCalendarIds) throws Exception
CalendarService.searchHightLightEventSQL(String username, EventQuery eventQuery, String[] privateCalendars, String[] publicCalendars)
Gets the day in month on which there are events.
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".
searchHightLightEvent in interface CalendarServiceusername - 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">}Exceptionpublic List<Map<Integer,String>> searchHightLightEventSQL(String username, EventQuery eventQuery, String[] privateCalendars, String[] publicCalendars) throws Exception
searchHightLightEventSQL in interface CalendarServiceExceptionpublic List<CalendarEvent> getAllNoRepeatEvents(String username, EventQuery eventQuery, String[] publicCalendarIds) throws Exception
CalendarServiceCalendarService.getAllNoRepeatEvents(String, EventQuery, String[])
A faster version of getEvents used for UIWeekviewgetAllNoRepeatEvents in interface CalendarServiceExceptionpublic List<CalendarEvent> getAllNoRepeatEventsSQL(String username, EventQuery eventQuery, String[] privateCalendars, String[] publicCalendars, List<String> emptyCalendars) throws Exception
getAllNoRepeatEventsSQL in interface CalendarServiceExceptionpublic 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<String,String> with the key is user name of participants
and the value is pairs of {fromtime, totime} in milliseconds , separated by ','.
checkFreeBusy in interface CalendarServiceeventQuery - EventQuery objectMap<String,String> with the key is user name and value isExceptionEventQuerypublic void moveEvent(String fromCalendar, String toCalendar, String fromType, String toType, List<CalendarEvent> calEvents, String username) throws Exception
This method can be used in 2 cases:
moveEvent in interface CalendarServicefromCalendar - Id of the source calendartoCalendar - Id of the destination calendarfromType - 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)Exceptionpublic 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
confirmInvitation in interface CalendarServicefromUserId - 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 userpublic void confirmInvitation(String fromUserId, String confirmingEmail, String confirmingUser, int calType, String calendarId, String eventId, int answer) throws Exception
confirmInvitation in interface CalendarServicefromUserId - 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_SUREExceptionpublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic void addListenerPlugin(CalendarUpdateEventListener listener) throws Exception
addListenerPlugin in interface CalendarServiceExceptionpublic int generateRss(String username, List<String> calendarIds, RssData rssData) throws Exception
CalendarServicegenerateRss in interface CalendarServiceusername - 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 feedExceptionRssDatapublic ResourceBundle getResourceBundle() throws Exception
CalendarServicegetResourceBundle in interface CalendarServiceResourceBundle objectExceptionpublic EventCategory getEventCategoryByName(String username, String eventCategoryName) throws Exception
CalendarServicegetEventCategoryByName in interface CalendarServiceusername - Id of the ownereventCategoryName - The name of the categoryExceptionEventCategorypublic void removeFeedData(String username, String title)
CalendarServiceremoveFeedData in interface CalendarServiceusername - user id of the feed ownertitle - The title of the removed feedpublic void initNewUser(String username, CalendarSetting defaultCalendarSetting_) throws Exception
initNewUser in interface CalendarServiceusername - User id of the new created userdefaultCalendarSetting_ - default calendar settingExceptionpublic void addEventListenerPlugin(CalendarEventListener listener) throws Exception
addEventListenerPlugin in interface CalendarServiceExceptionpublic boolean isValidRemoteUrl(String url, String type, String remoteUser, String remotePassword) throws Exception
isValidRemoteUrl in interface CalendarServiceurl - the remote URLtype - the type of remote calendar, iCalendar or CalDavremoteUser - the remote user name used to authenticateremotePassword - the remote password used to authenticateExceptionpublic Calendar updateRemoteCalendarInfo(RemoteCalendar remoteCalendar) throws Exception
updateRemoteCalendarInfo in interface CalendarServiceremoteCalendar - a RemoteCalendar object.ExceptionRemoteCalendarpublic Calendar refreshRemoteCalendar(String username, String remoteCalendarId) throws Exception
refreshRemoteCalendar in interface CalendarServiceusername - owner of the calendarremoteCalendarId - Id of the remote calendar to refreshRemoteCalendar objectExceptionpublic Calendar importRemoteCalendar(RemoteCalendar remoteCalendar) throws Exception
importRemoteCalendar in interface CalendarServiceremoteCalendar - object content all properties for remote calendar.Exceptionpublic RemoteCalendar getRemoteCalendar(String owner, String calendarId) throws Exception
getRemoteCalendar in interface CalendarServiceowner - user name of the calendar's ownercalendarId - the Id of calendarRemoteCalendar objectExceptionRemoteCalendarpublic RemoteCalendarService getRemoteCalendarService() throws Exception
RemoteCalendarService objectgetRemoteCalendarService in interface CalendarServiceRemoteCalendarService objectExceptionpublic Calendar getRemoteCalendar(String owner, String remoteUrl, String remoteType) throws Exception
CalendarServicegetRemoteCalendar in interface CalendarServiceowner - user name of the calendar's ownerremoteUrl - URL of the remote calendarremoteType - iCalendar or CalDavCalendar objectExceptionpublic String getCalDavResourceHref(String username, String calendarId, String eventId) throws Exception
CalendarService 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.
getCalDavResourceHref in interface CalendarServiceusername - current user name (or user ID)calendarId - the subscribed calendar's IDeventId - Id of the local eventExceptionpublic String getCalDavResourceEtag(String username, String calendarId, String eventId) throws Exception
CalendarService 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.
getCalDavResourceEtag in interface CalendarServiceusername - current user name (or user ID)calendarId - ID of the subscribed calendareventId - Id of the local eventExceptionpublic void setCalDavResourceHref(String username, String calendarId, String eventId, String href) throws Exception
Exceptionpublic void setCalDavResourceEtag(String username, String calendarId, String eventId, String etag) throws Exception
Exceptionpublic void loadSynchronizeRemoteCalendarJob(String username) throws Exception
CalendarServiceloadSynchronizeRemoteCalendarJob in interface CalendarServiceExceptionpublic void stopSynchronizeRemoteCalendarJob(String username) throws Exception
CalendarServicestopSynchronizeRemoteCalendarJob in interface CalendarServiceExceptionpublic org.quartz.JobDetail findSynchronizeRemoteCalendarJob(org.exoplatform.services.scheduler.JobSchedulerService schedulerService,
String username)
throws Exception
CalendarServicefindSynchronizeRemoteCalendarJob in interface CalendarServiceJobDetail objectExceptionpublic int getRemoteCalendarCount(String username) throws Exception
CalendarServicegetRemoteCalendarCount in interface CalendarServiceExceptionpublic Map<String,CalendarEvent> getOccurrenceEvents(CalendarEvent recurEvent, Calendar from, Calendar to, String timezone) throws Exception
CalendarServicegetOccurrenceEvents in interface CalendarServicerecurEvent - the original recurrent eventfrom - the from timeto - the to timeCalendarEvent object, each entry will contains an occurrence event object with recurrence-id as the keyExceptionpublic void updateOccurrenceEvent(String fromCalendar, String toCalendar, String fromType, String toType, List<CalendarEvent> calEvents, String username) throws Exception
CalendarServiceThis method is called when:
updateOccurrenceEvent in interface CalendarServicefromCalendar - 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)Exceptionpublic List<CalendarEvent> getOriginalRecurrenceEvents(String username, Calendar from, Calendar to, String[] publicCalendarIds) throws Exception
CalendarServicegetOriginalRecurrenceEvents in interface CalendarServiceusername - the owner of recurrent eventfrom - from timeto - to timeCalendarEvent objectsExceptionpublic List<CalendarEvent> getExceptionEvents(String username, CalendarEvent recurEvent) throws Exception
CalendarServicegetExceptionEvents in interface CalendarServiceusername - the owner of this recurrent eventrecurEvent - the original recurrent eventCalendarEvent objectsExceptionpublic void removeRecurrenceSeries(String username, CalendarEvent originalEvent) throws Exception
CalendarServiceremoveRecurrenceSeries in interface CalendarServiceusername - owner of recurrent event, in case of private or shared calendaroriginalEvent - the original recurrent event objectExceptionpublic void updateRecurrenceSeries(String fromCalendar, String toCalendar, String fromType, String toType, CalendarEvent occurrence, String username) throws Exception
CalendarServiceupdateRecurrenceSeries in interface CalendarServicefromCalendar - 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 calendarExceptionpublic void removeOccurrenceInstance(String username, CalendarEvent occurrence) throws Exception
CalendarServiceremoveOccurrenceInstance in interface CalendarServiceusername - owner of this occurrence eventoccurrence - the occurrence event object to removeExceptionpublic Map<Integer,String> searchHighlightRecurrenceEvent(String username, EventQuery eventQuery, String[] publicCalendarIds, String timezone) throws Exception
CalendarServicesearchHighlightRecurrenceEvent in interface CalendarServiceusername - the username of usereventQuery - EventQuery object to limit time-rangepublicCalendarIds - list of public calendartimezone - timezoneExceptionpublic List<Map<Integer,String>> searchHighlightRecurrenceEventSQL(String username, EventQuery eventQuery, String timezone, String[] privateCalendars, String[] publicCalendars) throws Exception
searchHighlightRecurrenceEventSQL in interface CalendarServiceExceptionpublic List<CalendarEvent> getHighLightOriginalRecurrenceEvents(String username, Calendar from, Calendar to, String[] publicCalendarIds) throws Exception
CalendarServiceCalendarService.getHighLightOriginalRecurrenceEventsSQL(String, java.util.Calendar, java.util.Calendar, EventQuery, String[], String[], List)getHighLightOriginalRecurrenceEvents in interface CalendarServiceExceptionpublic List<CalendarEvent> getHighLightOriginalRecurrenceEventsSQL(String username, Calendar from, Calendar to, EventQuery eventQuery, String[] privateCalendars, String[] publicCalendars, List<String> emptyCalendars) throws Exception
getHighLightOriginalRecurrenceEventsSQL in interface CalendarServiceExceptionpublic void importRemoteCalendarByJob(RemoteCalendar remoteCalendar) throws Exception
CalendarServiceUsers don't need to wait too long when importing a big calendar
importRemoteCalendarByJob in interface CalendarServiceExceptionpublic void saveOneOccurrenceEvent(CalendarEvent originEvent, CalendarEvent selectedOccurrence, String username)
CalendarServiceThis method is called when:
saveOneOccurrenceEvent in interface CalendarServiceoriginEvent - the original event with occurrence rule will be updatedselectedOccurrence - 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 calendarpublic void saveAllSeriesEvents(CalendarEvent occurrence, String username)
CalendarServiceThis method is called when:
saveAllSeriesEvents in interface CalendarServiceoccurrence - the original event with occurrence ruleusername - current user name (or user ID) using to retrieve the user calendar in case modify event of personal calendarpublic void saveFollowingSeriesEvents(CalendarEvent originEvent, CalendarEvent selectedOccurrence, String username)
CalendarServiceThis method is called when:
saveFollowingSeriesEvents in interface CalendarServiceoriginEvent - Original event with the old rule have to updateselectedOccurrence - new break event with new ruleusername - current user name (or user ID) using to retrieve the user calendar in case modify event of personal calendarpublic void removeOneOccurrenceEvent(CalendarEvent originEvent, CalendarEvent removedOccurence, String username)
CalendarServiceThis method is called when:
removeOneOccurrenceEvent in interface CalendarServiceoriginEvent - the original event with occurrence rule will be updatedremovedOccurence - the occurrence selected to be removedusername - current user name (or user ID) using to retrieve the user calendar in case modify event of personal calendarpublic void removeAllSeriesEvents(CalendarEvent originEvent, String username)
CalendarServiceThis method is called when:
removeAllSeriesEvents in interface CalendarServiceoriginEvent - 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 calendarpublic void removeFollowingSeriesEvents(CalendarEvent originEvent, CalendarEvent selectedOccurrence, String username)
CalendarServiceThis method is called when:
removeFollowingSeriesEvents in interface CalendarServiceoriginEvent - Original event with the old rule have to updateselectedOccurrence - new break will be removedusername - current user name (or user ID) using to retrieve the user calendar in case modify event of personal calendarpublic List<CalendarEvent> getExceptionEventsFromDate(String username, CalendarEvent event, Date fromDate) throws Exception
CalendarServicegetExceptionEventsFromDate in interface CalendarServiceusername - owner of the repetitive eventevent - a repetitive eventfromDate - a date after which we need to find exception eventsExceptionpublic String[] getDefaultEventCategoryIds()
getDefaultEventCategoryIds in interface CalendarServicepublic String[] getDefaultEventCategoryNames()
getDefaultEventCategoryNames in interface CalendarServicepublic String getDefaultCalendarId()
getDefaultCalendarId in interface CalendarServicepublic String getDefaultCalendarName()
getDefaultCalendarName in interface CalendarServicepublic Attachment getAttachmentById(String attId)
CalendarServicegetAttachmentById in interface CalendarServiceattId - given attachment id ( now we store this by using node path)public void removeAttachmentById(String attId)
removeAttachmentById in interface CalendarServicepublic JCRDataStorage getDataStorage()
public void initUserDefaultSettings(org.exoplatform.container.xml.InitParams params)
Copyright © 2003–2021 eXo Platform SAS. All rights reserved.