public interface ContactAddressBookSession extends OsidSession
This session provides methods to retrieve Contact to
AddressBook mappings. A Contact may appear
in multiple AddressBooks. Each AddressBook
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 |
canLookupContactAddressBookMappings()
Tests if this user can perform lookups of contact/address book
mappings.
|
IdList |
getAddressBookIdsByContact(Id contactId)
Gets the list of
AddressBook Ids mapped
to a Contact. |
AddressBookList |
getAddressBooksByContact(Id contactId)
Gets the list of
AddressBook objects mapped to a
Contact. |
IdList |
getContactIdsByAddressBook(Id addressBookId)
Gets the list of Contact Ids associated with an
AddressBook. |
IdList |
getContactIdsByAddressBooks(IdList addressBookIds)
Gets the list of
Contact Ids corresponding to a list of
AddressBook objects. |
ContactList |
getContactsByAddressBook(Id addressBookId)
Gets the list of
Contacts associated with an
AddressBook. |
ContactList |
getContactsByAddressBooks(IdList addressBookIds)
Gets the list of
Contacts corresponding to a list of
AddressBooks. |
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
Contact and AddressBook
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canLookupContactAddressBookMappings()
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 useComparativeAddressBookView()
mandatory - This method is must be implemented. void usePlenaryAddressBookView()
Contact and 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. IdList getContactIdsByAddressBook(Id addressBookId) throws NotFoundException, OperationFailedException, PermissionDeniedException
AddressBook.
addressBookId - Id of an AddressBook.
Ids NotFoundException - addressBookId is not
foundNullArgumentException - addressBookId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. ContactList getContactsByAddressBook(Id addressBookId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Contacts associated with an
AddressBook. addressBookId - Id of an AddressBook
NotFoundException - addressBookId is not
foundNullArgumentException - addressBookId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. IdList getContactIdsByAddressBooks(IdList addressBookIds) throws OperationFailedException, PermissionDeniedException
Contact Ids corresponding to a list of
AddressBook objects.addressBookIds - list of address book Ids Ids NullArgumentException - addressBookIds
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. ContactList getContactsByAddressBooks(IdList addressBookIds) throws OperationFailedException, PermissionDeniedException
Contacts corresponding to a list of
AddressBooks. addressBookIds - list of address book Ids NullArgumentException - addressBookIds
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. IdList getAddressBookIdsByContact(Id contactId) throws NotFoundException, OperationFailedException, PermissionDeniedException
AddressBook Ids mapped
to a Contact. contactId - Id of a Contact Ids NotFoundException - contactId is not
foundNullArgumentException - contactId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. AddressBookList getAddressBooksByContact(Id contactId) throws NotFoundException, OperationFailedException, PermissionDeniedException
AddressBook objects mapped to a
Contact. contactId - Id of a Contact NotFoundException - contactId is not
foundNullArgumentException - contactId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.