Interface ContactSmartAddressBookSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ContactSmartAddressBookSession extends OsidSession

This session manages queries and sequencing to create "smart" dynamic catalogs. A ContactQuery can be retrieved from this session and mapped to this AddressBook to create a virtual collection of Contacts . The addresses may be sequenced using the ContactSearchOrder from this session.

This AddressBook has a default query that matches any contact and a default search order that specifies no sequencing. The queries may be examined using a ContactQueryInspector . The query may be modified by converting the inspector back to a ContactQuery .

  • 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 AddressBook associated with this session
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageSmartAddressBooks

      boolean canManageSmartAddressBooks()
      Tests if this user can manage smart address books. A return of true does not guarantee successful authorization. A return of false indicates that it is known 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 operations to unauthorized users.
      Returns:
      false if smart address book management is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getContactQuery

      ContactQuery getContactQuery()
      Gets a contact query.
      Returns:
      the contact query
      Compliance:
      mandatory - This method must be implemented.
    • getContactSearchOrder

      ContactSearchOrder getContactSearchOrder()
      Gets a contact search order.
      Returns:
      the contact search order
      Compliance:
      mandatory - This method must be implemented.
    • applyContactQuery

      void applyContactQuery(ContactQuery contactQuery) throws OperationFailedException, PermissionDeniedException
      Applies a contact query to this address book.
      Parameters:
      contactQuery - the contact query
      Throws:
      NullArgumentException - contactQuery is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - contactQuery not of this service
      Compliance:
      mandatory - This method must be implemented.
    • inspectContactQuery

      Gets a contact query inspector for this address book.
      Returns:
      the contact query inspector
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • applyContactSequencing

      void applyContactSequencing(ContactSearchOrder contactSearchOrder) throws OperationFailedException, PermissionDeniedException
      Applies a contact search order to this address book.
      Parameters:
      contactSearchOrder - the contact search order
      Throws:
      NullArgumentException - contactSearchOrder is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - contactSearchOrder not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getContactQueryFromInspector

      ContactQuery getContactQueryFromInspector(ContactQueryInspector contactQueryInspector)
      Gets a contact query from an inspector.
      Parameters:
      contactQueryInspector - a query inspector
      Returns:
      the contact query
      Throws:
      NullArgumentException - contactQueryInspector is null
      UnsupportedException - contactQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.