public interface AddressLookupSession extends OsidSession
This session provides methods for retrieving Address
objects. The Address
represents a collection of contacts.
This session defines views that offer differing behaviors when retrieving multiple objects.
AddressAdminSession.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupAddresses()
Tests if this user can perform
Address lookups. |
Address |
getAddress(Id addressId)
Gets the
Address specified by its Id. |
AddressBook |
getAddressBook()
Gets the
AddressBook associated with this session. |
Id |
getAddressBookId()
Gets the
AddressBook Id associated with
this session. |
AddressList |
getAddresses()
Gets all
Addresses. |
AddressList |
getAddressesByGenusType(Type addressGenusType)
Gets an
AddressList corresponding to the given address
genus Type which does not include addresses of genus
types derived from the specified Type. |
AddressList |
getAddressesByIds(IdList addressIds)
Gets an
AddressList corresponding to the given
IdList. |
AddressList |
getAddressesByParentGenusType(Type addressGenusType)
Gets an
AddressList corresponding to the given address
genus Type and include any additional addresses with
genus types derived from the specified Type. |
AddressList |
getAddressesByRecordType(Type addressRecordType)
Gets an
AddressList containing the given address record
Type. |
AddressList |
getAddressesByResource(Id resourceId)
Gets an
AddressList for the given resource. |
void |
useComparativeAddressView()
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 |
useFederatedAddressBookView()
Federates the view for methods in this session.
|
void |
useIsolatedAddressBookView()
Isolates the view for methods in this session.
|
void |
usePlenaryAddressView()
A complete view of the
Address returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getAddressBookId()
AddressBook
Id
associated with
this session. AddressBook Id
associated with this sessionmandatory
- This method must be implemented. AddressBook getAddressBook() throws OperationFailedException, PermissionDeniedException
AddressBook
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupAddresses()
Address
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 useComparativeAddressView()
mandatory
- This method is must be implemented. void usePlenaryAddressView()
Address
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. void useFederatedAddressBookView()
mandatory
- This method is must be implemented. void useIsolatedAddressBookView()
mandatory
- This method is must be implemented. Address getAddress(Id addressId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Address
specified by its Id.
In
plenary mode, the exact Id
is found or a
NOT_FOUND
results. Otherwise, the returned Address
may have a different Id
than requested, such as
the case where a duplicate Id
was assigned to an
Address
and retained for compatibility.addressId
- Id
of the Address
NotFoundException
- addressId
not foundNullArgumentException
- addressId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. AddressList getAddressesByIds(IdList addressIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
AddressList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
addresses 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 Addresses
may be omitted from the list and
may present the elements in any order including returning a unique
set.addressIds
- the list of Ids
to retrieve Address
listNotFoundException
- an Id was
not foundNullArgumentException
- addressIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AddressList getAddressesByGenusType(Type addressGenusType) throws OperationFailedException, PermissionDeniedException
AddressList
corresponding to the given address
genus Type
which does not include addresses of genus
types derived from the specified Type.
In plenary mode,
the returned list contains all known addresses or an error results.
Otherwise, the returned list may contain only those addresses that are
accessible through this session.addressGenusType
- an address genus type Address
listNullArgumentException
- addressGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AddressList getAddressesByParentGenusType(Type addressGenusType) throws OperationFailedException, PermissionDeniedException
AddressList
corresponding to the given address
genus Type
and include any additional addresses with
genus types derived from the specified Type.
In plenary
mode, the returned list contains all known addresses or an error
results. Otherwise, the returned list may contain only those addresses
that are accessible through this session.addressGenusType
- an address genus type Address
listNullArgumentException
- addressGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AddressList getAddressesByRecordType(Type addressRecordType) throws OperationFailedException, PermissionDeniedException
AddressList
containing the given address record
Type.
In plenary mode, the returned list contains all
known addresses or an error results. Otherwise, the returned list may
contain only those addresses that are accessible through this session.addressRecordType
- an address record type Address
listNullArgumentException
- addressRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AddressList getAddressesByResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
AddressList
for the given resource.
In plenary mode, the returned list contains all known
addresses or an error results. Otherwise, the returned list may
contain only those addresses that are accessible through this session.resourceId
- a resource Id
Address
listNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AddressList getAddresses() throws OperationFailedException, PermissionDeniedException
Addresses.
In plenary mode, the returned list
contains all known addresses or an error results. Otherwise, the
returned list may contain only those addresses that are accessible
through this session. Addresses
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.