Interface ObjectiveNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ObjectiveNotificationSession extends OsidSession

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

  • Method Details

    • getObjectiveBankId

      Id getObjectiveBankId()
      Gets the ObjectiveBank Id associated with this session.
      Returns:
      the ObjectiveBank Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getObjectiveBank

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

      boolean canRegisterForObjectiveNotifications()
      Tests if this user can register for Objective 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.
    • useFederatedObjectiveBankView

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

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

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

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

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

      void registerForNewObjectives() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new objectives. ObjectiveReceiver.newObjectives() is invoked when a new objective is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedObjectives

      void registerForChangedObjectives() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated objectives. ObjectiveReceiver.changedObjectives() is invoked when an objective is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedObjective

      void registerForChangedObjective(Id objectiveId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated objective. ObjectiveReceiver.changedObjectives() is invoked when the specified objective is changed.
      Parameters:
      objectiveId - the Id of the Objective to monitor
      Throws:
      NullArgumentException - objectiveId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedObjectives

      void registerForDeletedObjectives() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted objectives. ObjectiveReceiver.deletedObjectives() is invoked when an objective is removed from this objective bank.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedObjective

      void registerForDeletedObjective(Id objectiveId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted objective. ObjectiveReceiver.changedObjectives() is invoked when the specified objective is removed from this objective bank.
      Parameters:
      objectiveId - the Id of the Objective to monitor
      Throws:
      NullArgumentException - objectiveid is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedObjectiveHierarchy

      void registerForChangedObjectiveHierarchy() throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated objective hierarchy structure. ObjectiveReceiver.changedChildOfObjectives() 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.
    • registerForChangedObjectiveHierarchyForAncestors

      void registerForChangedObjectiveHierarchyForAncestors(Id objectiveId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated objective hierarchy structure. ObjectiveReceiver.changedChildOfObjectives() is invoked when the specified node or any of its ancestors experiences a change in its children.
      Parameters:
      objectiveId - the Id of the Objective node to monitor
      Throws:
      NullArgumentException - objectiveId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedObjectiveHierarchyForDescendants

      void registerForChangedObjectiveHierarchyForDescendants(Id objectiveId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated objective hierarchy structure. ObjectiveReceiver.changedChildOfObjectives() is invoked when the specified node or any of its descendants experiences a change in its children.
      Parameters:
      objectiveId - the Id of the Objective node to monitor
      Throws:
      NullArgumentException - objectiveId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.