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

This session defines methods for retrieving comments.

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
  • isolated book view: All comment methods in this session operate, retrieve and pertain to comments defined explicitly in the current book. Using an isolated view is useful for managing comments with the CommentAdminSession.
  • federated book view: All comment lookup methods in this session operate, retrieve and pertain to all comments defined in this book and any other books implicitly available in this book through book inheritence.

The methods useFederatedBookView() and useIsolatedBookView() behave as a radio group and one should be selected before invoking any lookup methods.

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.
MethodcanLookupRatings
Description

Tests if this user can examine this book. 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 these operations.

Returnboolean false if book reading methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeCommentView
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.
MethodusePlenaryCommentView
Description

A complete view of the Comment 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.
MethoduseFederatedBookView
Description

Federates the view for methods in this session. A federated view will include ratings 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 retrievals to this book only.

CompliancemandatoryThis method is must be implemented.
MethodgetCumulativeRating
Description

Gets the cumulative rating for all the references in this book.

Returnosid.grading.Gradethe cumulative rating
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCumulativeRatingForReference
Description

Gets the cumulative rating for a reference.

Parametersosid.id.IdreferenceIdthe Id of the reference
Returnosid.grading.Gradethe cumulative rating
ErrorsNOT_FOUNDno reference found with the given Id
NULL_ARGUMENT referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCumulativeRatingForCommentor
Description

Gets the cumulative rating for a commentor.

Parametersosid.id.IdresourceIdthe Id of the resource
Returnosid.grading.Gradethe cumulative rating
ErrorsNOT_FOUNDno resource found with the given Id
NULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetTopReferences
Description

Gets the top rated references in this book.

Parameterscardinalmaxthe maximum number to return
Returnosid.id.IdListthe top references
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetReferences
Description

Gets the references with ratings equal to or higher than the given grade.

Parametersosid.id.IdgradeIdthe Id of the grade
Returnosid.grading.Gradethe cumulative rating
ErrorsNOT_FOUNDno reference found with the given Id
NULL_ARGUMENT referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.