Interface AcademyNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AcademyNotificationSession extends OsidSession

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

Notifications are triggered with changes to the Academy object itself. Adding and removing conferrals result in notifications available from the notification session for conferrals.

  • Method Details

    • canRegisterForAcademyNotifications

      boolean canRegisterForAcademyNotifications()
      Tests if this user can register for Academy 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.
    • reliableAcademyNotifications

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

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

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

      void registerForNewAcademies() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new academies. AcademyReceiver.newAcademies() is invoked when a new Academy is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedAcademies

      void registerForChangedAcademies() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated academies. AcademyReceiver.changedAcademies() is invoked when an academy is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedAcademy

      void registerForChangedAcademy(Id academyId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated academy. AcademyReceiver.changedAcademies() is invoked when the specified academy is changed.
      Parameters:
      academyId - the Id of the Academy to monitor
      Throws:
      NullArgumentException - academyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedAcademies

      void registerForDeletedAcademies() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted academies. AcademyReceiver.deletedAcademies() is invoked when an academy is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedAcademy

      void registerForDeletedAcademy(Id academyId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted academy. AcademyReceiver.deletedAcademies() is invoked when the specified academy is deleted.
      Parameters:
      academyId - the Id of the Academy to monitor
      Throws:
      NullArgumentException - academyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedAcademyHierarchy

      void registerForChangedAcademyHierarchy() throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated academy hierarchy structure. AcademyReceiver.changedChildOfAcademies() 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.
    • registerForChangedAcademyHierarchyForAncestors

      void registerForChangedAcademyHierarchyForAncestors(Id academyId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated academy hierarchy structure. AcademyReceiver.changedChildOfAcademies() is invoked when a node experiences a change in its children.
      Parameters:
      academyId - the Id of the Academy node to monitor
      Throws:
      NullArgumentException - academyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedAcademyHierarchyForDescendants

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