Interface EventLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface EventLookupSession extends 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 Details

    • getCalendarId

      Id getCalendarId()
      Gets the Calendar Id associated with this session.
      Returns:
      the Calendar Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCalendar

      Gets the Calendar associated with this session.
      Returns:
      the Calendar associated with this session
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canLookupEvents

      boolean canLookupEvents()
      Tests if this user can perform Event lookups. 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 a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
      Returns:
      false if lookup methods are not authorized, true otherwise
      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 the Event returns 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 single Event to 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 of Events .
      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

      Gets the Event specified by its Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Event may have a different Id than requested, such as the case where a duplicate Id was assigned to an Event and 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 - Id of the Event
      Returns:
      the event
      Throws:
      NotFoundException - eventId not found
      NullArgumentException - eventId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getEventsByIds

      Gets an EventList corresponding to the given IdList . In plenary mode, the returned list contains all of the events specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible Events may 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 of Ids to retrieve
      Returns:
      the returned Event list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - eventIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getEventsByGenusType

      EventList getEventsByGenusType(Type eventGenusType) throws OperationFailedException, PermissionDeniedException
      Gets an EventList corresponding to the given event genus Type which does not include events of genus types derived from the specified Type . 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 Event list
      Throws:
      NullArgumentException - eventGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getEventsByParentGenusType

      EventList getEventsByParentGenusType(Type eventGenusType) throws OperationFailedException, PermissionDeniedException
      Gets an EventList corresponding to the given event genus Type and include any additional event with genus types derived from the specified Type . 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 Event list
      Throws:
      NullArgumentException - eventGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getEventsByRecordType

      EventList getEventsByRecordType(Type eventRecordType) throws OperationFailedException, PermissionDeniedException
      Gets an EventList containing the given event record Type . 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 Event list
      Throws:
      NullArgumentException - eventRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getEventsOnDate

      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 date
      to - ending date
      Returns:
      the returned Event list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getEventsInDateRange

      Gets an EventList that 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 date
      to - end date
      Returns:
      the returned Event list
      Throws:
      InvalidArgumentException - to is less than from
      NullArgumentException - from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getUpcomingEvents

      EventList getUpcomingEvents(long number) throws OperationFailedException, PermissionDeniedException
      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 Event list
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 Event list
      Throws:
      NullArgumentException - locationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getEventsByLocationOnDate

      EventList getEventsByLocationOnDate(Id locationId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets an EventList at 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 location
      from - start date
      to - end date
      Returns:
      the returned Event list
      Throws:
      InvalidArgumentException - to is less than from
      NullArgumentException - locationId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getEventsByLocationInDateRange

      EventList getEventsByLocationInDateRange(Id locationId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets an EventList that 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 location
      from - start date
      to - end date
      Returns:
      the returned Event list
      Throws:
      InvalidArgumentException - to is less than from
      NullArgumentException - locationId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 Event list
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getEventsBySponsorOnDate

      EventList getEventsBySponsorOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets an EventList with 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 sponsor
      from - start date
      to - end date
      Returns:
      the returned Event list
      Throws:
      InvalidArgumentException - to is less than from
      NullArgumentException - resourceId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getEventsBySponsorInDateRange

      EventList getEventsBySponsorInDateRange(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets an EventList that 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 sponsor
      from - start date
      to - end date
      Returns:
      the returned Event list
      Throws:
      InvalidArgumentException - to is less than from
      NullArgumentException - resourceId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getEvents

      Gets all Events . 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 request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.