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

This session provides methods to re-assign Comments to Books . A Comment may map to multiple Books and removing the last reference to a Comment is the equivalent of deleting it. Each Book may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a Comment to another Book is not a copy operation (eg: does not change its Id ).

MethodcanAssignComments
Description

Tests if this user can alter comment/book mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 assignment operations to unauthorized users.

Returnbooleanfalse if mapping is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanAssignCommentsToBook
Description

Tests if this user can alter comment/book mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 assignment operations to unauthorized users.

Parametersosid.id.IdbookIdthe Id of the Book
Returnbooleanfalse if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENTbookId is null
CompliancemandatoryThis method must be implemented.
MethodgetAssignableBookIds
Description

Gets a list of books including and under the given book node in which any comment can be assigned.

Parametersosid.id.IdbookIdthe Id of the Book
Returnosid.id.IdListlist of assignable book Ids
ErrorsNULL_ARGUMENTbookId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetAssignableBookIdsForComment
Description

Gets a list of books including and under the given book node in which a specific comment can be assigned.

Parametersosid.id.IdbookIdthe Id of the Book
osid.id.IdcommentIdthe Id of the Comment
Returnosid.id.IdListlist of assignable book Ids
ErrorsNULL_ARGUMENTbookId or commentId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignCommentToBook
Description

Adds an existing Comment to a Book .

Parametersosid.id.IdcommentIdthe Id of the Comment
osid.id.IdbookIdthe Id of the Book
ErrorsALREADY_EXISTScommentId is already assigned to bookId
NOT_FOUNDcommentId or bookId not found
NULL_ARGUMENTcommentId or bookId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignCommentFromBook
Description

Removes a Comment from a Book .

Parametersosid.id.IdcommentIdthe Id of the Comment
osid.id.IdbookIdthe Id of the Book
ErrorsNOT_FOUNDcommentId or bookId not found or commentId not assigned to bookId
NULL_ARGUMENTcommentId or bookId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreassignCommentToBook
Description

Moves a Credit from one Book to another. Mappings to other Books are unaffected.

Parametersosid.id.IdcommentIdthe Id of the Comment
osid.id.IdfromBookIdthe Id of the current Book
osid.id.IdtoBookIdthe Id of the destination Book
ErrorsALREADY_EXISTScommentId already assigned to toBookId
NOT_FOUNDcommentId, fromBookId , or toBookId not found or comment not mapped to fromBookId
NULL_ARGUMENTcommentId, bookIdId , or toBookId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.