public interface CalendarService
| 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)
Deprecated.
This method currently does not work properly. User
generateRss(String username, LinkedHashMap<String, Calendar> calendars, RssData rssData) to instead of. |
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)
Deprecated.
|
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)
Deprecated.
|
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
|
default String |
getDefaultCalendarId() |
default String |
getDefaultCalendarName() |
default String[] |
getDefaultEventCategoryIds() |
default String[] |
getDefaultEventCategoryNames() |
CalendarEvent |
getEvent(String username,
String eventId)
Gets event/task by its id and its owner
|
CalendarEvent |
getEventById(String eventId)
Deprecated.
|
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.
|
List<GroupCalendarData> |
getGroupCalendars(String[] groupIds,
boolean isShowAll,
String username)
Deprecated.
|
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)
Deprecated.
|
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)
Deprecated.
use getHighLightOriginalRecurrenceEventsSQL instead
|
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)
Deprecated.
|
List<Calendar> |
getUserCalendars(String username,
boolean isShowAll)
Deprecated.
|
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
|
default 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 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 |
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 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)
Deprecated.
use removeOneOccurrenceEvent instead
|
void |
removeOneOccurrenceEvent(CalendarEvent originEvent,
CalendarEvent removedOccurrence,
String username)
Remove an occurrence of a recurrent event
|
Calendar |
removePublicCalendar(String calendarId)
Deprecated.
|
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.
|
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.
|
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)
Deprecated.
|
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)
Deprecated.
|
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)
Deprecated.
use searchHighlightRecurrenceEventSQL instead
|
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)
Deprecated.
|
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 EVENT_CATEGORIES
static final String COMA
static final String DEFAULTGROUP
static final String ADDRESSESGROUP
static final String ADDRESSESGROUPNAME
static final String DEFAULTGROUPNAME
static final String DEFAULTGROUPDES
static final String ST_VIEW_TYPE
static final String ST_TIME_INTEVAL
static final String ST_WEEK_START
static final String ST_DATE_FORMAT
static final String ST_TIME_FORMAT
static final String ST_LOCALE
static final String ST_TIMEZONE
static final String ST_BASE_URL
static final String ST_WORKINGTIME
static final String ST_TIME_BEGIN
static final String ST_TIME_END
static final String DEFAULT_CALENDAR_ID
static final String DEFAULT_CALENDAR_NAME
static final String DEFAULT_EVENTCATEGORY_ID_ALL
static final String DEFAULT_EVENTCATEGORY_ID_MEETING
static final String DEFAULT_EVENTCATEGORY_ID_CALLS
static final String DEFAULT_EVENTCATEGORY_ID_CLIENTS
static final String DEFAULT_EVENTCATEGORY_ID_HOLIDAY
static final String DEFAULT_EVENTCATEGORY_ID_ANNIVERSARY
static final String[] DEFAULT_EVENT_CATEGORY_IDS
static final String DEFAULT_EVENTCATEGORY_NAME_ALL
static final String DEFAULT_EVENTCATEGORY_NAME_MEETING
static final String DEFAULT_EVENTCATEGORY_NAME_CALLS
static final String DEFAULT_EVENTCATEGORY_NAME_CLIENTS
static final String DEFAULT_EVENTCATEGORY_NAME_HOLIDAY
static final String DEFAULT_EVENTCATEGORY_NAME_ANNIVERSARY
static final TimeZone PERSISTED_TIMEZONE
static final String ICALENDAR
static final String EXPORTEDCSV
static final String CALDAV
List<EventCategory> getEventCategories(String username) throws Exception
username - current user name(or user id)ExceptionEventCategoryCalendarCollection<EventCategory> getEventCategories(String username, int offset, int limit) throws Exception
Exceptionvoid 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 categoryExceptionEventCategoryvoid 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)ExceptionCalendarSettingdefault boolean hasCalendarSetting(String username) throws Exception
username - ExceptionCalendarImportExport 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.
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 feedExceptionRssData@Deprecated int generateRss(String username, List<String> calendarIds, RssData rssData) throws Exception
generateRss(String username, LinkedHashMap<String, Calendar> calendars, RssData rssData) to instead of.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 feedExceptionRssDataList<FeedData> getFeeds(String username) throws Exception
javax.jcr.Node getRssHome(String username) throws Exception
username - 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 removeFeedData(String username, String title)
username - user id of the feed ownertitle - The title of the removed feedResourceBundle getResourceBundle() throws Exception
ResourceBundle objectExceptionCalendar 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 - Exceptionvoid importRemoteCalendarByJob(RemoteCalendar remoteCalendar) throws Exception
Users don't need to wait too long when importing a big calendar
remoteCalendar - ExceptionAttachment getAttachmentById(String attId)
attId - given attachment id ( now we store this by using node path)void removeAttachmentById(String attId)
void addListenerPlugin(CalendarUpdateEventListener listener) throws Exception
Exceptionvoid addEventListenerPlugin(CalendarEventListener listener) throws Exception
Exceptionvoid initNewUser(String userName, CalendarSetting defaultCalendarSetting) throws Exception
userName - User id of the new created userdefaultCalendarSetting - default calendar settingExceptionboolean 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 authenticateException@Deprecated Calendar getCalendarById(String calId) throws Exception
ExtendedCalendarService.getCalendarHandler() and CalendarHandler.getCalendarById(String)
CalendarCollection<Calendar> getAllCalendars(String username, int calType, int offset, int limit)
username - current user idcalType - type of calendar to filteroffset - offset to continue to return datalimit - limit item will be returned@Deprecated Calendar getUserCalendar(String username, String calendarId) throws Exception
CalendarHandler.getCalendarById(String)
@Deprecated 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
username - current user name(or user id)isShowAll - If true, returns all private calendars. If false, returns ExceptionCalendar,
CalendarSettingorg.exoplatform.commons.utils.ListAccess<Calendar> getPublicCalendars() throws Exception
Exception@Deprecated void saveUserCalendar(String username, Calendar calendar, boolean isNew)
CalendarHandler.saveCalendar(org.exoplatform.calendar.model.Calendar)
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 calendarCalendarException - if there is any error@Deprecated Calendar saveCalendar(String username, Calendar calendar, int caltype, boolean isNew)
CalendarHandler.saveCalendar(org.exoplatform.calendar.model.Calendar)
Saves an calendar to storage with given typeusername - 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 calendarvoid saveSharedCalendar(String username, Calendar calendar) throws Exception
username - current user name(or user id)calendar - Calendar objectExceptionvoid 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 objectExceptionGroupCalendarData@Deprecated Calendar removeUserCalendar(String username, String calendarId) throws Exception
CalendarHandler.removeCalendar(String)
username - current user name(or user id)calendarId - given calendar idException@Deprecated Calendar getGroupCalendar(String calendarId) throws Exception
CalendarHandler.getCalendarById(String)
@Deprecated 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.
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@Deprecated void savePublicCalendar(Calendar calendar, boolean isNew)
CalendarHandler.saveCalendar(org.exoplatform.calendar.model.Calendar)
calendar - Calendar to be savedisNew - If true, a new calendar will be saved. If false, an existing calendar will be updated.@Deprecated 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 toocalendarId - Exceptionboolean isRemoteCalendar(String username, String calendarId) throws Exception
username - the owner of calendarcalendarId - the Id of calendarExceptionvoid 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 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 calendarExceptionshareCalendarByRunJob(String, String, List)void 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 usernameExceptionboolean 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 jobsExceptionshareCalendarByRunJob(String, String, List)int getTypeOfCalendar(String userName, String calendarId) throws Exception
There a 3 types of calendar:
@Deprecated CalendarEvent getEventById(String eventId) throws Exception
EventHandler.getEventById(String)
Gets event by its IdeventId - Id of the eventCalendarEventExceptionCalendarEvent getEvent(String username, String eventId) throws Exception
username - user id of the event ownereventId - id of the eventExceptionList<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> 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,
EventQueryvoid 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 idExceptionCalendarEvent getRepetitiveEvent(CalendarEvent occurence) throws Exception
ExceptionList<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 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.Exceptionvoid removeSharedEvent(String username, String calendarId, String eventId) throws Exception
username - current user name(or user id)calendarId - given calendar ideventId - given event idExceptionvoid 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 - ExceptionCalendarEventEventPageList 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.ExceptionEventPageListList<Map<Integer,String>> searchHightLightEventSQL(String username, EventQuery eventQuery, String[] privateCalendars, String[] publicCalendars) throws Exception
ExceptionList<CalendarEvent> getAllNoRepeatEventsSQL(String username, EventQuery eventQuery, String[] privateCalendars, String[] publicCalendars, List<String> emptyCalendars) throws Exception
username - eventQuery - privateCalendars - publicCalendars - ExceptionEventDAO getEventDAO()
Collection<CalendarEvent> getAllExcludedEvent(CalendarEvent originEvent, Date from, Date to, String userId)
Collection<CalendarEvent> buildSeries(CalendarEvent originEvent, Date from, Date to, String userId)
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 ','.
eventQuery - EventQuery objectMap<String,String> with the key is user name and value isExceptionEventQueryvoid 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 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_SUREExceptionMap<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 keyException@Deprecated List<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 objectsException@Deprecated Map<Integer,String> searchHightLightEvent(String username, EventQuery eventQuery, String[] publicCalendarIds) throws Exception
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".
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">}Exception@Deprecated List<CalendarEvent> getAllNoRepeatEvents(String username, EventQuery eventQuery, String[] publicCalendarIds) throws Exception
getAllNoRepeatEvents(String, EventQuery, String[])
A faster version of getEvents used for UIWeekviewusername - eventQuery - publicCalendarIds - Exception@Deprecated void 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 calendarException@Deprecated 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 - timezoneExceptionList<Map<Integer,String>> searchHighlightRecurrenceEventSQL(String username, EventQuery eventQuery, String timezone, String[] privateCalendars, String[] publicCalendars) throws Exception
Exception@Deprecated List<CalendarEvent> getHighLightOriginalRecurrenceEvents(String username, Calendar from, Calendar to, String[] publicCalendarIds) throws Exception
getHighLightOriginalRecurrenceEventsSQL(String, java.util.Calendar, java.util.Calendar, EventQuery, String[], String[], List)ExceptionList<CalendarEvent> getHighLightOriginalRecurrenceEventsSQL(String username, Calendar from, Calendar to, EventQuery eventQuery, String[] privateCalendars, String[] publicCalendars, List<String> emptyCalendars) throws Exception
Exceptiondefault String[] getDefaultEventCategoryIds()
default String[] getDefaultEventCategoryNames()
default String getDefaultCalendarId()
default String getDefaultCalendarName()
Copyright © 2003–2018 eXo Platform SAS. All rights reserved.