Interface EventLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving Event 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 event methods in this session
operate, retrieve and pertain to events defined explicitly in the
current calendar. Using an isolated view is useful for managing events
with the
EventAdminSession. - federated calendar view: All event methods in this session operate, retrieve and pertain to all events defined in this calendar and any other calendars implicitly available in this calendar through calendar inheritence.
- effective event view: All events lookup methods return events where the current date falls in between the effective dates inclusive.
- any effective event view: Events of any effective date are returned from methods.
- denormalized event view: recurring events are expanded into a series of non-recurring events
- normalized event view: recurring events are represented by a single event
- sequestered event viiew: All event methods suppress sequestered events.
- unsequestered event view: All event methods return all events.
Events may have an additional records indicated by their respective
record types. The record may not be accessed through a cast of the
Event .
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performEventlookups.Gets theCalendarassociated with this session.Gets theCalendarIdassociated with this session.Gets theEventspecified by itsId.Gets allEvents.getEventsByGenusType(Type eventGenusType) Gets anEventListcorresponding to the given event genusTypewhich does not include events of genus types derived from the specifiedType.getEventsByIds(IdList eventIds) Gets anEventListcorresponding to the givenIdList.getEventsByLocation(Id locationId) Gets a list of events with the given location.getEventsByLocationInDateRange(Id locationId, DateTime from, DateTime to) Gets anEventListthat fall within the given range inclusive at the given location.getEventsByLocationOnDate(Id locationId, DateTime from, DateTime to) Gets anEventListat the given location where the given date range falls within the event dates inclusive.getEventsByParentGenusType(Type eventGenusType) Gets anEventListcorresponding to the given event genusTypeand include any additional event with genus types derived from the specifiedType.getEventsByRecordType(Type eventRecordType) Gets anEventListcontaining the given event recordType.getEventsBySponsor(Id resourceId) Gets a list of events with the given sponsor.getEventsBySponsorInDateRange(Id resourceId, DateTime from, DateTime to) Gets anEventListthat fall within the given range inclusive at the given location.getEventsBySponsorOnDate(Id resourceId, DateTime from, DateTime to) Gets anEventListwith the given sponsor where the given date range falls within the event dates inclusive.getEventsInDateRange(DateTime from, DateTime to) Gets anEventListthat fall within the given range inclusive.getEventsOnDate(DateTime from, DateTime to) Gets a list of events where the given date range falls within an event inclusive.getUpcomingEvents(long number) Gets the next upcoming events on this calendar.voidAll events of any effective dates are returned by methods in this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidA denormalized view expands recurring events into a series ofEvents.voidOnly events whose effective dates are current are returned by methods in this session.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA normalized view uses a singleEventto represent a set of recurring events.voidA complete view of theEventreturns is desired.voidThe returns from the lookup methods omit sequestered events.voidAll events are returned including sequestered events.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.
-
canLookupEvents
boolean canLookupEvents()Tests if this user can performEventlookups. 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.
-
useComparativeEventView
void useComparativeEventView()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.
-
usePlenaryEventView
void usePlenaryEventView()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.
-
useEffectiveEventView
void useEffectiveEventView()Only events whose effective dates are current are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveEventView
void useAnyEffectiveEventView()All events of any effective dates are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useNormalizedEventView
void useNormalizedEventView()A normalized view uses a singleEventto represent a set of recurring events.- Compliance:
mandatory- This method is must be implemented.
-
useDenormalizedEventView
void useDenormalizedEventView()A denormalized view expands recurring events into a series ofEvents.- Compliance:
mandatory- This method is must be implemented.
-
useSequesteredEventView
void useSequesteredEventView()The returns from the lookup methods omit sequestered events.- Compliance:
mandatory- This method is must be implemented.
-
useUnsequesteredEventView
void useUnsequesteredEventView()All events are returned including sequestered events.- Compliance:
mandatory- This method is must be implemented.
-
getEvent
Event getEvent(Id eventId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theEventspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedEventmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anEventand retained for compatibility. In normalized mode, recurring events appear as a single event. In denormalized mode, each element in the recurring series appears as a separate event. In effective mode, events are returned that are currently effective. In any effective mode, effective events and those currently expired are returned. In sequestered mode, no sequestered events are returned. In unsequestered mode, all events are returned.- Parameters:
eventId-Idof theEvent- Returns:
- the event
- Throws:
NotFoundException-eventIdnot foundNullArgumentException-eventIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getEventsByIds
EventList getEventsByIds(IdList eventIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets anEventListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the events specified 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. In normalized mode, recurring events appear as a single event. In denormalized mode, each element in the recurring series appears as a separate event. In effective mode, events are returned that are currently effective. In any effective mode, effective events and those currently expired are returned. In sequestered mode, no sequestered events are returned. In unsequestered mode, all events are returned.- Parameters:
eventIds- the list ofIdsto retrieve- Returns:
- the returned
Eventlist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-eventIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEventsByGenusType
EventList getEventsByGenusType(Type eventGenusType) throws OperationFailedException, PermissionDeniedException Gets anEventListcorresponding to the given event genusTypewhich does not include events of genus types derived from the specifiedType. 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 normalized mode, recurring events appear as a single event. In denormalized mode, each element in the recurring series appears as a separate event. In effective mode, events are returned that are currently effective. In any effective mode, effective events and those currently expired are returned. In sequestered mode, no sequestered events are returned. In unsequestered mode, all events are returned.- Parameters:
eventGenusType- an event genus type- Returns:
- the returned
Eventlist - Throws:
NullArgumentException-eventGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEventsByParentGenusType
EventList getEventsByParentGenusType(Type eventGenusType) throws OperationFailedException, PermissionDeniedException Gets anEventListcorresponding to the given event genusTypeand include any additional event with genus types derived from the specifiedType. 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 normalized mode, recurring events appear as a single event. In denormalized mode, each element in the recurring series appears as a separate event. In effective mode, events are returned that are currently effective. In any effective mode, effective events and those currently expired are returned. In sequestered mode, no sequestered events are returned. In unsequestered mode, all events are returned.- Parameters:
eventGenusType- an event genus type- Returns:
- the returned
Eventlist - Throws:
NullArgumentException-eventGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEventsByRecordType
EventList getEventsByRecordType(Type eventRecordType) throws OperationFailedException, PermissionDeniedException Gets anEventListcontaining the given event recordType. 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 normalized mode, recurring events appear as a single event. In denormalized mode, each element in the recurring series appears as a separate event. In effective mode, events are returned that are currently effective. In any effective mode, effective events and those currently expired are returned.- Parameters:
eventRecordType- an event record type- Returns:
- the returned
Eventlist - Throws:
NullArgumentException-eventRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEventsOnDate
EventList getEventsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of events where the given date range falls within an event inclusive. 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 normalized mode, recurring events appear as a single event. In denormalized mode, each element in the recurring series appears as a separate event. In effective mode, events are returned that are currently effective. In any effective mode, effective events and those currently expired are returned. In sequestered mode, no sequestered events are returned. In unsequestered mode, all events are returned.- Parameters:
from- starting dateto- ending date- Returns:
- the returned
Eventlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEventsInDateRange
EventList getEventsInDateRange(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets anEventListthat fall within the given range inclusive. 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 normalized mode, recurring events appear as a single event. In denormalized mode, each element in the recurring series appears as a separate event. In effective mode, events are returned that are currently effective. In any effective mode, effective events and those currently expired are returned. In sequestered mode, no sequestered events are returned. In unsequestered mode, all events are returned.- Parameters:
from- start dateto- end date- Returns:
- the returned
Eventlist - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getUpcomingEvents
Gets the next upcoming events on this calendar. 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 normalized mode, recurring events appear as a single event. In denormalized mode, each element in the recurring series appears as a separate event. In effective mode, events are returned that are currently effective. In any effective mode, effective events and those currently expired are returned. In sequestered mode, no sequestered events are returned. In unsequestered mode, all events are returned.- Parameters:
number- the number of events- Returns:
- the returned
Eventlist - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEventsByLocation
EventList getEventsByLocation(Id locationId) throws OperationFailedException, PermissionDeniedException Gets a list of events with the given location. 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 normalized mode, recurring events appear as a single event. In denormalized mode, each element in the recurring series appears as a separate event. In effective mode, events are returned that are currently effective. In any effective mode, effective events and those currently expired are returned. In sequestered mode, no sequestered events are returned. In unsequestered mode, all events are returned.- Parameters:
locationId- a location- Returns:
- the returned
Eventlist - Throws:
NullArgumentException-locationIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEventsByLocationOnDate
EventList getEventsByLocationOnDate(Id locationId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets anEventListat the given location where the given date range falls within the event dates inclusive. 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 normalized mode, recurring events appear as a single event. In denormalized mode, each element in the recurring series appears as a separate event. In effective mode, events are returned that are currently effective. In any effective mode, effective events and those currently expired are returned. In sequestered mode, no sequestered events are returned. In unsequestered mode, all events are returned.- Parameters:
locationId- a locationfrom- start dateto- end date- Returns:
- the returned
Eventlist - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-locationId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEventsByLocationInDateRange
EventList getEventsByLocationInDateRange(Id locationId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets anEventListthat fall within the given range inclusive at the given location. 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 normalized mode, recurring events appear as a single event. In denormalized mode, each element in the recurring series appears as a separate event. In effective mode, events are returned that are currently effective. In any effective mode, effective events and those currently expired are returned. In sequestered mode, no sequestered events are returned. In unsequestered mode, all events are returned.- Parameters:
locationId- a locationfrom- start dateto- end date- Returns:
- the returned
Eventlist - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-locationId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEventsBySponsor
EventList getEventsBySponsor(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets a list of events with the given sponsor. 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 normalized mode, recurring events appear as a single event. In denormalized mode, each element in the recurring series appears as a separate event. In effective mode, events are returned that are currently effective. In any effective mode, effective events and those currently expired are returned. In sequestered mode, no sequestered events are returned. In unsequestered mode, all events are returned.- Parameters:
resourceId- a sponsor- Returns:
- the returned
Eventlist - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEventsBySponsorOnDate
EventList getEventsBySponsorOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets anEventListwith the given sponsor where the given date range falls within the event dates inclusive. 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 normalized mode, recurring events appear as a single event. In denormalized mode, each element in the recurring series appears as a separate event. In effective mode, events are returned that are currently effective. In any effective mode, effective events and those currently expired are returned. In sequestered mode, no sequestered events are returned. In unsequestered mode, all events are returned.- Parameters:
resourceId- a sponsorfrom- start dateto- end date- Returns:
- the returned
Eventlist - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-resourceId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEventsBySponsorInDateRange
EventList getEventsBySponsorInDateRange(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets anEventListthat fall within the given range inclusive at the given location. 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 normalized mode, recurring events appear as a single event. In denormalized mode, each element in the recurring series appears as a separate event. In effective mode, events are returned that are currently effective. In any effective mode, effective events and those currently expired are returned. In sequestered mode, no sequestered events are returned. In unsequestered mode, all events are returned.- Parameters:
resourceId- a sponsorfrom- start dateto- end date- Returns:
- the returned
Eventlist - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-resourceId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEvents
Gets allEvents. 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 normalized mode, recurring events appear as a single event. In denormalized mode, each element in the recurring series appears as a separate event. In effective mode, events are returned that are currently effective. In any effective mode, effective events and those currently expired are returned. In sequestered mode, no sequestered events are returned. In unsequestered mode, all events are returned.- Returns:
- an
EventList - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-