public interface BookLookupSession extends OsidSession
This session provides methods for retrieving Book
objects. The Book
represents a collection of comments.
This session defines views that offer differing behaviors when retrieving multiple objects.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupBooks()
Tests if this user can perform
Book lookups. |
Book |
getBook(Id bookId)
Gets the
Book specified by its Id. |
BookList |
getBooks()
Gets all
Books. |
BookList |
getBooksByGenusType(Type bookGenusType)
Gets a
BookList corresponding to the given book genus
Type which does not include books of genus types
derived from the specified Type. |
BookList |
getBooksByIds(IdList bookIds)
Gets a
BookList corresponding to the given
IdList. |
BookList |
getBooksByParentGenusType(Type bookGenusType)
Gets a
BookList corresponding to the given book genus
Type and include any additional books with genus types
derived from the specified Type. |
BookList |
getBooksByProvider(Id resourceId)
Gets a
BookList from the given provider . |
BookList |
getBooksByRecordType(Type bookRecordType)
Gets a
BookList containing the given book record
Type. |
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
Book returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupBooks()
Book
lookups. 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 not offer lookup operations to unauthorized
users. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeBookView()
mandatory
- This method is must be implemented. void usePlenaryBookView()
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. Book getBook(Id bookId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Book
specified by its Id.
In
plenary mode, the exact Id
is found or a
NOT_FOUND
results. Otherwise, the returned Book
may have a different Id
than requested, such as the
case where a duplicate Id
was assigned to a Book
and retained for compatibility.bookId
- Id
of the Book
NotFoundException
- bookId
not foundNullArgumentException
- bookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. BookList getBooksByIds(IdList bookIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
BookList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
books specified in the Id
list, in the order of the
list, including duplicates, or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible Books
may be omitted from the list and may
present the elements in any order including returning a unique set.bookIds
- the list of Ids
to retrieve Book
listNotFoundException
- an Id was
not foundNullArgumentException
- bookIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BookList getBooksByGenusType(Type bookGenusType) throws OperationFailedException, PermissionDeniedException
BookList
corresponding to the given book genus
Type
which does not include books of genus types
derived from the specified Type.
In plenary mode, the
returned list contains all known books or an error results. Otherwise,
the returned list may contain only those books that are accessible
through this session.bookGenusType
- a book genus type Book
listNullArgumentException
- bookGenusType
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BookList getBooksByParentGenusType(Type bookGenusType) throws OperationFailedException, PermissionDeniedException
BookList
corresponding to the given book genus
Type
and include any additional books with genus types
derived from the specified Type.
In plenary mode, the
returned list contains all known books or an error results. Otherwise,
the returned list may contain only those books that are accessible
through this session.bookGenusType
- a book genus type Book
listNullArgumentException
- bookGenusType
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BookList getBooksByRecordType(Type bookRecordType) throws OperationFailedException, PermissionDeniedException
BookList
containing the given book record
Type.
In plenary mode, the returned list contains all known
books or an error results. Otherwise, the returned list may contain
only those books that are accessible through this session.bookRecordType
- a book record type Book
listNullArgumentException
- bookRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BookList getBooksByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException
BookList
from the given provider .
In plenary mode, the returned list contains all known books or
an error results. Otherwise, the returned list may contain only those
books that are accessible through this session.resourceId
- a resource Id
Book
listNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BookList getBooks() throws OperationFailedException, PermissionDeniedException
Books.
In plenary mode, the returned list
contains all known books or an error results. Otherwise, the returned
list may contain only those books that are accessible through this
session. Books
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.