OSID Logo
OSID Specifications
commenting package
Version 3.1.0
Interfaceosid.commenting.CommentNotificationSession
Implementsosid.OsidSession
Used Byosid.commenting.CommentingManager
osid.commenting.CommentingProxyManager
Description

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

MethodgetBookId
Description

Gets the Book Id associated with this session.

Returnosid.id.Id the Book Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetBook
Description

Gets the Book associated with this session.

Returnosid.commenting.Book the book
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanRegisterForCommentNotifications
Description

Tests if this user can register for 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.

Returnboolean false if notification methods are not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethoduseFederatedBookView
Description

Federates the view for methods in this session. A federated view will include notifications for commentss in books which are children of this book in the book hierarchy.

Compliancemandatory This method is must be implemented.
MethoduseIsolatedBookView
Description

Isolates the view for methods in this session. An isolated view restricts notifications to this book only.

Compliancemandatory This method is must be implemented.
MethodreliableCommentNotifications
Description

Reliable notifications are desired. In reliable mode, notifications are to be acknowledged using acknowledgeCommentNotification().

Compliancemandatory This method is must be implemented.
MethodunreliableCommentNotifications
Description

Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.

Compliancemandatory This method is must be implemented.
MethodacknowledgeCommentNotification
Description

Acknowledge a comment notification.

Parametersosid.id.IdnotificationId the Id of the notification
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForNewComments
Description

Register for notifications of new comments. CommentReceiver.newComments() is invoked when a new Comment is created.

ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForNewCommentsForCommentor
Description

Register for notifications of new comments by the given resource Id. CommentReceiver.newComments() is invoked when a new Comment is created.

Parametersosid.id.IdresourceId the Id of the resource to monitor
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForNewCommentsForReference
Description

Register for notifications of new comments for the given reference Id. CommentReceiver.newComments() is invoked when a new Comment is created.

Parametersosid.id.IdreferenceId the Id of the reference to monitor
ErrorsNULL_ARGUMENT referenceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForChangedComments
Description

Registers for notification of updated comments. CommentReceiver.changedComments() is invoked when a comment is changed.

ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForChangedCommentsForCommentor
Description

Register for notifications of changed comments by the given resource Id. CommentReceiver.changedComments() is invoked when a Comment by the resource is changed.

Parametersosid.id.IdresourceId the Id of the resource to monitor
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForChangedCommentsForReference
Description

Register for notifications of changed comments for the given reference Id. CommentReceiver.changedComments() is invoked when a Comment for the reference is changed.

Parametersosid.id.IdreferenceId the Id of the reference to monitor
ErrorsNULL_ARGUMENT referenceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForChangedComment
Description

Registers for notification of an updated comment. CommentReceiver.changedComments() is invoked when the specified comment is changed.

Parametersosid.id.IdcommentId the Id of the Comment to monitor
ErrorsNOT_FOUND a comment was not found identified by the given Id
NULL_ARGUMENT commentId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForDeletedComments
Description

Registers for notification of deleted comments. CommentReceiver.deletedComments() is invoked when a comment is deleted.

ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForDeletedCommentsForCommentor
Description

Register for notifications of deleted comments by the given resource Id. CommentReceiver.deletedComments() is invoked when a Comment by the resource is deleted.

Parametersosid.id.IdresourceId the Id of the resource to monitor
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForDeletedCommentsForReference
Description

Register for notifications of deleted comments for the given reference Id. CommentReceiver.deletedComments() is invoked when a Comment for the reference is deleted.

Parametersosid.id.IdreferenceId the Id of the reference to monitor
ErrorsNULL_ARGUMENT referenceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForDeletedComment
Description

Registers for notification of a deleted comment. CommentReceiver.deletedComments() is invoked when the specified comment is deleted.

Parametersosid.id.IdcommentId the Id of the Comment to monitor
ErrorsNOT_FOUND a comment was not found identified by the given Id
NULL_ARGUMENT commentId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.