| Interface | osid.commenting.RatingLookupSession | ||
|---|---|---|---|
| Implements | osid.OsidSession | ||
| Description | 
                 This session defines methods for retrieving comments. This lookup session defines several views: 
  The methods   | ||
| Method | getBookId | ||
| Description | 
                     Gets the   | ||
| Return | osid.id.Id | the  Book Id  associated with this session  | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getBook | ||
| Description | 
                     Gets the   | ||
| Return | osid.commenting.Book | the book | |
| Errors | OPERATION_FAILED | unable to complete request | |
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | canLookupRatings | ||
| 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   | ||
| Return | boolean |  false  if book reading methods are not authorized,  
true  otherwise  | |
| Compliance | mandatory | This method must be implemented. | |
| Method | useComparativeCommentView | ||
| 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.  | ||
| Compliance | mandatory | This method is must be implemented. | |
| Method | usePlenaryCommentView | ||
| Description | 
                     A complete view of the   | ||
| Compliance | mandatory | This method is must be implemented. | |
| Method | useFederatedBookView | ||
| 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.  | ||
| Compliance | mandatory | This method is must be implemented. | |
| Method | useIsolatedBookView | ||
| Description | 
                     Isolates the view for methods in this session. An isolated view restricts retrievals to this book only.  | ||
| Compliance | mandatory | This method is must be implemented. | |
| Method | getCumulativeRating | ||
| Description | 
                     Gets the cumulative rating for all the references in this book.  | ||
| Return | osid.grading.Grade | the cumulative rating | |
| Errors | OPERATION_FAILED | unable to complete request | |
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | getCumulativeRatingForReference | ||
| Description | 
                     Gets the cumulative rating for a reference.  | ||
| Parameters | osid.id.Id | referenceId | the  Id  of the reference  | 
| Return | osid.grading.Grade | the cumulative rating | |
| Errors | NOT_FOUND | no reference found with the given  Id   |                 |
| NULL_ARGUMENT |  referenceId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | getCumulativeRatingForCommentor | ||
| Description | 
                     Gets the cumulative rating for a commentor.  | ||
| Parameters | osid.id.Id | resourceId | the  Id  of the resource  | 
| Return | osid.grading.Grade | the cumulative rating | |
| Errors | NOT_FOUND | no resource found with the given  Id   |                 |
| NULL_ARGUMENT |  resourceId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | getTopReferences | ||
| Description | 
                     Gets the top rated references in this book.  | ||
| Parameters | cardinal | max | the maximum number to return | 
| Return | osid.id.IdList | the top references | |
| Errors | OPERATION_FAILED | unable to complete request | |
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | getReferences | ||
| Description | 
                     Gets the references with ratings equal to or higher than the given grade.  | ||
| Parameters | osid.id.Id | gradeId | the  Id  of the grade  | 
| Return | osid.grading.Grade | the cumulative rating | |
| Errors | NOT_FOUND | no reference found with the given  Id   |                 |
| NULL_ARGUMENT |  referenceId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |