Interface TodoNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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.
Like all OsidSessions, TodoNotificationSessions are
dedicated to single processing threads and a single authenticated user.
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeTodoNotification(Id notificationId) Acknowledge a todo notification.booleanTests if this user can register forTodonotifications.Gets theChecklistassociated with this session.Gets theChecklistIdassociated with this session.voidregisterForChangedTodo(Id todoId) Registers for notification of an updated todo.voidTodoReceiver.changedChildOfTodos()is invoked when a node experiences a change in its children.voidRegisters for notification of an updated toto hierarchy structure.voidRegisters for notification of an updated todo hierarchy structure.voidRegisters for notification of updated todos.voidregisterForDeletedTodo(Id todoId) Registers for notification of a deleted todo.voidRegisters for notification of deleted todos.voidRegister for notifications of new todos.voidReliable notifications are desired.voidUnreliable notifications are desired.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatTypes, getLocales, isAuthenticated, startTransaction, supportsTransactions
-
Method Details
-
getChecklistId
Id getChecklistId()Gets theChecklistIdassociated with this session.- Returns:
- the
Checklist Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getChecklist
Gets theChecklistassociated with this session.- Returns:
- the checklist
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRegisterForTodoNotifications
boolean canRegisterForTodoNotifications()Tests if this user can register forTodonotifications. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer notification operations.- Returns:
falseif notification methods are not authorized,trueotherwise- 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 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 must be implemented.
-
reliableTodoNotifications
void reliableTodoNotifications()Reliable notifications are desired. In reliable mode, notifications are to be acknowledged usingacknowledgeTodoNotification().- Compliance:
mandatory- This method must be implemented.
-
unreliableTodoNotifications
void unreliableTodoNotifications()Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.- Compliance:
mandatory- This method must be implemented.
-
acknowledgeTodoNotification
void acknowledgeTodoNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge a todo notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewTodos
Register for notifications of new todos.TodoReceiver.newTodos()is invoked when a newTodois created.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedTodos
Registers for notification of updated todos.TodoReceiver.changedTodos()is invoked when a todo is changed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedTodo
Registers for notification of an updated todo.TodoReceiver.changedTodos()is invoked when the specified todo is changed.- Parameters:
todoId- theIdof theTodoto monitor- Throws:
NullArgumentException-todoIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedTodos
Registers for notification of deleted todos.TodoReceiver.deletedTodos()is invoked when a todo is deleted.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedTodo
Registers for notification of a deleted todo.TodoReceiver.deletedTodos()is invoked when the specified todo is deleted.- Parameters:
todoId- theIdof theTodoto monitor- Throws:
NullArgumentException-todoIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedTodoHierarchy
TodoReceiver.changedChildOfTodos()is invoked when a node experiences a change in its children.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- 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- theIdof theTodonode to monitor- Throws:
NullArgumentException-todoIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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- theIdof theTodonode to monitor- Throws:
NullArgumentException-todoIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-