Interface LessonNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface LessonNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to Lessons . 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 is closed.

Notifications are triggered with changes to the Lesson object itself. Adding and removing syllabi result in notifications available from the notification session for syllabi.

  • Method Details

    • getCourseCatalogId

      Id getCourseCatalogId()
      Gets the CourseCatalog Id associated with this session.
      Returns:
      the CourseCatalog Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCourseCatalog

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

      boolean canRegisterForLessonNotifications()
      Tests if this user can register for Lesson 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.
    • useFederatedCourseCatalogView

      void useFederatedCourseCatalogView()
      Federates the view for methods in this session. A federated view will include lessonsin course catalogs which are children of this course catalog in the course catalog hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedCourseCatalogView

      void useIsolatedCourseCatalogView()
      Isolates the view for methods in this session. An isolated view restricts retrievals to this course catalog only.
      Compliance:
      mandatory - This method is must be implemented.
    • reliableLessonNotifications

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

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

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

      void registerForNewLessons() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new lessons. LessonReceiver.newLessons() is invoked when a new Lesson is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewLessonsForPlan

      void registerForNewLessonsForPlan(Id planId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of new lessons of the given plan. LessonReceiver.newLessons() is invoked when a new Lesson is created.
      Parameters:
      planId - the Id of the Plan to monitor
      Throws:
      NullArgumentException - planId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewLessonsForDocet

      void registerForNewLessonsForDocet(Id docetId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of new lessons of the given docet. LessonReceiver.newLessons() is invoked when a new Lesson is created.
      Parameters:
      docetId - the Id of the Docet to monitor
      Throws:
      NullArgumentException - docetId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedLessons

      void registerForChangedLessons() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated lessons. LessonReceiver.changedLessons() is invoked when a lesson is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedLessonsForPlan

      void registerForChangedLessonsForPlan(Id planId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated lessons of the given plan. LessonReceiver.changedLessons() is invoked when a lesson is changed.
      Parameters:
      planId - the Id of the Plan to monitor
      Throws:
      NullArgumentException - planId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedLessonsForDocet

      void registerForChangedLessonsForDocet(Id docetId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated lessons of the given docet. LessonReceiver.changedLessons() is invoked when a lesson is changed.
      Parameters:
      docetId - the Id of the Docet to monitor
      Throws:
      NullArgumentException - docetId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedLesson

      void registerForChangedLesson(Id lessonId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated lesson. LessonReceiver.changedLessons() is invoked when the specified lesson in this course catalog is changed.
      Parameters:
      lessonId - the Id of the Lesson to monitor
      Throws:
      NullArgumentException - lessonId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedLessons

      void registerForDeletedLessons() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted lessons. LessonReceiver.deletedLesson() is invoked when a lesson is in this course catalog deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedLessonsForPlan

      void registerForDeletedLessonsForPlan(Id planId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted lessons of the given plan. LessonReceiver.deletedLessons() is invoked when a lesson in this course catalog is removed.
      Parameters:
      planId - the Id of the Plan to monitor
      Throws:
      NullArgumentException - planId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedLessonsForDocet

      void registerForDeletedLessonsForDocet(Id docetId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted lessons of the given docet. LessonReceiver.deletedLessons() is invoked when a lesson in this course catalog is removed.
      Parameters:
      docetId - the Id of the Docet to monitor
      Throws:
      NullArgumentException - docetId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedLesson

      void registerForDeletedLesson(Id lessonId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted lesson. LessonReceiver.deletedLessons() is invoked when the specified lesson is deleted.
      Parameters:
      lessonId - the Id of the Lesson to monitor
      Throws:
      NullArgumentException - lessonId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.