Interface GradebookNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface GradebookNotificationSession extends OsidSession

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

  • Method Details

    • canRegisterForGradebookNotifications

      boolean canRegisterForGradebookNotifications()
      Tests if this user can register for Gradebook 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.
    • reliableGradebookNotifications

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

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

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

      void registerForNewGradebooks() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new gradebooks. GradebookReceiver.newGradebooks() is invoked when a new Gradebook is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedGradebooks

      void registerForChangedGradebooks() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated gradebooks. GradebookReceiver.changedGradebooks() is invoked when a gradebook is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedGradebook

      void registerForChangedGradebook(Id gradebookId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated gradebook. GradebookReceiver.changedGradebooks() is invoked when the specified gradebook is changed.
      Parameters:
      gradebookId - the Id of the gradebook to monitor
      Throws:
      NullArgumentException - gradebookId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedGradebooks

      void registerForDeletedGradebooks() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted gradebooks. GradebookReceiver.deletedGradebooks() is invoked when a calenedar is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedGradebook

      void registerForDeletedGradebook(Id gradebookId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted gradebook. GradebookReceiver.deletedGradebooks() is invoked when the specified gradebook is deleted.
      Parameters:
      gradebookId - the Id of the gradebook to monitor
      Throws:
      NullArgumentException - gradebookId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedGradebookHierarchy

      void registerForChangedGradebookHierarchy() throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated gradebook hierarchy structure. GradebookReceiver.changedChildOfGradebooks() 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.
    • registerForChangedGradebookHierarchyForAncestors

      void registerForChangedGradebookHierarchyForAncestors(Id gradebookId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated gradebook hierarchy structure. GradebookReceiver.changedChildOfGradebooks() is invoked when a node experiences a change in its ancestors.
      Parameters:
      gradebookId - the Id of the Gradebook node to monitor
      Throws:
      NullArgumentException - gradebookId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedGradebookHierarchyForDescendants

      void registerForChangedGradebookHierarchyForDescendants(Id gradebookId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated gradebook hierarchy structure. GradebookReceiver.changedChildOfGradebooks() is invoked when a node experiences a change in its children.
      Parameters:
      gradebookId - the Id of the Gradebook node to monitor
      Throws:
      NullArgumentException - gradebookId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.