OSID Logo
OSID Specifications
commenting package
Version 3.1.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.

Returnboolean false if mapping is not authorized, true otherwise
Compliancemandatory This 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.IdbookId the Id of the Book
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT bookId is null
Compliancemandatory This 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.IdbookId the Id of the Book
Returnosid.id.IdList list of assignable book Ids
ErrorsNULL_ARGUMENT bookId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This 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.IdbookId the Id of the Book
osid.id.IdcommentId the Id of the Comment
Returnosid.id.IdList list of assignable book Ids
ErrorsNULL_ARGUMENT bookId or commentId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodassignCommentToBook
Description

Adds an existing Comment to a Book.

Parametersosid.id.IdcommentId the Id of the Comment
osid.id.IdbookId the Id of the Book
ErrorsALREADY_EXISTS commentId is already assigned to bookId
NOT_FOUND commentId or bookId not found
NULL_ARGUMENT commentId or bookId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodunassignCommentFromBook
Description

Removes a Comment from a Book.

Parametersosid.id.IdcommentId the Id of the Comment
osid.id.IdbookId the Id of the Book
ErrorsNOT_FOUND commentId or bookId not found or commentId not assigned to bookId
NULL_ARGUMENT commentId or bookId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodreassignCommentToBook
Description

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

Parametersosid.id.IdcommentId the Id of the Comment
osid.id.IdfromBookId the Id of the current Book
osid.id.IdtoBookId the Id of the destination Book
ErrorsALREADY_EXISTS commentId already assigned to toBookId
NOT_FOUND commentId, fromBookId, or toBookId not found or comment not mapped to fromBookId
NULL_ARGUMENT commentId, bookIdId, or toBookId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.