org.exoplatform.calendar.service
Interface CalendarService

All Known Implementing Classes:
CalendarServiceImpl

public interface CalendarService

Created by The eXo Platform SARL Author : Hung Nguyen Quang hung.nguyen@exoplatform.com Jul 11, 2007


Field Summary
static String CALDAV
           
static String EXPORTEDCSV
           
static String ICALENDAR
           
 
Method Summary
 void addEventListenerPlugin(CalendarEventListener listener)
           
 void addListenerPlugin(CalendarUpdateEventListener listener)
           
 void assignGroupTask(String taskId, String calendarId, String assignee)
          assign a user as delegator for a group task.
 Map<String,String> checkFreeBusy(EventQuery eventQuery)
          The method will check the time free or busy of the user, it depents on events and tasks of this user now it only check on one day and if the events and tasks marked with busy, out side status will be checked
 void confirmInvitation(String fromUserId, String toUserId, int calType, String calendarId, String eventId, int answer)
          The method calls when the user use exomail product only, when user receives an invitation (in the same data system), the user will congfirme that do they want to take part in or not
 void confirmInvitation(String fromUserId, String confirmingEmail, String confirmingUser, int calType, String calendarId, String eventId, int answer)
           
 org.quartz.JobDetail findSynchronizeRemoteCalendarJob(org.exoplatform.services.scheduler.JobSchedulerService schedulerService, String username)
           
 int generateCalDav(String username, LinkedHashMap<String,Calendar> calendars, RssData rssData)
          The method genarete links to access calendar throw WEBDAV, it will require user name and password when access
 int generateCalDav(String username, List<String> calendarIds, RssData rssData)
          The method genarete links to access calendar throw WEBDAV, it will require user name and password when access
 int generateRss(String username, LinkedHashMap<String,Calendar> calendars, RssData rssData)
          The menthod uses to make url to contants links to subcribe calendar folows RSS stand
 int generateRss(String username, List<String> calendarIds, RssData rssData)
          The menthod uses to make url to contants links to subcribe calendar folows RSS stand
 String getCalDavResourceEtag(String username, String calendarId, String eventId)
           
 String getCalDavResourceHref(String username, String calendarId, String eventId)
           
 List<GroupCalendarData> getCalendarCategories(String username, boolean isShowAll)
          The method gets all groups of private calendar, and each GroupCalendar contains List of Calendar object
 CalendarCategory getCalendarCategory(String username, String calendarCategoryId)
          The method gets the calendar category by given id
 CalendarImportExport getCalendarImportExports(String type)
          The method gets Import/Export implement class to import or export ics,csv
 CalendarSetting getCalendarSetting(String username)
          This method gets infomations of current user's setting
 List<CalendarCategory> getCategories(String username)
          The method gets all calendar category of current user from data base
 CalendarEvent getEvent(String username, String eventId)
          Get a personal event for a given owner
 List<EventCategory> getEventCategories(String username)
          The method gets all categories of event
 EventCategory getEventCategory(String username, String eventCategoryId)
          The method gets category of event by given id
 EventCategory getEventCategoryByName(String username, String eventCategoryName)
          The method gets category of event by given id
 List<CalendarEvent> getEvents(String username, EventQuery eventQuery, String[] publicCalendarIds)
          The method selects all the events and tasks by given conditions, it includes events of private, public and share calendars
 List<CalendarEvent> getExceptionEvents(String username, CalendarEvent recurEvent)
          Get all exception occurrences from a original recurrence event, the exception event always belong to same calendar with original recurrence event
 String[] getExportImportType()
          The method gets types of data will be imported and exported
 List<FeedData> getFeeds(String username)
          It gets data form server and show the url to view contents of RSS
 Calendar getGroupCalendar(String calendarId)
          The method gets all calendar of a group user, we called it is group calendar it means the calendar for group of users and depen on the permission the user will have right to view or edit that calendar
 List<GroupCalendarData> getGroupCalendars(String[] groupIds, boolean isShowAll, String username)
          The method gets all the group calendar data of current user and list of calendars belong to that group with group calendar data it will classify calendar to each group
 CalendarEvent getGroupEvent(String eventId)
          Get a group event from eventID
 CalendarEvent getGroupEvent(String calendarId, String eventId)
          The method gets event or task form group calendar by given calendar id
 List<CalendarEvent> getGroupEventByCalendar(List<String> calendarIds)
          The method gets events and tasks by given public calendar ids
 Map<String,CalendarEvent> getOccurrenceEvents(CalendarEvent recurEvent, Calendar from, Calendar to, String timezone)
          Get all virtual occurrences from an original recurrence event in a period of time
The result will be depended on the recurrence rule, the start date of recurrence event and the period of time to view.
 List<CalendarEvent> getOriginalRecurrenceEvents(String username, Calendar from, Calendar to, String[] publicCalendarIds)
          Get all original recurrence events of an user in period of time
 List<CalendarEvent> getPublicEvents(EventQuery eventQuery)
          The method gets events and tasks by given event query
 RemoteCalendar getRemoteCalendar(String owner, String calendarId)
           
 Calendar getRemoteCalendar(String owner, String remoteUrl, String remoteType)
           
 int getRemoteCalendarCount(String username)
           
 RemoteCalendarService getRemoteCalendarService()
          Get the RemoteCalendarService object
 ResourceBundle getResourceBundle()
           
 javax.jcr.Node getRssHome(String username)
          The method return root of rss data store area
 GroupCalendarData getSharedCalendars(String username, boolean isShowAll)
          The method gets all shared calendars of the current user
 CalendarEvent getSharedEvent(String username, String calendarId, String eventId)
          Get a shared event of user from user name, id of shared calendar, id of shared event
 List<CalendarEvent> getSharedEventByCalendars(String username, List<String> calendarIds)
           
 int getTypeOfCalendar(String userName, String calendarId)
           
 Calendar getUserCalendar(String username, String calendarId)
          The method get private calendar by given calendarId, and all calendar related to this category will be removed
 List<Calendar> getUserCalendars(String username, boolean isShowAll)
          The method queries all private calendars of current user
 List<Calendar> getUserCalendarsByCategory(String username, String calendarCategoryId)
          The method look up all private calendars by given category id
 List<CalendarEvent> getUserEventByCalendar(String username, List<String> calendarIds)
          The method gets list events and tasks of given private calendar ids
 List<CalendarEvent> getUserEvents(String username, EventQuery eventQuery)
          The method gets all events and tasks by given conditions in event query
 Calendar importRemoteCalendar(RemoteCalendar remoteCalendar)
          Import an online .ics or through CalDav access to local calendar
 void initNewUser(String userName, CalendarSetting defaultCalendarSetting)
           
 boolean isRemoteCalendar(String username, String calendarId)
          Check if the calendar with given calendarId is a remote calendar
 boolean isValidRemoteUrl(String url, String type, String remoteUser, String remotePassword)
          Check if the remote url is valid, in 2 cases of iCalendar url or CalDav url, with authentication
 void loadSynchronizeRemoteCalendarJob(String username)
           
 void moveEvent(String formCalendar, String toCalendar, String formType, String toType, List<CalendarEvent> calEvents, String username)
          The method move and save events form private calendars share calendars public calendars each other
 Calendar refreshRemoteCalendar(String username, String remoteCalendarId)
          Reload remote calendar data
 CalendarCategory removeCalendarCategory(String username, String calendarCategoryId)
          The method used for removing one category by id
 void removeEventCategory(String username, String eventCategoryId)
          Remove event category, all events and tasks belong to this category will be destroyed
 void removeFeedData(String username, String title)
           
 void removeOccurrenceInstance(String username, CalendarEvent occurrence)
          Remove only an occurrence instance from recurrence series, this function will get the original event node of the occurrence and then put the recurrence id of the need-to-delete occurrence to excludeId list of original node.
 Calendar removePublicCalendar(String calendarId)
          Remove the group calendar form data base, every events, tasks inside this calendar will be removed too
 CalendarEvent removePublicEvent(String calendarId, String eventId)
          Remove event or task, all attachments and reminders item will be removed
 void removeRecurrenceSeries(String username, CalendarEvent originalEvent)
          Remove all occurrence from an recurrence series.
 void removeSharedCalendar(String username, String calendarId)
          Removed shared calendar, but not the orloginal calendar
 void removeSharedCalendarFolder(String username)
          This method removes the shared calendar folder of this user and all references (from shared calendars) to this folder.
 void removeSharedEvent(String username, String calendarId, String eventId)
          The method removes the events or tasks form shared calendar, orloginal item will be removed
 Calendar removeUserCalendar(String username, String calendarId)
          Remove private calendar by given id, all events and tasks belong to this calendar will be removed
 CalendarEvent removeUserEvent(String username, String calendarId, String eventId)
          Remove given event or task in private calendar with calendar id, all attachments and reminders will be removed
 void saveCalendarCategory(String username, CalendarCategory calendarCategory, boolean isNew)
          Save details of category for a user
 void saveCalendarSetting(String username, CalendarSetting setting)
          This menthod stores individual setting of each user, with setting you can configue many things like Default view date, time formating, time inteval
 void saveEventCategory(String username, EventCategory eventCategory, boolean isNew)
          Save event category to data base, every user will have their own category to classify events, and it will use unique name in data base
 void saveEventToSharedCalendar(String username, String calendarId, CalendarEvent event, boolean isNew)
          Add event to shared calendar, mean add event to orloginal calendar too
 void savePublicCalendar(Calendar calendar, boolean isNew)
          The method save calendar to public area (group calendar)
 void savePublicCalendar(Calendar calendar, boolean isNew, String username)
          Deprecated.  
 void savePublicEvent(String calendarId, CalendarEvent event, boolean isNew)
          Save event or task by given group calendar id
 void saveSharedCalendar(String username, Calendar calendar)
          The method save all infomations about shared calendar, it will be updated original calendar
 void saveUserCalendar(String username, Calendar calendar, boolean isNew)
          The method saves private calendar infomations in to data base
 void saveUserEvent(String username, String calendarId, CalendarEvent event, boolean isNew)
          The method save infomation to an event or a task by given private calendar id to data
 EventPageList searchEvent(String username, EventQuery eventQuery, String[] publicCalendarIds)
          The method query events and tasks form given coditions, the coditions know by set value for eventquery
 Map<Integer,String> searchHighlightRecurrenceEvent(String username, EventQuery eventQuery, String[] publicCalendarIds, String timezone)
          Find 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 recurrence event
 Map<Integer,String> searchHightLightEvent(String username, EventQuery eventQuery, String[] publicCalendarIds)
          The method query all events, tasks and mark to hightlight the date have events or tasks
 void setGroupTaskStatus(String taskId, String calendarId, String status)
          set status value of a group task.
 void shareCalendar(String username, String calendarId, List<String> receiverUsers)
          The method share the private calendar to other user, it can share for one or many users
 void stopSynchronizeRemoteCalendarJob(String username)
           
 void updateCalDav(String usename, String calendarId, CalendarImportExport imp)
          The method update exited rss data when calendar has been changed
 void updateCalDav(String usename, String calendarId, CalendarImportExport imp, int number)
           
 void updateOccurrenceEvent(String fromCalendar, String toCalendar, String fromType, String toType, List<CalendarEvent> calEvents, String username)
          Update an occurrence event, there are two cases: if this occurrence is virtual occurrence, convert it to exception,
if this occurrence is exception, update it as a normal event
 void updateRecurrenceSeries(String fromCalendar, String toCalendar, String fromType, String toType, CalendarEvent occurrence, String username)
          Update 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)
           
 void updateRss(String usename, String calendarId, CalendarImportExport imp)
          The method update exited rss data when calendar has been changed
 void updateRss(String usename, String calendarId, CalendarImportExport imp, int number)
           
 

Field Detail

ICALENDAR

static final String ICALENDAR

EXPORTEDCSV

static final String EXPORTEDCSV

CALDAV

static final String CALDAV
Method Detail

getCategories

List<CalendarCategory> getCategories(String username)
                                     throws Exception
The method gets all calendar category of current user from data base

Parameters:
username - current user name
Returns:
List of CalendarCategory object
Throws:
Exception
See Also:
CalendarCategory

getCalendarCategories

List<GroupCalendarData> getCalendarCategories(String username,
                                              boolean isShowAll)
                                              throws Exception
The method gets all groups of private calendar, and each GroupCalendar contains List of Calendar object

Parameters:
username - current user name
isShowAll - The parameter to make sure that the user want to show all calendar or not, if it is true then it gets all calendars, if false it will check from calendar setting to know which calendar will be shown
Returns:
List List of GroupCalendarData
Throws:
Exception
See Also:
GroupCalendarData

getCalendarCategory

CalendarCategory getCalendarCategory(String username,
                                     String calendarCategoryId)
                                     throws Exception
The method gets the calendar category by given id

Parameters:
username - current user name
calendarCategoryId - id of calendar category
Returns:
CalendarCategory
Throws:
Exception
See Also:
CalendarCategory

saveCalendarCategory

void saveCalendarCategory(String username,
                          CalendarCategory calendarCategory,
                          boolean isNew)
                          throws Exception
Save details of category for a user

Parameters:
username - current user name(or user id)
calendarCategory - the object that contains category details
isNew - the boolean value to point out that add new category or update
Throws:
Exception

removeCalendarCategory

CalendarCategory removeCalendarCategory(String username,
                                        String calendarCategoryId)
                                        throws Exception
The method used for removing one category by id

Parameters:
username - current user name(or user id)
calendarCategoryId - given category id
Returns:
Throws:
Exception
See Also:
CalendarCategory

getUserCalendar

Calendar getUserCalendar(String username,
                         String calendarId)
                         throws Exception
The method get private calendar by given calendarId, and all calendar related to this category will be removed

Parameters:
username - current user name(or user id)
calendarId - given calendar id
Returns:
Calendar object returned contants details of a calendar
Throws:
Exception
See Also:
Calendar

getUserCalendars

List<Calendar> getUserCalendars(String username,
                                boolean isShowAll)
                                throws Exception
The method queries all private calendars of current user

Parameters:
username - current user name(or user id)
isShowAll - boolean value if equals true will get all private calendars, equals false it will take only the calendars in current user's setting
Returns:
List of calendar object
Throws:
Exception
See Also:
Calendar

getUserCalendarsByCategory

List<Calendar> getUserCalendarsByCategory(String username,
                                          String calendarCategoryId)
                                          throws Exception
The method look up all private calendars by given category id

Parameters:
username - current user name(or user id)
calendarCategoryId - given calendar category id
Returns:
List calendar object
Throws:
Exception
See Also:
Calendar

saveUserCalendar

void saveUserCalendar(String username,
                      Calendar calendar,
                      boolean isNew)
                      throws Exception
The method saves private calendar infomations in to data base

Parameters:
username - current user name(or user id)
calendar - object contants infomations
isNew - Boolean value to know add new calendar or update infomations only
Throws:
Exception

removeUserCalendar

Calendar removeUserCalendar(String username,
                            String calendarId)
                            throws Exception
Remove private calendar by given id, all events and tasks belong to this calendar will be removed

Parameters:
username - current user name(or user id)
calendarId - given calendar id
Returns:
Throws:
Exception

saveSharedCalendar

void saveSharedCalendar(String username,
                        Calendar calendar)
                        throws Exception
The method save all infomations about shared calendar, it will be updated original calendar

Parameters:
username - current user name(or user id)
calendar - the oject contants infomations
Throws:
Exception

getGroupCalendar

Calendar getGroupCalendar(String calendarId)
                          throws Exception
The method gets all calendar of a group user, we called it is group calendar it means the calendar for group of users and depen on the permission the user will have right to view or edit that calendar

Parameters:
calendarId - given calendar id
Returns:
Calendar object contants infomations
Throws:
Exception
See Also:
Calendar

getGroupCalendars

List<GroupCalendarData> getGroupCalendars(String[] groupIds,
                                          boolean isShowAll,
                                          String username)
                                          throws Exception
The method gets all the group calendar data of current user and list of calendars belong to that group with group calendar data it will classify calendar to each group

Parameters:
groupIds - The group ids that current user belong
isShowAll - Gets all calendar or use setting from calendar setting
username - current user name(or user id)
Returns:
List of GroupCalendarData and each GroupCalendarData contants List of calendar object too
Throws:
Exception
See Also:
GroupCalendarData

savePublicCalendar

void savePublicCalendar(Calendar calendar,
                        boolean isNew,
                        String username)
                        throws Exception
Deprecated. 

Throws:
Exception
See Also:
savePublicCalendar(Calendar calendar, boolean isNew)

savePublicCalendar

void savePublicCalendar(Calendar calendar,
                        boolean isNew)
                        throws Exception
The method save calendar to public area (group calendar)

Parameters:
calendar -
isNew - Boolean value will be checked is it add new or update infomations only
username - current user name(or user id)
Throws:
Exception

removePublicCalendar

Calendar removePublicCalendar(String calendarId)
                              throws Exception
Remove the group calendar form data base, every events, tasks inside this calendar will be removed too

Parameters:
calendarId -
Returns:
Throws:
Exception

getEventCategories

List<EventCategory> getEventCategories(String username)
                                       throws Exception
The method gets all categories of event

Parameters:
username - current user name(or user id)
Returns:
List event category object
Throws:
Exception
See Also:
EventCategory

saveEventCategory

void saveEventCategory(String username,
                       EventCategory eventCategory,
                       boolean isNew)
                       throws Exception
Save event category to data base, every user will have their own category to classify events, and it will use unique name in data base

Parameters:
username - current user name(or user id)
eventCategory -
values -
isNew -
Throws:
Exception

removeEventCategory

void removeEventCategory(String username,
                         String eventCategoryId)
                         throws Exception
Remove event category, all events and tasks belong to this category will be destroyed

Parameters:
username - current user name(or user id)
eventCategoryId - The unique name of category
Throws:
Exception

getEventCategory

EventCategory getEventCategory(String username,
                               String eventCategoryId)
                               throws Exception
The method gets category of event by given id

Parameters:
userSession - The session of current logedin user
username - current user name(or user id)
eventCategoryId - given event category id
Returns:
event category object contents infomations
Throws:
Exception
See Also:
EventCategory

getEventCategoryByName

EventCategory getEventCategoryByName(String username,
                                     String eventCategoryName)
                                     throws Exception
The method gets category of event by given id

Parameters:
userSession - The session of current logedin user
username - current user name(or user id)
eventCategoryName - given event category name
Returns:
event category object contents infomations
Throws:
Exception
See Also:
EventCategory

getUserEventByCalendar

List<CalendarEvent> getUserEventByCalendar(String username,
                                           List<String> calendarIds)
                                           throws Exception
The method gets list events and tasks of given private calendar ids

Parameters:
userSession - The session of current logedin user
username - current user name(or user id)
calendarIds - given calendar ids
Returns:
List of events and tasks
Throws:
Exception

getUserEvents

List<CalendarEvent> getUserEvents(String username,
                                  EventQuery eventQuery)
                                  throws Exception
The method gets all events and tasks by given conditions in event query

Parameters:
userSession - The session of current logedin user
username - current user name(or user id)
eventQuery - given coditons
Returns:
List of CalendarEvent object (events and tasks)
Throws:
Exception
See Also:
CalendarEvent

getEvent

CalendarEvent getEvent(String username,
                       String eventId)
                       throws Exception
Get a personal event for a given owner

Parameters:
owner - user id of the event owner
eventId - id of event to get
Returns:
CalendarEvent in the personal events of owner
Throws:
Exception

saveUserEvent

void saveUserEvent(String username,
                   String calendarId,
                   CalendarEvent event,
                   boolean isNew)
                   throws Exception
The method save infomation to an event or a task by given private calendar id to data

Parameters:
username - current user name(or user id)
calendarId - given calendar id
event - object contants infomations
isNew - boolean value, is update or add new event
Throws:
Exception

removeUserEvent

CalendarEvent removeUserEvent(String username,
                              String calendarId,
                              String eventId)
                              throws Exception
Remove given event or task in private calendar with calendar id, all attachments and reminders will be removed

Parameters:
username - current user name(or user id)
calendarId - given calendar id
eventId - given event id
Returns:
Throws:
Exception

getGroupEvent

CalendarEvent getGroupEvent(String eventId)
                            throws Exception
Get a group event from eventID

Parameters:
eventId -
Returns:
CalendarEvent object or null if event was not found
Throws:
Exception

getGroupEvent

CalendarEvent getGroupEvent(String calendarId,
                            String eventId)
                            throws Exception
The method gets event or task form group calendar by given calendar id

Parameters:
calendarId - given calendar id
eventId - given event id
Returns:
CalendarEvent object contains information and attachments, reminders
Throws:
Exception
See Also:
CalendarEvent

getGroupEventByCalendar

List<CalendarEvent> getGroupEventByCalendar(List<String> calendarIds)
                                            throws Exception
The method gets events and tasks by given public calendar ids

Parameters:
calendarIds - public calendar ids
Returns:
List calendar event object
Throws:
Exception
See Also:
CalendarEvent

getPublicEvents

List<CalendarEvent> getPublicEvents(EventQuery eventQuery)
                                    throws Exception
The method gets events and tasks by given event query

Parameters:
eventQuery - object contants given conditions
Returns:
List calendar event object
Throws:
Exception
See Also:
CalendarEvent

savePublicEvent

void savePublicEvent(String calendarId,
                     CalendarEvent event,
                     boolean isNew)
                     throws Exception
Save event or task by given group calendar id

Parameters:
calendarId - given calendar id
event - object contants infomation about event
isNew - boolean value to check update or add new event
Throws:
Exception

removePublicEvent

CalendarEvent removePublicEvent(String calendarId,
                                String eventId)
                                throws Exception
Remove event or task, all attachments and reminders item will be removed

Parameters:
calendarId - given calendar id
eventId - given event or task id
Returns:
Throws:
Exception

saveCalendarSetting

void saveCalendarSetting(String username,
                         CalendarSetting setting)
                         throws Exception
This menthod stores individual setting of each user, with setting you can configue many things like Default view date, time formating, time inteval

Parameters:
username - current user name(or user id)
setting - Obicject containts infomations about setting
Throws:
Exception

getCalendarSetting

CalendarSetting getCalendarSetting(String username)
                                   throws Exception
This method gets infomations of current user's setting

Parameters:
username - current user name(or user id)
Returns:
Throws:
Exception
See Also:
CalendarSetting

getCalendarImportExports

CalendarImportExport getCalendarImportExports(String type)
The method gets Import/Export implement class to import or export ics,csv

Parameters:
type - type of import, export, it supports two types, ICS and CSV
Returns:
CalendarImportExport
See Also:
CalendarImportExport

getExportImportType

String[] getExportImportType()
                             throws Exception
The method gets types of data will be imported and exported

Returns:
types of inport/export
Throws:
Exception

generateRss

int generateRss(String username,
                LinkedHashMap<String,Calendar> calendars,
                RssData rssData)
                throws Exception
The menthod uses to make url to contants links to subcribe calendar folows RSS stand

Parameters:
username - current user name(or user id)
calendars -
rssData - object contants infomations about the rss feed
Returns:
Throws:
Exception
See Also:
RssData

generateRss

int generateRss(String username,
                List<String> calendarIds,
                RssData rssData)
                throws Exception
The menthod uses to make url to contants links to subcribe calendar folows RSS stand

Parameters:
username - current user name(or user id)
calendars -
rssData - object contants infomations about the rss feed
Returns:
Throws:
Exception
See Also:
RssData

getFeeds

List<FeedData> getFeeds(String username)
                        throws Exception
It gets data form server and show the url to view contents of RSS

Parameters:
systemSession - Sessesion to access the public data
username - current user name(or user id)
Returns:
List of FeedData
Throws:
Exception
See Also:
FeedData

getRssHome

javax.jcr.Node getRssHome(String username)
                          throws Exception
The method return root of rss data store area

Parameters:
username - current user name(or user id)
Returns:
Throws:
Exception

searchEvent

EventPageList searchEvent(String username,
                          EventQuery eventQuery,
                          String[] publicCalendarIds)
                          throws Exception
The method query events and tasks form given coditions, the coditions know by set value for eventquery

Parameters:
userSession - The session of current logedin user
username - current user name(or user id)
eventQuery - object contants coditions to query
publicCalendarIds - pulic calendar ids
Returns:
Throws:
Exception
See Also:
EventPageList

searchHightLightEvent

Map<Integer,String> searchHightLightEvent(String username,
                                          EventQuery eventQuery,
                                          String[] publicCalendarIds)
                                          throws Exception
The method query all events, tasks and mark to hightlight the date have events or tasks

Parameters:
userSession - The session of current logedin user
username - current user name(or user id)
eventQuery - object contants coditions to query
publicCalendarIds - publicCalendarIds pulic calendar ids
Returns:
Throws:
Exception

shareCalendar

void shareCalendar(String username,
                   String calendarId,
                   List<String> receiverUsers)
                   throws Exception
The method share the private calendar to other user, it can share for one or many users

Parameters:
systemSession - Sessesion to access the public data
username - current user name(or user id)
calendarId - given calendar id
receiverUsers - List receive user username or id
Throws:
Exception

getSharedCalendars

GroupCalendarData getSharedCalendars(String username,
                                     boolean isShowAll)
                                     throws Exception
The method gets all shared calendars of the current user

Parameters:
systemSession - Sessesion to access the public data
username - current user name(or user id)
isShowAll - boolean value to point out that it will get all calendars or use user's clendar setting
Returns:
Throws:
Exception
See Also:
GroupCalendarData

getEvents

List<CalendarEvent> getEvents(String username,
                              EventQuery eventQuery,
                              String[] publicCalendarIds)
                              throws Exception
The method selects all the events and tasks by given conditions, it includes events of private, public and share calendars

Parameters:
username - current user name(or user id)
eventQuery - given coditions
publicCalendarIds - public calendar ids
Returns:
Throws:
Exception
See Also:
CalendarEvent

removeSharedCalendar

void removeSharedCalendar(String username,
                          String calendarId)
                          throws Exception
Removed shared calendar, but not the orloginal calendar

Parameters:
username - current user name(or user id)
calendarId - given calendar id
Throws:
Exception

removeSharedCalendarFolder

void removeSharedCalendarFolder(String username)
                                throws Exception
This method removes the shared calendar folder of this user and all references (from shared calendars) to this folder.

Parameters:
username - the username
Throws:
Exception

saveEventToSharedCalendar

void saveEventToSharedCalendar(String username,
                               String calendarId,
                               CalendarEvent event,
                               boolean isNew)
                               throws Exception
Add event to shared calendar, mean add event to orloginal calendar too

Parameters:
username - current user name(or user id)
calendarId - given calendar id
event - object contants infomations about event
isNew - boolean value to check that add new or update event
Throws:
Exception

checkFreeBusy

Map<String,String> checkFreeBusy(EventQuery eventQuery)
                                 throws Exception
The method will check the time free or busy of the user, it depents on events and tasks of this user now it only check on one day and if the events and tasks marked with busy, out side status will be checked

Parameters:
eventQuery - The query object it containts query statement to look up the data
Returns:
Map data with key is user name (or user id), and value is the a pair of from time and to time by miliseconds and sperate by coma(,)
Throws:
Exception
See Also:
EventQuery

generateCalDav

int generateCalDav(String username,
                   LinkedHashMap<String,Calendar> calendars,
                   RssData rssData)
                   throws Exception
The method genarete links to access calendar throw WEBDAV, it will require user name and password when access

Parameters:
username - current user name(or user id)
calendars - List calendar ids will look up and publicing
rssData - Object contants infomations about rss feed
Returns:
Throws:
Exception

generateCalDav

int generateCalDav(String username,
                   List<String> calendarIds,
                   RssData rssData)
                   throws Exception
The method genarete links to access calendar throw WEBDAV, it will require user name and password when access

Parameters:
username - current user name(or user id)
calendars - List calendar ids will look up and publicing
rssData - Object contants infomations about rss feed
Returns:
Throws:
Exce
Exception

removeSharedEvent

void removeSharedEvent(String username,
                       String calendarId,
                       String eventId)
                       throws Exception
The method removes the events or tasks form shared calendar, orloginal item will be removed

Parameters:
username - current user name(or user id)
calendarId - given calendar id
eventId - given event id
Throws:
Exception

moveEvent

void moveEvent(String formCalendar,
               String toCalendar,
               String formType,
               String toType,
               List<CalendarEvent> calEvents,
               String username)
               throws Exception
The method move and save events form private calendars share calendars public calendars each other

Parameters:
formCalendar - the source calendar id
toCalendar - destination calendar id
formType - type of source calendar
toType - type of destination calendar
calEvents - List of object contant infomations
username - current user name(or user id)
Throws:
Exception

confirmInvitation

void confirmInvitation(String fromUserId,
                       String toUserId,
                       int calType,
                       String calendarId,
                       String eventId,
                       int answer)
The method calls when the user use exomail product only, when user receives an invitation (in the same data system), the user will congfirme that do they want to take part in or not

Parameters:
fromUserId - id or user name of the user, who make the invitation
toUserId - receiver user's id or name
calType - type of calendar contants the event
calendarId - given calendar id
eventId - given event id
answer - The answer of the receive user

confirmInvitation

void confirmInvitation(String fromUserId,
                       String confirmingEmail,
                       String confirmingUser,
                       int calType,
                       String calendarId,
                       String eventId,
                       int answer)
                       throws Exception
Throws:
Exception

addListenerPlugin

void addListenerPlugin(CalendarUpdateEventListener listener)
                       throws Exception
Throws:
Exception

addEventListenerPlugin

void addEventListenerPlugin(CalendarEventListener listener)
                            throws Exception
Throws:
Exception

updateRss

void updateRss(String usename,
               String calendarId,
               CalendarImportExport imp)
               throws Exception
The method update exited rss data when calendar has been changed

Parameters:
usename -
calendarId - calendar id Added from 1.3
Throws:
Exception

updateRss

void updateRss(String usename,
               String calendarId,
               CalendarImportExport imp,
               int number)
               throws Exception
Throws:
Exception

updateCalDav

void updateCalDav(String usename,
                  String calendarId,
                  CalendarImportExport imp)
                  throws Exception
The method update exited rss data when calendar has been changed

Parameters:
usename -
calendarId - calendar id Added from 1.3
Throws:
Exception

updateCalDav

void updateCalDav(String usename,
                  String calendarId,
                  CalendarImportExport imp,
                  int number)
                  throws Exception
Throws:
Exception

getTypeOfCalendar

int getTypeOfCalendar(String userName,
                      String calendarId)
                      throws Exception
Throws:
Exception

getSharedEventByCalendars

List<CalendarEvent> getSharedEventByCalendars(String username,
                                              List<String> calendarIds)
                                              throws Exception
Throws:
Exception

getSharedEvent

CalendarEvent getSharedEvent(String username,
                             String calendarId,
                             String eventId)
                             throws Exception
Get a shared event of user from user name, id of shared calendar, id of shared event

Parameters:
username - username
calendarId - id of shared calendar
eventId - id of shared event
Returns:
the CalendarEvent object
Throws:
Exception

removeFeedData

void removeFeedData(String username,
                    String title)

getResourceBundle

ResourceBundle getResourceBundle()
                                 throws Exception
Throws:
Exception

initNewUser

void initNewUser(String userName,
                 CalendarSetting defaultCalendarSetting)
                 throws Exception
Throws:
Exception

assignGroupTask

void assignGroupTask(String taskId,
                     String calendarId,
                     String assignee)
                     throws Exception
assign a user as delegator for a group task.

Parameters:
taskId -
calendarId -
assignee -
Throws:
Exception

setGroupTaskStatus

void setGroupTaskStatus(String taskId,
                        String calendarId,
                        String status)
                        throws Exception
set status value of a group task.

Parameters:
taskId -
calendarId -
status -
Throws:
Exception

isRemoteCalendar

boolean isRemoteCalendar(String username,
                         String calendarId)
                         throws Exception
Check if the calendar with given calendarId is a remote calendar

Parameters:
username - the owner of calendar
calendarId - the Id of calendar
Returns:
true if this calendar is remote, otherwise false
Throws:
Exception

isValidRemoteUrl

boolean isValidRemoteUrl(String url,
                         String type,
                         String remoteUser,
                         String remotePassword)
                         throws Exception
Check if the remote url is valid, in 2 cases of iCalendar url or CalDav url, with authentication

Parameters:
url - the remote url
type - the type of remote calendar, iCalendar or CalDav
username - the remote username used to authenticate
password - the remote password used to authenticate
Returns:
true if remote url is available in case of iCalendar and CalDav access support in case of CalDav
Throws:
Exception

importRemoteCalendar

Calendar importRemoteCalendar(RemoteCalendar remoteCalendar)
                              throws Exception
Import an online .ics or through CalDav access to local calendar

Parameters:
remoteCalendar - object content all properties for remote calendar.
credentials -
Throws:
Exception

refreshRemoteCalendar

Calendar refreshRemoteCalendar(String username,
                               String remoteCalendarId)
                               throws Exception
Reload remote calendar data

Parameters:
username - owner of the calendar
remoteCalendar - object content all properties for remote calendar.Id id of the calendar
Returns:
the remote Calendar ojbect
Throws:
Exception

updateRemoteCalendarInfo

Calendar updateRemoteCalendarInfo(RemoteCalendar remoteCalendar)
                                  throws Exception
Parameters:
remoteCalendar - object content all properties for remote calendar.
Returns:
Throws:
Exception

getRemoteCalendar

RemoteCalendar getRemoteCalendar(String owner,
                                 String calendarId)
                                 throws Exception
Parameters:
owner - the owner of this calendar
calendarId - the Id of calendar
Returns:
RemoteCalendar
Throws:
Exception

getRemoteCalendarService

RemoteCalendarService getRemoteCalendarService()
                                               throws Exception
Get the RemoteCalendarService object

Returns:
Throws:
Exception

getRemoteCalendar

Calendar getRemoteCalendar(String owner,
                           String remoteUrl,
                           String remoteType)
                           throws Exception
Throws:
Exception

getRemoteCalendarCount

int getRemoteCalendarCount(String username)
                           throws Exception
Throws:
Exception

getCalDavResourceHref

String getCalDavResourceHref(String username,
                             String calendarId,
                             String eventId)
                             throws Exception
Throws:
Exception

getCalDavResourceEtag

String getCalDavResourceEtag(String username,
                             String calendarId,
                             String eventId)
                             throws Exception
Throws:
Exception

loadSynchronizeRemoteCalendarJob

void loadSynchronizeRemoteCalendarJob(String username)
                                      throws Exception
Throws:
Exception

findSynchronizeRemoteCalendarJob

org.quartz.JobDetail findSynchronizeRemoteCalendarJob(org.exoplatform.services.scheduler.JobSchedulerService schedulerService,
                                                      String username)
                                                      throws Exception
Throws:
Exception

stopSynchronizeRemoteCalendarJob

void stopSynchronizeRemoteCalendarJob(String username)
                                      throws Exception
Throws:
Exception

getOccurrenceEvents

Map<String,CalendarEvent> getOccurrenceEvents(CalendarEvent recurEvent,
                                              Calendar from,
                                              Calendar to,
                                              String timezone)
                                              throws Exception
Get all virtual occurrences from an original recurrence event in a period of time
The result will be depended on the recurrence rule, the start date of recurrence event and the period of time to view.

Parameters:
recurEvent - the original recurrence event
from - the from time
to - the to time
Returns:
the map of CalendarEvent object, each entry will contains an occurrence event object with recurrence-id as the key
Throws:
Exception

getOriginalRecurrenceEvents

List<CalendarEvent> getOriginalRecurrenceEvents(String username,
                                                Calendar from,
                                                Calendar to,
                                                String[] publicCalendarIds)
                                                throws Exception
Get all original recurrence events of an user in period of time

Parameters:
username - the owner of recurrence event
from - from time
to - to time
Returns:
list of CalendarEvent objects
Throws:
Exception

updateOccurrenceEvent

void updateOccurrenceEvent(String fromCalendar,
                           String toCalendar,
                           String fromType,
                           String toType,
                           List<CalendarEvent> calEvents,
                           String username)
                           throws Exception
Update an occurrence event, there are two cases: if this occurrence is virtual occurrence, convert it to exception,
if this occurrence is exception, update it as a normal event

Parameters:
fromCalendar -
toCalendar -
fromType -
toType -
calEvents -
username -
Throws:
Exception

getExceptionEvents

List<CalendarEvent> getExceptionEvents(String username,
                                       CalendarEvent recurEvent)
                                       throws Exception
Get all exception occurrences from a original recurrence event, the exception event always belong to same calendar with original recurrence event

Parameters:
username - the owner of this recurrence event
recurEvent - the original recurrence event
Returns:
the list of CalendarEvent objects
Throws:
Exception

removeOccurrenceInstance

void removeOccurrenceInstance(String username,
                              CalendarEvent occurrence)
                              throws Exception
Remove 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.

Parameters:
username - owner of this occurrence event
occurrence - the occurrence event object to remove
Throws:
Exception

removeRecurrenceSeries

void removeRecurrenceSeries(String username,
                            CalendarEvent originalEvent)
                            throws Exception
Remove all occurrence from an recurrence series. It will delete the original event of recurrence series.
All exception occurrences of this series still exist and will be treated as a normal event

Parameters:
username - owner of recurrence event, in case of private or shared calendar
originalEvent - the original recurrence event object
Throws:
Exception

updateRecurrenceSeries

void updateRecurrenceSeries(String fromCalendar,
                            String toCalendar,
                            String fromType,
                            String toType,
                            CalendarEvent occurrence,
                            String username)
                            throws Exception
Update recurrence series from an occurrence, this function is only called if the occurrence event is not changed the from date property.
In other way, if the occurrence event move to another date, it will be updated as a 'exception' occurrence and not affects to series

Parameters:
fromCalendar - the calendarId of the calendar which the recurrence event belong to before updating
toCalendar - the new calendarId of the recurrence event
fromType - calendarType of recurrence event before updating
toType - calendarType of recurrence event after updating
occurrence - the occurrence contains the new data about recurrence series
username - owner of recurrence event, in case of private and shared calendar
Throws:
Exception

searchHighlightRecurrenceEvent

Map<Integer,String> searchHighlightRecurrenceEvent(String username,
                                                   EventQuery eventQuery,
                                                   String[] publicCalendarIds,
                                                   String timezone)
                                                   throws Exception
Find 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 recurrence event

Parameters:
username - the username of user
eventQuery - EventQuery object to limit time-range
publicCalendarIds - list of public calendar
timezone - timezone
Returns:
Throws:
Exception


Copyright © 2013 eXo Platform SAS. All Rights Reserved.