Interface GradeSystemNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface GradeSystemNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to GradeSystems and the Grades defined within.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.

  • Method Details

    • getGradebookId

      Id getGradebookId()
      Gets the Gradebook Id associated with this session.
      Returns:
      the Gradebook Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getGradebook

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

      boolean canRegisterForGradeSystemNotifications()
      Tests if this user can register for GradeSystem 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.
    • useFederatedGradebookView

      void useFederatedGradebookView()
      Federates the view for methods in this session. A federated view will include notifications for grade systems in gradebooks which are children of this gradebook in the gradebook hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedGradebookView

      void useIsolatedGradebookView()
      Isolates the view for methods in this session. An isolated view restricts notifications to this gradebook only.
      Compliance:
      mandatory - This method is must be implemented.
    • reliableGradeSystemNotifications

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

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

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

      void registerForNewGradeSystems() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new grade systems. GradeSystemReceiver.newGradeSystems() is invoked when a new GradeSystem is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedGradeSystems

      void registerForChangedGradeSystems() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated grade systems. GradeSystemReceiver.changedGradeSystems() is invoked when a system is changed or grades are changed within it.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedGradeSystem

      void registerForChangedGradeSystem(Id gradeSystemId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated grade system. GradeSystemReceiver.changedGradeSystems() is invoked when the specified grade system is changed or grades are changed within it.
      Parameters:
      gradeSystemId - the Id of the grade system to monitor
      Throws:
      NullArgumentException - gradeSystemId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedGradeSystems

      void registerForDeletedGradeSystems() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted grade systems. GradeSystemReceiver.deletedGradeSystems() is invoked when a grade system is removed from this gradebook.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedGradeSystem

      void registerForDeletedGradeSystem(Id gradeSystemId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted grade system. GradeSystemReceiver.deletedGradeSystems() is invoked when the specified system is removed from this gradebook.
      Parameters:
      gradeSystemId - the Id of the grade system to monitor
      Throws:
      NullArgumentException - gradeSystemId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.