Interface GradeNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface GradeNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to Grades in this Gradebook . This also includes existing grades that may appear or disappear due to changes in the Gradebook hiera rchy, 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.

The two views defined in this session correspond to the views in the GradeLookupSession.

  • 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
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canRegisterForGradeNotifications

      boolean canRegisterForGradeNotifications()
      Tests if this user can register for Grade 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 grades 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.
    • reliableGradeNotifications

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

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

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

      void registerForNewGrades() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new grades. GradeReceiver.newGrades() is invoked when a new Grade appears in this gradebook.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewGradesForGradeSystem

      void registerForNewGradesForGradeSystem(Id gradeSystemId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new grades for the given grade system. GradeReceiver.newGrades() is invoked when a new Grade appears in this gradebook.
      Parameters:
      gradeSystemId - the Id of the GradeSystem to monitor
      Throws:
      NullArgumentException - gradeSystemId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedGrades

      void registerForChangedGrades() throws OperationFailedException, PermissionDeniedException
      Register for notifications of updated grades. GradeReceiver.changedGrades() is invoked when a Grade in this gradebook is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedGradesForGradeSystem

      void registerForChangedGradesForGradeSystem(Id gradeSystemId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of updated grades for the given grade system. GradeReceiver.changedGrades() is invoked when a Grade in this gradebook is changed.
      Parameters:
      gradeSystemId - the Id of the GradeSystem to monitor
      Throws:
      NullArgumentException - gradeSystemId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedGrade

      void registerForChangedGrade(Id gradeId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of an updated grade. GradeReceiver.changedGrades() is invoked when the specified Grade in this gradebook is changed.
      Parameters:
      gradeId - the Id of the Grade to monitor
      Throws:
      NullArgumentException - gradeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedGrades

      void registerForDeletedGrades() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted grades. GradeReceiver.deletedGrades() is invoked when a grade is deleted or removed from this gradebook.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedGradesForGradeSystem

      void registerForDeletedGradesForGradeSystem(Id gradeSystemId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted grades for the given grade system. GradeReceiver.deletedGrades() is invoked when a Grade in this gradebook is deleted or removed.
      Parameters:
      gradeSystemId - the Id of the GradeSystem to monitor
      Throws:
      NullArgumentException - gradeSystemId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedGrade

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