Interface GradeEntryNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface GradeEntryNotificationSession extends OsidSession

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

The views defined in this session correspond to the views in the GradeEntryLookupSession .

  • 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.
    • canRegisterForGradeEntryNotifications

      boolean canRegisterForGradeEntryNotifications()
      Tests if this user can register for GradeEntry 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 entries 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.
    • reliableGradeEntryNotifications

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

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

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

      void registerForNewGradeEntries() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new grade entries. GradeEntryReceiver.newGradeEntries() is invoked when a new grade entry is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewGradeEntriesForGradebookColumn

      void registerForNewGradeEntriesForGradebookColumn(Id gradebookColumnId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a new grade entry for the specified gradebook column. GradeEntryReceiver.newGradeEntries() is invoked when a new entry for the resource is created.
      Parameters:
      gradebookColumnId - the Id of the GradebookColumn to monitor
      Throws:
      NullArgumentException - gradebookColumnId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewGradeEntriesForResource

      void registerForNewGradeEntriesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a new grade entry for the specified resource. GradeEntryReceiver.newGradeEntries() is invoked when a new entry for the resource is created.
      Parameters:
      resourceId - the Id of the Resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewGradeEntriesByGrader

      void registerForNewGradeEntriesByGrader(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a new grade entry for the specified grader agent. GradeEntryReceiver.newGradeEntries() is invoked when a new entry for the grader is created.
      Parameters:
      resourceId - the Id of the Agent to monitor
      Throws:
      NullArgumentException - agentId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedGradeEntries

      void registerForChangedGradeEntries() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated grade entries. GradeEntryReceiver.changedGradeEntries() is invoked when a grade entry is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedGradeEntriesForGradebookColumn

      void registerForChangedGradeEntriesForGradebookColumn(Id gradebookColumnId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated grade entry for the specified gradebook column. GradeEntryReceiver.changedGradeEntries() is invoked when an entry for the column is updated.
      Parameters:
      gradebookColumnId - the Id of the GradebookColumn to monitor
      Throws:
      NullArgumentException - gradebookColumnId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedGradeEntriesForResource

      void registerForChangedGradeEntriesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated grade entry for the specified key resource. GradeEntryReceiver.changedGradeEntries() is invoked when an entry for the resource is updated.
      Parameters:
      resourceId - the Id of the Resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedGradeEntriesByGrader

      void registerForChangedGradeEntriesByGrader(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated grade entry for the specified grader. GradeEntryReceiver.changedGradeEntries() is invoked when an entry for the agent is updated.
      Parameters:
      resourceId - the Id of the Agent to monitor
      Throws:
      NullArgumentException - agentId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedGradeEntry

      void registerForChangedGradeEntry(Id gradeEntryId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated grade entry. GradeEntryReceiver.changedGradeEntries() is invoked when the specified grade entry is changed.
      Parameters:
      gradeEntryId - the Id of the GradeEntry to monitor
      Throws:
      NullArgumentException - gradeEntryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedGradeEntries

      void registerForDeletedGradeEntries() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted grade entries. GradeEntryReceiver.deletedGradeEntries() is invoked when a grade entry is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedGradeEntriesForGradebookColumn

      void registerForDeletedGradeEntriesForGradebookColumn(Id gradebookColumnId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted grade entry for the specified gradebook column. GradeEntryReceiver.changedGradeEntries() is invoked when an entry for the column is removed from this gradebook.
      Parameters:
      gradebookColumnId - the Id of the GradebookColumn to monitor
      Throws:
      NullArgumentException - gradebookColumnId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedGradeEntriesForResource

      void registerForDeletedGradeEntriesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted grade entry for the specified key resource. GradeEntryReceiver.changedGradeEntries() is invoked when an entry for the resource is removed from this gradebook.
      Parameters:
      resourceId - the Id of the Resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedGradeEntriesByGrader

      void registerForDeletedGradeEntriesByGrader(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted grade entry for the specified grader. GradeEntryReceiver.changedGradeEntries() is invoked when an entry for the agent is removed from this gradebook.
      Parameters:
      resourceId - the Id of the Agent to monitor
      Throws:
      NullArgumentException - agentId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedGradeEntry

      void registerForDeletedGradeEntry(Id gradeEntryId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted grade entry. GradeEntryReceiver.deletedGradeEntries() is invoked when the specified entry is deleted.
      Parameters:
      gradeEntryId - the Id of the GradeEntry to monitor
      Throws:
      NullArgumentException - gradeEntryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.