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

This session provides methods to retrieve Comment to Book mappings. A Comment may appear in multiple Books. Each Book may have its own authorizations governing who is allowed to look at it.

This lookup session defines several views:

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete result set or is an error condition
MethodcanLookupCommentBookMappings
Description

Tests if this user can perform lookups of comment/book mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known lookup methods in this session will result in a PERMISSION_DENIED. This is intendedas a hint to an application that may opt not to offer lookup operations to unauthorized users.

Returnboolean false if looking up mappings is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeBookView
Description

The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryBookView
Description

A complete view of the Comment and Book returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.

CompliancemandatoryThis method is must be implemented.
MethodgetCommentIdsByBook
Description

Gets the list of Comment Ids associated with a Book.

Parametersosid.id.IdbookId Id of a Book.
Returnosid.id.IdListlist of related comment Ids
ErrorsNOT_FOUND bookId is not found
NULL_ARGUMENT bookId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsByBook
Description

Gets the list of Comments associated with a Book.

Parametersosid.id.IdbookId Id of a Book
Returnosid.commenting.CommentListlist of related comments
ErrorsNOT_FOUND bookId is not found
NULL_ARGUMENT bookId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentIdsByBooks
Description

Gets the list of Comment Ids corresponding to a list of Book objects.

Parametersosid.id.IdListbookIdslist of book Ids
Returnosid.id.IdListlist of comment Ids
ErrorsNULL_ARGUMENT bookIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsByBooks
Description

Gets the list of Comments corresponding to a list of Books.

Parametersosid.id.IdListbookIdslist of book Ids
Returnosid.commenting.CommentListlist of comments
ErrorsNULL_ARGUMENT bookIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetBookIdsByComment
Description

Gets the list of Book Ids mapped to a Comment.

Parametersosid.id.IdcommentId Id of a Comment
Returnosid.id.IdListlist of book Ids
ErrorsNOT_FOUND commentId is not found
NULL_ARGUMENT commentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetBooksByComment
Description

Gets the list of Book objects mapped to a Comment.

Parametersosid.id.IdcommentId Id of a Comment
Returnosid.commenting.BookListlist of books
ErrorsNOT_FOUND commentId is not found
NULL_ARGUMENT commentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.