public interface BookNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Book
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 Book
object itself. Adding and removing comments result in notifications
available from the notification session for comments.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForBookNotifications()
Tests if this user can register for
Book notifications. |
void |
registerForChangedBook(Id bookId)
Registers for notification of an updated book.
|
void |
registerForChangedBooks()
Registers for notification of updated books.
|
void |
registerForDeletedBook(Id bookId)
Registers for notification of a deleted book.
|
void |
registerForDeletedBookAncestors(Id bookId)
Registers for notification of an updated hierarchy structure that
removes an ancestor of the specified book
BookReceiver.deletedAncestor() is invoked when the specified
book node loses an ancestor. |
void |
registerForDeletedBookDescendants(Id bookId)
Registers for notification of an updated hierarchy structure that
removes a descendant of the specified book.
|
void |
registerForDeletedBooks()
Registers for notification of deleted books.
|
void |
registerForNewBookAncestors(Id bookId)
Registers for notification of an updated hierarchy structure that
introduces a new ancestor of the specified book.
|
void |
registerForNewBookDescendants(Id bookId)
Registers for notification of an updated hierarchy structure that
introduces a new descendant of the specified book.
|
void |
registerForNewBooks()
Register for notifications of new books.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canRegisterForBookNotifications()
Book
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. false
if notification methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void registerForNewBooks() throws OperationFailedException, PermissionDeniedException
BookReceiver.newBook()
is invoked when a new Book
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewBookAncestors(Id bookId) throws OperationFailedException, PermissionDeniedException
BookReceiver.newAncestorBook()
is invoked when the specified
book node gets a new ancestor.bookId
- the Id
of the Book
node
to monitorNullArgumentException
- bookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewBookDescendants(Id bookId) throws OperationFailedException, PermissionDeniedException
BookReceiver.newDescendantBook()
is invoked when the specified
book node gets a new descendant.bookId
- the Id
of the Book
node
to monitorNullArgumentException
- bookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedBooks() throws OperationFailedException, PermissionDeniedException
BookReceiver.changedBook()
is invoked when a book is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedBook(Id bookId) throws OperationFailedException, PermissionDeniedException
BookReceiver.changedBook()
is invoked when the specified book
is changed.bookId
- the Id
of the Book
to
monitorNullArgumentException
- bookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedBooks() throws OperationFailedException, PermissionDeniedException
BookReceiver.deletedBook()
is invoked when a book is deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedBook(Id bookId) throws OperationFailedException, PermissionDeniedException
BookReceiver.deletedBook()
is invoked when the specified book
is deleted.bookId
- the Id
of the Book
to
monitorNullArgumentException
- bookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedBookAncestors(Id bookId) throws OperationFailedException, PermissionDeniedException
BookReceiver.deletedAncestor()
is invoked when the specified
book node loses an ancestor.bookId
- the Id
of the Book
to
monitorNullArgumentException
- bookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedBookDescendants(Id bookId) throws OperationFailedException, PermissionDeniedException
BookReceiver.deletedDescendant()
is invoked when the specified
book node loses a descendant.bookId
- the Id
of the Book
to
monitorNullArgumentException
- bookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.