public interface CommentNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Comment 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.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRegisterForCommentNotifications()
Tests if this user can register for
Comment
notifications. |
Book |
getBook()
Gets the
Book associated with this session. |
Id |
getBookId()
Gets the
Book Id associated with this
session. |
void |
registerForChangedComment(Id commentId)
Registers for notification of an updated comment.
|
void |
registerForChangedComments()
Registers for notification of updated comments.
|
void |
registerForChangedCommentsForCommentor(Id resourceId)
Register for notifications of changed comments by the given resource
Id. |
void |
registerForChangedCommentsForReference(Id referenceId)
Register for notifications of changed comments for the given reference
Id. |
void |
registerForDeletedComment(Id commentId)
Registers for notification of a deleted comment.
|
void |
registerForDeletedComments()
Registers for notification of deleted comments.
|
void |
registerForDeletedCommentsForCommentor(Id resourceId)
Register for notifications of deleted comments by the given resource
Id. |
void |
registerForDeletedCommentsForReference(Id referenceId)
Register for notifications of deleted comments for the given reference
Id. |
void |
registerForNewComments()
Register for notifications of new comments.
|
void |
registerForNewCommentsForCommentor(Id resourceId)
Register for notifications of new comments by the given resource
Id. |
void |
registerForNewCommentsForReference(Id referenceId)
Register for notifications of new comments for the given reference
Id. |
void |
useFederatedBookView()
Federates the view for methods in this session.
|
void |
useIsolatedBookView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getBookId()
Book Id associated with this
session. Book Id associated with this sessionmandatory - This method must be implemented. Book getBook() throws OperationFailedException, PermissionDeniedException
Book associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canRegisterForCommentNotifications()
Comment
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 useFederatedBookView()
mandatory - This method is must be implemented. void useIsolatedBookView()
mandatory - This method is must be implemented. void registerForNewComments()
throws OperationFailedException,
PermissionDeniedException
CommentReceiver.newComment() is invoked when a new
Comment is created.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForNewCommentsForCommentor(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id. CommentReceiver.newComment() is
invoked when a new Comment is created.resourceId - the Id of the resource to monitorNullArgumentException - resourceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForNewCommentsForReference(Id referenceId) throws OperationFailedException, PermissionDeniedException
Id. CommentReceiver.newComment() is
invoked when a new Comment is created.referenceId - the Id of the reference to monitorNullArgumentException - referenceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedComments()
throws OperationFailedException,
PermissionDeniedException
CommentReceiver.changedComment() is invoked when a comment is
changed.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedCommentsForCommentor(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id. CommentReceiver.changedComment() is
invoked when a Comment by the resource is changed.resourceId - the Id of the resource to monitorNullArgumentException - resourceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedCommentsForReference(Id referenceId) throws OperationFailedException, PermissionDeniedException
Id. CommentReceiver.changedComment() is
invoked when a Comment for the reference is changed.referenceId - the Id of the reference to monitorNullArgumentException - referenceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedComment(Id commentId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CommentReceiver.changedComment() is invoked when the specified
comment is changed.commentId - the Id of the Comment
to monitorNotFoundException - a comment was not found identified
by the given Id NullArgumentException - commentId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedComments()
throws OperationFailedException,
PermissionDeniedException
CommentReceiver.deletedComment() is invoked when a comment is
deleted.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedCommentsForCommentor(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id. CommentReceiver.deletedComment() is
invoked when a Comment by the resource is deleted.resourceId - the Id of the resource to monitorNullArgumentException - resourceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedCommentsForReference(Id referenceId) throws OperationFailedException, PermissionDeniedException
Id. CommentReceiver.deletedComment() is
invoked when a Comment for the reference is deleted.referenceId - the Id of the reference to monitorNullArgumentException - referenceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedComment(Id commentId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CommentReceiver.deletedComment() is invoked when the specified
comment is deleted.commentId - the Id of the Comment
to monitorNotFoundException - a comment was not found identified
by the given Id NullArgumentException - commentId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.