public interface AddressBookLookupSession extends OsidSession
This session provides methods for retrieving AddressBook
objects. The AddressBook
represents a collection of
contacts.
This session defines views that offer differing behaviors when retrieving multiple objects.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupAddressBooks()
Tests if this user can perform
AddressBook lookups. |
AddressBook |
getAddressBook(Id jouralId)
Gets the
AddressBook specified by its Id. |
AddressBookList |
getAddressBooks()
Gets all
AddressBooks. |
AddressBookList |
getAddressBooksByGenusType(Type addressBookGenusType)
Gets an
AddressBookList corresponding to the given
address book genus Type which does not include address
books of genus types derived from the specified Type. |
AddressBookList |
getAddressBooksByIds(IdList addressBookIds)
Gets an
AddressBookList corresponding to the given
IdList. |
AddressBookList |
getAddressBooksByParentGenusType(Type addressBookGenusType)
Gets an
AddressBookList corresponding to the given
address book genus Type and include any additional
address books with genus types derived from the specified Type. |
AddressBookList |
getAddressBooksByProvider(Id resourceId)
Gets an
AddressBookList from the given provider. |
AddressBookList |
getAddressBooksByRecordType(Type addressBookRecordType)
Gets an
AddressBookList containing the given address
book record Type. |
void |
useComparativeAddressBookView()
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 |
usePlenaryAddressBookView()
A complete view of the
AddressBook returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupAddressBooks()
AddressBook
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 useComparativeAddressBookView()
mandatory
- This method is must be implemented. void usePlenaryAddressBookView()
AddressBook
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. AddressBook getAddressBook(Id jouralId) throws NotFoundException, OperationFailedException, PermissionDeniedException
AddressBook
specified by its Id.
In plenary mode, the exact Id
is found or a
NOT_FOUND
results. Otherwise, the returned
AddressBook
may have a different Id
than
requested, such as the case where a duplicate Id
was
assigned to an AddressBook
and retained for
compatibility.jouralId
- Id
of the AddressBook
NotFoundException
- addressBookId
not
foundNullArgumentException
- addressBookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. AddressBookList getAddressBooksByIds(IdList addressBookIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
AddressBookList
corresponding to the given
IdList.
In plenary mode, the returned list contains all
of the address 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 AddressBooks
may be omitted
from the list and may present the elements in any order including
returning a unique set.addressBookIds
- the list of Ids
to retrieve AddressBook
listNotFoundException
- an Id was
not foundNullArgumentException
- addressBookIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AddressBookList getAddressBooksByGenusType(Type addressBookGenusType) throws OperationFailedException, PermissionDeniedException
AddressBookList
corresponding to the given
address book genus Type
which does not include address
books of genus types derived from the specified Type.
In plenary mode, the returned list contains all known address books or
an error results. Otherwise, the returned list may contain only those
address books that are accessible through this session.addressBookGenusType
- an address book genus type AddressBook
listNullArgumentException
- addressBookGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AddressBookList getAddressBooksByParentGenusType(Type addressBookGenusType) throws OperationFailedException, PermissionDeniedException
AddressBookList
corresponding to the given
address book genus Type
and include any additional
address books with genus types derived from the specified Type.
In plenary mode, the returned list contains all known address
books or an error results. Otherwise, the returned list may contain
only those address books that are accessible through this session.addressBookGenusType
- an address book genus type AddressBook
listNullArgumentException
- addressBookGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AddressBookList getAddressBooksByRecordType(Type addressBookRecordType) throws OperationFailedException, PermissionDeniedException
AddressBookList
containing the given address
book record Type.
In plenary mode, the returned list
contains all known address books or an error results. Otherwise, the
returned list may contain only those address books that are accessible
through this session.addressBookRecordType
- an address book record type AddressBook
listNullArgumentException
- addressBookRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AddressBookList getAddressBooksByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException
AddressBookList
from the given provider. In
plenary mode, the returned list contains all known address books or an
error results. Otherwise, the returned list may contain only those
address books that are accessible through this session.resourceId
- a resource Id
AddressBook
listNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AddressBookList getAddressBooks() throws OperationFailedException, PermissionDeniedException
AddressBooks.
In plenary mode, the returned
list contains all known address books or an error results. Otherwise,
the returned list may contain only those address books that are
accessible through this session. AddressBooks
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.