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

This session defines methods for retrieving ratings.

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.Id the Book Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetBook
Description

Gets the Book associated with this session.

Returnosid.commenting.Book the book
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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.

Compliancemandatory This 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.

Compliancemandatory This 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.

Compliancemandatory This method is must be implemented.
MethoduseIsolatedBookView
Description

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

Compliancemandatory This method is must be implemented.
MethodgetCumulativeRating
Description

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

Returnosid.grading.Grade the cumulative rating
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetCumulativeRatingForReference
Description

Gets the cumulative rating for a reference.

Parametersosid.id.IdreferenceId the Id of the reference
Returnosid.grading.Grade the cumulative rating
ErrorsNOT_FOUND no reference found with the given Id
NULL_ARGUMENT referenceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetCumulativeRatingForCommentor
Description

Gets the cumulative rating for a commentor.

Parametersosid.id.IdresourceId the Id of the resource
Returnosid.grading.Grade the cumulative rating
ErrorsNOT_FOUND no resource found with the given Id
NULL_ARGUMENT resourceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetTopReferences
Description

Gets the top rated references in this book.

Parameterscardinalmax the maximum number to return
Returnosid.id.IdList the top references
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetReferences
Description

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

Parametersosid.id.IdgradeId the Id of the grade
Returnosid.grading.Grade the cumulative rating
ErrorsNOT_FOUND no reference found with the given Id
NULL_ARGUMENT referenceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.