Interface AssessmentNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AssessmentNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to Assessment objects in this Bank . 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 AssessmentLookupSession .

  • Method Details

    • getBankId

      Id getBankId()
      Gets the Bank Id associated with this session.
      Returns:
      the Bank Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getBank

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

      boolean canRegisterForAssessmentNotifications()
      Tests if this user can register for Assessment 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.
    • useFederatedBankView

      void useFederatedBankView()
      Federates the view for methods in this session. A federated view will include notifications for assessments in banks which are children of this bank in the bank hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedBankView

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

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

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

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

      void registerForNewAssessments() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new assessments. AssessmentReceiver.newAssessments() is invoked when a new Assessment appears in this assessment bank.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedAssessments

      void registerForChangedAssessments() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated assessments. AssessmentReceiver.changedAssessments() is invoked when an assessment in this assessment bank is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedAssessment

      void registerForChangedAssessment(Id assessmentId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated assessment. AssessmentReceiver.changedAssessments() is invoked when the specified assessment in this assessment bank is changed.
      Parameters:
      assessmentId - the Id of the Assessment to monitor
      Throws:
      NullArgumentException - assessmentId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedAssessments

      void registerForDeletedAssessments() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted assessments. AssessmentReceiver.deletedAssessments() is invoked when an assessment is removed from this assessment bank.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedAssessment

      void registerForDeletedAssessment(Id assessmentId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted assessment. AssessmentReceiver.deletedAssessments() is invoked when the specified assessment is removed from this assessment bank.
      Parameters:
      assessmentId - the Id of the Assessment to monitor
      Throws:
      NullArgumentException - assessmentId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.