Interface CalendarNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CalendarNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to Calendar objects. This session is intended for consumers needing to synchronize their state with this service without the use of polling. Notifications are cancelled when this session i

  • Method Details

    • canRegisterForCalendarNotifications

      boolean canRegisterForCalendarNotifications()
      Tests if this user can register for Calendar notifications. 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 notification operations.
      Returns:
      false if notification methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • reliableCalendarNotifications

      void reliableCalendarNotifications()
      Reliable notifications are desired. In reliable mode, notifications are to be acknowledged using acknowledgeCalendarNotification() .
      Compliance:
      mandatory - This method is must be implemented.
    • unreliableCalendarNotifications

      void unreliableCalendarNotifications()
      Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.
      Compliance:
      mandatory - This method is must be implemented.
    • acknowledgeCalendarNotification

      void acknowledgeCalendarNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
      Acknowledge a clendar notification.
      Parameters:
      notificationId - the Id of the notification
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewCalendars

      void registerForNewCalendars() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new calendars. CalendarReceiver.newCalendars() is invoked when a new Calendar is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedCalendars

      void registerForChangedCalendars() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated calendars. CalendarReceiver.changedCalendars() is invoked when a calendar is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedCalendar

      void registerForChangedCalendar(Id calendarId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated calendar. CalendarReceiver.changedCalendars() is invoked when the specified calendar is changed.
      Parameters:
      calendarId - the Id of the calendar to monitor
      Throws:
      NullArgumentException - calendarId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedCalendars

      void registerForDeletedCalendars() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted calendars. CalendarReceiver.deletedCalendars() is invoked when a calenedar is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedCalendar

      void registerForDeletedCalendar(Id calendarId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted calendar. CalendarReceiver.deletedCalendars() is invoked when the specified calendar is deleted.
      Parameters:
      calendarId - the Id of the calendar to monitor
      Throws:
      NullArgumentException - calendarId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedCalendarHierarchy

      void registerForChangedCalendarHierarchy() throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated calendar hierarchy structure. CalendarReceiver.changedChildOfCalendars() is invoked when a node experiences a change in its children.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedCalendarHierarchyForAncestors

      void registerForChangedCalendarHierarchyForAncestors(Id calendarId) throws OperationFailedException, PermissionDeniedException
      Calendar Receiver.changedChildOfCalendars() is invoked when the specified node or any of its ancestors experiences a change in its children.
      Parameters:
      calendarId - the Id of the Calendar node to monitor
      Throws:
      NullArgumentException - calendarId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedCalendarHierarchyForDescendants

      void registerForChangedCalendarHierarchyForDescendants(Id calendarId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated calendar hierarchy structure. CalendarReceiver.changedChildOfCalendars() is invoked when the specified node or any of its descendants experiences a change in its children.
      Parameters:
      calendarId - the Id of the Calendar node to monitor
      Throws:
      NullArgumentException - calendarId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.