Interface ContactSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ContactSession extends OsidSession

This session defines methods for evaluating and retrieving active and applicable contacts.

  • Method Details

    • getAddressBookId

      Id getAddressBookId()
      Gets the AddressBook Id associated with this session.
      Returns:
      the AddressBook Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getAddressBook

      Gets the AddressBook associated with this session.
      Returns:
      the address book
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canGetContacts

      boolean canGetContacts()
      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.
      Returns:
      false if contact lookup methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getApplicableContacts

      ContactList getApplicableContacts(Id referenceId) throws OperationFailedException, PermissionDeniedException
      Gets a list of all current available contacts corresponding to a reference Id sorted from highlest to lowest priority.
      Parameters:
      referenceId - the Id of the reference
      Returns:
      the returned ContactList
      Throws:
      NullArgumentException - referenceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getApplicableContactsByGenusType

      ContactList getApplicableContactsByGenusType(Id referenceId, Type contactGenusType) throws OperationFailedException, PermissionDeniedException
      Gets all current available contacts for a reference and by contact genus Type sorted from highest to lowest priority.
      Parameters:
      referenceId - the Id of the reference
      contactGenusType - a contact genus Type
      Returns:
      a list of contacts
      Throws:
      NullArgumentException - referenceId or contactGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.