public interface CommentBookSession extends OsidSession
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:
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupCommentBookMappings()
Tests if this user can perform lookups of comment/book mappings.
|
IdList |
getBookIdsByComment(Id commentId)
Gets the list of
Book Ids mapped to a
Comment. |
BookList |
getBooksByComment(Id commentId)
Gets the list of
Book objects mapped to a
Comment. |
IdList |
getCommentIdsByBook(Id bookId)
Gets the list of Comment Ids associated with a
Book. |
IdList |
getCommentIdsByBooks(IdList bookIds)
Gets the list of
Comment Ids corresponding to a list of
Book objects. |
CommentList |
getCommentsByBook(Id bookId)
Gets the list of
Comments associated with a
Book. |
CommentList |
getCommentsByBooks(IdList bookIds)
Gets the list of
Comments corresponding to a list of
Books. |
void |
useComparativeBookView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
usePlenaryBookView()
A complete view of the
Comment and Book
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canLookupCommentBookMappings()
PERMISSION_DENIED. This is intendedas
a hint to an application that may opt not to offer lookup operations
to unauthorized users. false if looking up mappings is not authorized,
true otherwisemandatory - This method must be implemented. void useComparativeBookView()
mandatory - This method is must be implemented. void usePlenaryBookView()
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.mandatory - This method is must be implemented. IdList getCommentIdsByBook(Id bookId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Book. bookId - Id of a Book. Ids NotFoundException - bookId is not foundNullArgumentException - bookId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsByBook(Id bookId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Comments associated with a
Book. bookId - Id of a Book NotFoundException - bookId is not foundNullArgumentException - bookId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. IdList getCommentIdsByBooks(IdList bookIds) throws OperationFailedException, PermissionDeniedException
Comment Ids corresponding to a list of
Book objects.bookIds - list of book Ids Ids NullArgumentException - bookIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsByBooks(IdList bookIds) throws OperationFailedException, PermissionDeniedException
Comments corresponding to a list of
Books. bookIds - list of book Ids NullArgumentException - bookIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. IdList getBookIdsByComment(Id commentId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Book Ids mapped to a
Comment. commentId - Id of a Comment Ids NotFoundException - commentId is not
foundNullArgumentException - commentId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BookList getBooksByComment(Id commentId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Book objects mapped to a
Comment. commentId - Id of a Comment NotFoundException - commentId is not
foundNullArgumentException - commentId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.