public interface ContactLookupSession extends OsidSession
This session defines methods for retrieving contacts.
This lookup session defines several views:
ContactAdminSession.
The methods useFederatedAddressBookView()
and
useIsolatedAddressBookView()
behave as a radio group and one
should be selected before invoking any lookup methods.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupContacts()
Tests if this user can lookup contacts.
|
AddressBook |
getAddressBook()
Gets the
AddressBook associated with this session. |
Id |
getAddressBookId()
Gets the
AddressBook Id associated with
this session. |
Contact |
getContact(Id contactId)
Gets the
Contact specified by its Id. |
ContactList |
getContacts()
Gets all contacts.
|
ContactList |
getContactsByGenusType(Type contactGenusType)
Gets a
ContactList corresponding to the given contact
genus Type which does not include contacts of genus
types derived from the specified Type. |
ContactList |
getContactsByGenusTypeForAddress(Id addressId,
Type contactGenusType)
Gets a list of all contacts of the given genus type corresponding to
an address
Id. |
ContactList |
getContactsByGenusTypeForAddressOnDate(Id addressId,
Type contactGenusType,
DateTime from,
DateTime to)
Gets a list of all contacts of the given genus type corresponding to
an address
Id and effective during the entire given
date range inclusive but not confined to the date range. |
ContactList |
getContactsByGenusTypeForReference(Id referenceId,
Type contactGenusType)
Gets a list of contacts of the given genus type corresponding to a
reference
Id. |
ContactList |
getContactsByGenusTypeForReferenceAndAddress(Id referenceId,
Id addressId,
Type contactGenusType)
Gets a list of all contacts with the given genus type corresponding to
a reference and address
Id. |
ContactList |
getContactsByGenusTypeForReferenceAndAddressOnDate(Id referenceId,
Id addressId,
Type contactGenusType,
DateTime from,
DateTime to)
Gets a list of all contacts with the given genus type corresponding to
a reference and address
Id and during the entire given
date range inclusive but not confined to the date range. |
ContactList |
getContactsByGenusTypeForReferenceOnDate(Id referenceId,
Type contactGenusType,
DateTime from,
DateTime to)
Gets a list of all contacts of the given genus type corresponding to a
reference
Id and effective during the entire given date
range inclusive but not confined to the date range. |
ContactList |
getContactsByGenusTypeOnDate(Type contactGenusType,
DateTime from,
DateTime to)
Gets a list of contacts of a genus type and with an effective during
the entire given date range inclusive but not confined to the date
range.
|
ContactList |
getContactsByIds(IdList contactIds)
Gets a
ContactList corresponding to the given
IdList. |
ContactList |
getContactsByParentGenusType(Type contactGenusType)
Gets a
ContactList corresponding to the given contact
genus Type and include any additional contacts with
genus types derived from the specified Type. |
ContactList |
getContactsByRecordType(Type contactRecordType)
Gets a
ContactList containing the given contact record
Type. |
ContactList |
getContactsForAddress(Id addressId)
Gets a list of all contacts corresponding to an address
Id. |
ContactList |
getContactsForAddressOnDate(Id addressId,
DateTime from,
DateTime to)
Gets a list of all contacts corresponding to an address
Id
and effective during the entire given date range inclusive but
not confined to the date range. |
ContactList |
getContactsForReference(Id referenceId)
Gets a list of contacts corresponding to a reference
Id. |
ContactList |
getContactsForReferenceAndAddress(Id referenceId,
Id addressId)
Gets a list of all contacts corresponding to a reference and address
Id. |
ContactList |
getContactsForReferenceAndAddressOnDate(Id referenceId,
Id addressId,
DateTime from,
DateTime to)
Gets a list of all contacts corresponding to a reference and address
Id and effectiveduring the entire given date range
inclusive but not confined to the date range. |
ContactList |
getContactsForReferenceOnDate(Id referenceId,
DateTime from,
DateTime to)
Gets a list of all contacts corresponding to a reference
Id
and effective during the entire given date range inclusive but
not confined to the date range. |
ContactList |
getContactsOnDate(DateTime from,
DateTime to)
Gets a list of contacts with an effective during the entire given date
range inclusive but not confined to the date range.
|
void |
useAnyEffectiveContactView()
All contacts of any effective dates are returned by all methods in
this session.
|
void |
useComparativeContactView()
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 |
useEffectiveContactView()
Only contacts whose effective dates are current are returned by
methods in this session.
|
void |
useFederatedAddressBookView()
Federates the view for methods in this session.
|
void |
useIsolatedAddressBookView()
Isolates the view for methods in this session.
|
void |
usePlenaryContactView()
A complete view of the
Contact 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 canLookupContacts()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer these operations. false
if contact lookup methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useComparativeContactView()
mandatory
- This method is must be implemented. void usePlenaryContactView()
Contact
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. void useEffectiveContactView()
mandatory
- This method is must be implemented. void useAnyEffectiveContactView()
mandatory
- This method is must be implemented. Contact getContact(Id contactId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Contact
specified by its Id.
In plenary mode, the exact Id
is found
or a NOT_FOUND
results. Otherwise, the returned
Contact
may have a different Id
than requested,
such as the case where a duplicate Id
was assigned to a
Contact
and retained for compatibility.
In effective mode, contacts are returned that are currently effective.
In any effective mode, effective contacts and those currently expired
are returned.contactId
- the Id
of the Contact
to retrieve Contact
NotFoundException
- no Contact
found
with the given Id
NullArgumentException
- contactId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContactsByIds(IdList contactIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
ContactList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
contacts 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 contacts may be omitted from the list and may present the
elements in any order including returning a unique set.
In effective mode, contacts are returned that are currently effective.
In any effective mode, effective contacts and those currently expired
are returned.contactIds
- the list of Ids
to retrieve Contact list
NotFoundException
- an Id was
not foundNullArgumentException
- contactIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContactsByGenusType(Type contactGenusType) throws OperationFailedException, PermissionDeniedException
ContactList
corresponding to the given contact
genus Type
which does not include contacts of genus
types derived from the specified Type.
In plenary mode, the returned list contains all of the contacts
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 contacts
may be omitted from the list and may present the elements in any order
including returning a unique set.
In effective mode, contacts are returned that are currently effective.
In any effective mode, effective contacts and those currently expired
are returned.contactGenusType
- a contact genus type Contact
listNullArgumentException
- contactGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContactsByParentGenusType(Type contactGenusType) throws OperationFailedException, PermissionDeniedException
ContactList
corresponding to the given contact
genus Type
and include any additional contacts with
genus types derived from the specified Type.
In plenary mode, the returned list contains all of the contacts
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 contacts
may be omitted from the list and may present the elements in any order
including returning a unique set.
In effective mode, contacts are returned that are currently effective.
In any effective mode, effective contacts and those currently expired
are returned.contactGenusType
- a contact genus type Contact
listNullArgumentException
- contactGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContactsByRecordType(Type contactRecordType) throws OperationFailedException, PermissionDeniedException
ContactList
containing the given contact record
Type.
In plenary mode, the returned list contains all of the contacts
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 contacts
may be omitted from the list and may present the elements in any order
including returning a unique set.
In effective mode, contacts are returned that are currently effective.
In any effective mode, effective contacts and those currently expired
are returned.contactRecordType
- a contact record type Contact
listNullArgumentException
- contactRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContactsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
from
- the starting dateto
- the ending date ContactList
InvalidArgumentException
- from
is
greater than to
NullArgumentException
- from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContactsByGenusTypeOnDate(Type contactGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
contactGenusType
- a contact genus typefrom
- the starting dateto
- the ending date ContactList
InvalidArgumentException
- from
is
greater than to
NullArgumentException
- contactGenusType, from,
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContactsForReference(Id referenceId) throws OperationFailedException, PermissionDeniedException
Id.
In plenary mode, the returned list contains all known contacts or an
error results. Otherwise, the returned list may contain only those
contacts that are accessible through this session.
In effective mode, contacts are returned that are currently effective.
In any effective mode, effective contacts and those currently expired
are returned.referenceId
- the Id
of the reference ContactList
NullArgumentException
- referenceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContactsForReferenceOnDate(Id referenceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
Id
and effective during the entire given date range inclusive but
not confined to the date range.
In plenary mode, the returned list contains all known contacts or an
error results. Otherwise, the returned list may contain only those
contacts that are accessible through this session.
In effective mode, contacts are returned that are currently effective.
In any effective mode, effective contacts and those currently expired
are returned.referenceId
- a reference Id
from
- from dateto
- to date ContactList
InvalidArgumentException
- to
is less
than from
NullArgumentException
- referenceId, from
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContactsByGenusTypeForReference(Id referenceId, Type contactGenusType) throws OperationFailedException, PermissionDeniedException
Id.
In plenary mode, the returned list contains all known contacts or an
error results. Otherwise, the returned list may contain only those
contacts that are accessible through this session.
In effective mode, contacts are returned that are currently effective.
In any effective mode, effective contacts and those currently expired
are returned.referenceId
- the Id
of the referencecontactGenusType
- the genus type of the contact ContactList
NullArgumentException
- referenceId
or
contactGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContactsByGenusTypeForReferenceOnDate(Id referenceId, Type contactGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
Id
and effective during the entire given date
range inclusive but not confined to the date range.
In plenary mode, the returned list contains all known contacts or an
error results. Otherwise, the returned list may contain only those
contacts that are accessible through this session.
In effective mode, contacts are returned that are currently effective.
In any effective mode, effective contacts and those currently expired
are returned.referenceId
- a reference Id
contactGenusType
- the genus type of the contactfrom
- from dateto
- to date ContactList
InvalidArgumentException
- to
is less
than from
NullArgumentException
- referenceId,
contactGenusType, from
or to
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContactsForAddress(Id addressId) throws OperationFailedException, PermissionDeniedException
Id.
In plenary mode, the returned list contains all known contacts or an
error results. Otherwise, the returned list may contain only those
contacts that are accessible through this session.
In effective mode, contacts are returned that are currently effective.
In any effective mode, effective contacts and those currently expired
are returned.addressId
- the Id
of the address ContactList
NullArgumentException
- addressId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContactsForAddressOnDate(Id addressId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
Id
and effective during the entire given date range inclusive but
not confined to the date range.
In plenary mode, the returned list contains all known contacts or an
error results. Otherwise, the returned list may contain only those
contacts that are accessible through this session.
In effective mode, contacts are returned that are currently effective.
In any effective mode, effective contacts and those currently expired
are returned.addressId
- an address Id
from
- from dateto
- to date ContactList
InvalidArgumentException
- to
is less
than from
NullArgumentException
- addressId, from
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContactsByGenusTypeForAddress(Id addressId, Type contactGenusType) throws OperationFailedException, PermissionDeniedException
Id.
In plenary mode, the returned list contains all known
contacts or an error results. Otherwise, the returned list may contain
only those contacts that are accessible through this session.
In effective mode, contacts are returned that are currently effective.
In any effective mode, effective contacts and those currently expired
are returned.addressId
- the Id
of the addresscontactGenusType
- the genus type of the contact ContactList
NullArgumentException
- addressId
or
contactGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContactsByGenusTypeForAddressOnDate(Id addressId, Type contactGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
Id
and effective during the entire given
date range inclusive but not confined to the date range.
In plenary mode, the returned list contains all known contacts or an
error results. Otherwise, the returned list may contain only those
contacts that are accessible through this session.
In effective mode, contacts are returned that are currently effective.
In any effective mode, effective contacts and those currently expired
are returned.addressId
- an address Id
contactGenusType
- the genus type of the contactfrom
- from dateto
- to date ContactList
InvalidArgumentException
- to
is less
than from
NullArgumentException
- addressId,
contactGenusType, from
or to
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContactsForReferenceAndAddress(Id referenceId, Id addressId) throws OperationFailedException, PermissionDeniedException
Id.
In plenary mode, the returned list contains all known contacts or an
error results. Otherwise, the returned list may contain only those
contacts that are accessible through this session.
In effective mode, contacts are returned that are currently effective.
In any effective mode, effective contacts and those currently expired
are returned.referenceId
- the Id
of the referenceaddressId
- the Id
of the address ContactList
NullArgumentException
- referenceId
or
addressId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContactsForReferenceAndAddressOnDate(Id referenceId, Id addressId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
Id
and effectiveduring the entire given date range
inclusive but not confined to the date range.
In plenary mode, the returned list contains all known contacts or an
error results. Otherwise, the returned list may contain only those
contacts that are accessible through this session.
In effective mode, contacts are returned that are currently effective.
In any effective mode, effective contacts and those currently expired
are returned.referenceId
- the Id
of the referenceaddressId
- an address Id
from
- from dateto
- to date ContactList
InvalidArgumentException
- to
is less
than from
NullArgumentException
- referenceId, addressI,
from
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContactsByGenusTypeForReferenceAndAddress(Id referenceId, Id addressId, Type contactGenusType) throws OperationFailedException, PermissionDeniedException
Id.
In plenary mode, the returned list contains all known contacts or an
error results. Otherwise, the returned list may contain only those
contacts that are accessible through this session.
In effective mode, contacts are returned that are currently effective.
In any effective mode, effective contacts and those currently expired
are returned.referenceId
- the Id
of the referenceaddressId
- the Id
of the addresscontactGenusType
- the genus type of the contact ContactList
NullArgumentException
- referenceId, addressId
or contactGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContactsByGenusTypeForReferenceAndAddressOnDate(Id referenceId, Id addressId, Type contactGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
Id
and during the entire given
date range inclusive but not confined to the date range.
In plenary mode, the returned list contains all known contacts or an
error results. Otherwise, the returned list may contain only those
contacts that are accessible through this session.
In effective mode, contacts are returned that are currently effective.
In any effective mode, effective contacts and those currently expired
are returned.referenceId
- the Id
of the referenceaddressId
- an address Id
contactGenusType
- the genus type of the contactfrom
- from dateto
- to date ContactList
InvalidArgumentException
- to
is less
than from
NullArgumentException
- referenceId, addressId,
contactGenusType, from
or to
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ContactList getContacts() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.