OSID Logo
OSID Specifications
commenting package
Version 3.0.0
Release Candidate Preview
Interfaceosid.commenting.CommentNotificationSession
Implementsosid.OsidSession
Description

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.

MethodgetBookId
Description

Gets the Book Id associated with this session.

Returnosid.id.Idthe Book Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetBook
Description

Gets the Book associated with this session.

Returnosid.commenting.Bookthe book
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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
CompliancemandatoryThis 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.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedBookView
Description

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

CompliancemandatoryThis method is must be implemented.
MethodreliableCommentNotifications
Description

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

CompliancemandatoryThis method is must be implemented.
MethodunreliableCommentNotifications
Description

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

CompliancemandatoryThis method is must be implemented.
MethodacknowledgeCommentNotification
Description

Acknowledge a comment notification.

Parametersosid.id.IdnotificationIdthe Id of the notification
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForNewComments
Description

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

ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.IdresourceIdthe Id of the resource to monitor
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.IdreferenceIdthe Id of the reference to monitor
ErrorsNULL_ARGUMENT referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForChangedComments
Description

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

ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.IdresourceIdthe Id of the resource to monitor
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.IdreferenceIdthe Id of the reference to monitor
ErrorsNULL_ARGUMENT referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.IdcommentIdthe Id of the Comment to monitor
ErrorsNOT_FOUNDa comment was not found identified by the given Id
NULL_ARGUMENT commentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedComments
Description

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

ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.IdresourceIdthe Id of the resource to monitor
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.IdreferenceIdthe Id of the reference to monitor
ErrorsNULL_ARGUMENT referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.IdcommentIdthe Id of the Comment to monitor
ErrorsNOT_FOUNDa comment was not found identified by the given Id
NULL_ARGUMENT commentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.