Interface ContactEnablerRuleLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ContactEnablerRuleLookupSession extends OsidSession

This session provides methods to retrieve ContactEnabler to Contact mappings. A Contact with multiple ContactEnablers means any positive rule evaluation across the enablers result in an enabled Contact .

This lookup session defines several views:

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete result set or is an error condition
  • isolated address book view: All methods in this session operate, retrieve and pertain contact enablers defined explicitly in the current address book
  • federated address book view: All methods in this session operate, retrieve and pertain to all contact enablers defined in this address book and any other contact enablers implicitly available in this address book through address book inheritence.
  • 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.
    • canLookupContactEnablerRules

      boolean canLookupContactEnablerRules()
      Tests if this user can perform lookups of contact enabler/contact mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known lookup 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 lookup operations to unauthorized users.
      Returns:
      false if looking up mappings is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeContactEnablerRuleView

      void useComparativeContactEnablerRuleView()
      The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
      Compliance:
      mandatory - This method is must be implemented.
    • usePlenaryContactEnablerRuleView

      void usePlenaryContactEnablerRuleView()
      A complete view of the ContactEnabler and 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.
      Compliance:
      mandatory - This method is must be implemented.
    • useFederatedAddressBookView

      void useFederatedAddressBookView()
      Federates the view for methods in this session. A federated view will include contact enablers in address books which are children of this address book in the address book hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedAddressBookView

      void useIsolatedAddressBookView()
      Isolates the view for methods in this session. An isolated view restricts lookups to this address book only.
      Compliance:
      mandatory - This method is must be implemented.
    • getContactEnablerIdsForContact

      IdList getContactEnablerIdsForContact(Id contactId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the ContactEnabler Id associated with a Contact .
      Parameters:
      contactId - Id of the Contact
      Returns:
      the contact enabler Ids
      Throws:
      NotFoundException - contactId is not found
      NullArgumentException - contactId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getContactEnablersForContact

      Gets the ContactEnabler associated with a Contact .
      Parameters:
      contactId - Id of the Contact
      Returns:
      the contact enablers
      Throws:
      NotFoundException - contactId is not found
      NullArgumentException - contactId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getContactIdsForContactEnabler

      IdList getContactIdsForContactEnabler(Id contactEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the COntact Ids mapped to a ContactEnabler .
      Parameters:
      contactEnablerId - Id of a ContactEnabler
      Returns:
      list of contact Ids
      Throws:
      NotFoundException - contactEnablerId is not found
      NullArgumentException - contactEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getContactsForContactEnabler

      ContactList getContactsForContactEnabler(Id contactEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the Contacts mapped to a ContactEnabler .
      Parameters:
      contactEnablerId - Id of a ContactEnabler
      Returns:
      list of contacts
      Throws:
      NotFoundException - contactEnablerId is not found
      NullArgumentException - contactEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.