OSID Logo
OSID Specifications
contact package
Version 3.0.0
Release Candidate Preview
Interfaceosid.contact.ContactSession
Implementsosid.OsidSession
Description

This session defines methods for retrieving contacts.

This lookup session defines several views:

  • isolated address book view: All contact methods in this session operate, retrieve and pertain to contacts defined explicitly in the current address book. Using an isolated view is useful for managing contacts with the ContactAdminSession.
  • federated address book view: All contact lookup methods in this session operate, retrieve and pertain to all contacts defined in this address book and any other address books implicitly available in this address book through address book inheritence.

The methods useFederatedAddressBookView() and useIsolatedAddressBookView() behave as a radio group and one should be selected before invoking any lookup methods. This session is always in comparative mode.

MethodgetAddressBookId
Description

Gets the AddressBook Id associated with this session.

Returnosid.id.Idthe AddressBook Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetAddressBook
Description

Gets the AddressBook associated with this session.

Returnosid.contact.AddressBookthe address book
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanGetContacts
Description

Tests if this user can lookup contacts. 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 opt not to offer these operations.

Returnboolean false if contact lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseFederatedAddressBookView
Description

Federates the view for methods in this session. A federated view will include contacts in address books which are children of this address book in the address book hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedAddressBookView
Description

Isolates the view for methods in this session. An isolated view restricts retrievals to this address book only.

CompliancemandatoryThis method is must be implemented.
MethodgetAvailableContacts
Description

Gets a list of all current available contacts corresponding to a reference Id sorted from highlest to lowest priority.

Parametersosid.id.IdreferenceIdthe Id of the reference
Returnosid.contact.ContactListthe returned ContactList
ErrorsNULL_ARGUMENT referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAvailableContactsByGenusType
Description

Gets all current available contacts for a reference and by contact genus Type sorted from highest to lowest priority.

Parametersosid.id.IdreferenceIdthe Id of the reference
osid.type.TypecontactGenusTypea contact genus Type
Returnosid.contact.ContactLista list of contacts
ErrorsNULL_ARGUMENT referenceId or contactGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.