Interface RecurringEventUnravellingSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving and expanding
RecurringEvent s.
This session defines views that offer differing behaviors when retrieving multiple objects.
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete set or is an error condition
- isolated calendar view: All recurring event methods in this
session operate, retrieve and pertain to recurring events defined
explicitly in the current calendar. Using an isolated view is useful
for managing recurring events with the
RecurringEventAdminSession. - federated calendar view: All recurring event methods in this session operate, retrieve and pertain to all recurring events defined in this calendar and any other calendars implicitly available in this calendar through calendar inheritence.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performRecurringEventlookups.expandRecurringEvent(Id recurringEventId) Expands the given recurring event into a series of non-recurring events.expandRecurringEventInDateRange(Id recurringEventId, DateTime from, DateTime to) Expands the given recurring event into a series of non-recurring events that fall within the given date range inclusive.expandRecurringEvents(IdList recurringEventIds) Expands the given recurring events into a series of non-recurring events.expandRecurringEventsInDateRange(Id recurringEventIds, DateTime from, DateTime to) Expands the given recurring events into a series of non-recurring events that fall within the given date range inclusive.Gets theCalendarassociated with this session.Gets theCalendarIdassociated with this session.longgetNumberOfEvents(Id recurringEventId) Gets the number of events in the recurring series.longgetNumberOfEventsInDateRange(Id recurringEventId, DateTime from, DateTime to) Gets the number of events in the recurring series between the given dates inclusive.getRecurringEventByEvent(Id eventId) Gets the recurring event where the given eventIdwas issued as part of the recurring series.getRecurringEventsByDate(DateTime datetime) Gets a list of recurring events where the given date falls within the span of a recurring event.getRecurringEventsByEvents(IdList eventIds) Gets aRecurringEventListcorresponding to the given eventIdListwhere the events were implcitly created from the recurring series.getRecurringEventsInDateRange(DateTime from, DateTime to) Gets aRecurringEventListwhose series falls entirely within the given range inclusive.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theEventreturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getCalendarId
Id getCalendarId()Gets theCalendarIdassociated with this session.- Returns:
- the
Calendar Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getCalendar
Gets theCalendarassociated with this session.- Returns:
- the
Calendarassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canUnravelRecurringEvents
boolean canUnravelRecurringEvents()Tests if this user can performRecurringEventlookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeRecurringEventView
void useComparativeRecurringEventView()The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryRecurringEventView
void usePlenaryRecurringEventView()A complete view of theEventreturns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.- Compliance:
mandatory- This method is must be implemented.
-
useFederatedCalendarView
void useFederatedCalendarView()Federates the view for methods in this session. A federated view will include events in calendars which are children of this calendar in the calendar hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedCalendarView
void useIsolatedCalendarView()Isolates the view for methods in this session. An isolated view restricts lookups to this calendar only.- Compliance:
mandatory- This method is must be implemented.
-
getRecurringEventByEvent
RecurringEvent getRecurringEventByEvent(Id eventId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the recurring event where the given eventIdwas issued as part of the recurring series.- Parameters:
eventId-an event Id- Returns:
- the returned
RecurringEvent - Throws:
NotFoundException-eventIdis not foundNullArgumentException-eventIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRecurringEventsByEvents
RecurringEventList getRecurringEventsByEvents(IdList eventIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aRecurringEventListcorresponding to the given eventIdListwhere the events were implcitly created from the recurring series. In plenary mode, the returned list contains all of the recurring events corresponding to the events in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleEventsmay be omitted from the list and may present the elements in any order including returning a unique set.- Parameters:
eventIds- the list ofIdsto retrieve- Returns:
- the returned
RecurringEventlist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-eventIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
expandRecurringEvent
EventList expandRecurringEvent(Id recurringEventId) throws NotFoundException, OperationFailedException, PermissionDeniedException Expands the given recurring event into a series of non-recurring events. In plenary mode, the returned list contains all of the events in the series, including duplicates, or an error results. In comparative mode, events may be omitted from the list and may present the elements in any order, including providing a unique set.- Parameters:
recurringEventId-Idof the recurringEvent- Returns:
- the returned
Event list - Throws:
NotFoundException-recurringEventId wasnot foundNullArgumentException-recurringEventIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
expandRecurringEventInDateRange
EventList expandRecurringEventInDateRange(Id recurringEventId, DateTime from, DateTime to) throws NotFoundException, OperationFailedException, PermissionDeniedException Expands the given recurring event into a series of non-recurring events that fall within the given date range inclusive. In plenary mode, the returned list contains all of the events in the series, including duplicates, or an error results. In comparative mode, events may be omitted from the list and may present the elements in any order, including providing a unique set.- Parameters:
recurringEventId-Idof the recurringEventfrom- start dateto- end date- Returns:
- the returned
Event list - Throws:
InvalidArgumentException-tois less thanfromNotFoundException-recurringEventId wasnot foundNullArgumentException-recurringEventIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
expandRecurringEvents
EventList expandRecurringEvents(IdList recurringEventIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Expands the given recurring events into a series of non-recurring events. In plenary mode, the returned list contains all of the events in the series, including duplicates, or an error results. In comparative mode, events may be omitted from the list and may present the elements in any order, including providing a unique set.- Parameters:
recurringEventIds- the list ofIdsto expand- Returns:
- the returned
Event list - Throws:
NotFoundException- anId wasnot foundNullArgumentException-recurringEventIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
expandRecurringEventsInDateRange
EventList expandRecurringEventsInDateRange(Id recurringEventIds, DateTime from, DateTime to) throws NotFoundException, OperationFailedException, PermissionDeniedException Expands the given recurring events into a series of non-recurring events that fall within the given date range inclusive. In plenary mode, the returned list contains all of the events in the series, including duplicates, or an error results. In comparative mode, events may be omitted from the list and may present the elements in any order, including providing a unique set.- Parameters:
recurringEventIds- the list ofIdsto expandfrom- start dateto- end date- Returns:
- the returned
Event list - Throws:
InvalidArgumentException-tois less thanfromNotFoundException- anId wasnot foundNullArgumentException-recurringEventIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getRecurringEventsByDate
RecurringEventList getRecurringEventsByDate(DateTime datetime) throws OperationFailedException, PermissionDeniedException Gets a list of recurring events where the given date falls within the span of a recurring event. In plenary mode, the returned list contains all known events or an error results. Otherwise, the returned list may contain only those events that are accessible through this session. In both cases, the order of the set is not specified.- Parameters:
datetime- a date- Returns:
- the returned
RecurringEventlist - Throws:
NullArgumentException-datetimeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRecurringEventsInDateRange
RecurringEventList getRecurringEventsInDateRange(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aRecurringEventListwhose series falls entirely within the given range inclusive. In plenary mode, the returned list contains all known recurring events or an error results. Otherwise, the returned list may contain only those recurring events that are accessible through this session. In both cases, the order of the set is not specified.- Parameters:
from- start dateto- end date- Returns:
- the returned
RecurringEventlist - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getNumberOfEvents
long getNumberOfEvents(Id recurringEventId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the number of events in the recurring series.- Parameters:
recurringEventId-Idof the recurringEvent- Returns:
- the number of meeting times
- Throws:
NotFoundException-recurringEventId wasnot foundNullArgumentException-recurringEventIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getNumberOfEventsInDateRange
long getNumberOfEventsInDateRange(Id recurringEventId, DateTime from, DateTime to) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the number of events in the recurring series between the given dates inclusive.- Parameters:
recurringEventId-Idof the recurringEventfrom- start dateto- end date- Returns:
- the number of meeting times
- Throws:
InvalidArgumentException-tois less thanfromNotFoundException-recurringEventId wasnot foundNullArgumentException-recurringEventIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-