Interface TodoNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface TodoNotificationSession extends OsidSession

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

    • getChecklistId

      Id getChecklistId()
      Gets the Checklist Id associated with this session.
      Returns:
      the Checklist Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getChecklist

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

      boolean canRegisterForTodoNotifications()
      Tests if this user can register for Todo 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.
    • useFederatedChecklistView

      void useFederatedChecklistView()
      Federates the view for methods in this session. A federated view will include notifications for todoss in checklists which are children of this checklist in the checklist hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedChecklistView

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

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

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

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

      void registerForNewTodos() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new todos. TodoReceiver.newTodos() is invoked when a new Todo is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedTodos

      void registerForChangedTodos() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated todos. TodoReceiver.changedTodos() is invoked when a todo is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedTodo

      void registerForChangedTodo(Id todoId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated todo. TodoReceiver.changedTodos() is invoked when the specified todo is changed.
      Parameters:
      todoId - the Id of the Todo to monitor
      Throws:
      NullArgumentException - todoId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedTodos

      void registerForDeletedTodos() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted todos. TodoReceiver.deletedTodos() is invoked when a todo is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedTodo

      void registerForDeletedTodo(Id todoId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted todo. TodoReceiver.deletedTodos() is invoked when the specified todo is deleted.
      Parameters:
      todoId - the Id of the Todo to monitor
      Throws:
      NullArgumentException - todoId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedTodoHierarchy

      void registerForChangedTodoHierarchy() throws OperationFailedException, PermissionDeniedException
      Todo Receiver.changedChildOfTodos() 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.
    • registerForChangedTodoHierarchyForAncestors

      void registerForChangedTodoHierarchyForAncestors(Id todoId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated toto hierarchy structure. TodoReceiver.changedChildOfTodos() is invoked when the specified node or any of its ancestors experiences a change in its children.
      Parameters:
      todoId - the Id of the Todo node to monitor
      Throws:
      NullArgumentException - todoId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedTodoHierarchyForDescendants

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