The ININ.IceLib.Directories namespace contains classes for accessing Interaction Center directories.

The namespace is organized around tasks one would typically want to perform, such as:

  1. Retrieving and managing the list of directories
  2. Retrieving and managing the entries within a specific directory

Retrieving and managing the list of directories

Use the DirectoryConfiguration class to retrieve and manage a list of available directories, and to watch for changes to that list. Calling GetList()()()() or GetEntry(String) on a DirectoryConfiguration instance will retrieve one or more DirectoryMetadata elements, each one representing a specific directory, workgroup, speed dial list, etc. A DirectoryMetadata instance describes everything there is to know about a particular directory. It is also used to create a ContactDirectory which in turn is used to retrieve the entries within the specific directory.


Retrieving and managing the entries within a specific directory

To retrieve a list of entries within a directory, start by determining the DirectoryMetadata that describes the directory you are interested in. Construct a ContactDirectory instance using this metadata, call StartWatching()()()() to start the watch and then call GetList()()()() or GetEntry(String) to return one or more ContactEntry elements. Each returned ContactEntry instance represents a particular entry in the directory.

If you are dealing with large directories, it is advised that you using the paged view interface. The paged view interface requires setting up a ContactDirectoryWatchSettings instance that allows you to set a filter, sort order, start position and number of items to retrieve. The initial paged watched view is established by supplying an instance of ContactDirectoryWatchSettings to StartWatching(ContactDirectoryWatchSettings). Once the watch is established you can page back or forth by making a call to ChangeWatched(ContactDirectoryWatchSettings).


Synchronous Example

The following is an example of synchronously retrieving a list of all available directories and displaying the first and last name of each user in each directory.

Note
Using these classes in a synchronous manner is not recommended for client applications since the main thread will be blocked. It is shown here for a brief example. It is recommended to only use the synchronous methods if it is applicable to your application scenario (e.g. ASP.NET) or your application is making synchronous calls within a background thread.

CopyC#
static void PrintAllDirectories (ININ.IceLib.Connection.Session session)
{
    DirectoriesManager dirManager = DirectoriesManager.GetInstance(session);
    DirectoryConfiguration dirConfig = new DirectoryConfiguration(dirManager);

    dirConfig.StartWatching();
    System.Collections.ObjectModel.ReadOnlyCollection<DirectoryMetadata> metaData = dirConfig.GetList();

    foreach (DirectoryMetadata dirMetadata in metaData)
    {
        System.Console.Out.WriteLine("====== {0} Entries ======", dirMetadata.DisplayName);

        ContactDirectory contactDir = new ContactDirectory(dirManager, dirMetadata);
        contactDir.StartWatching();

        System.Collections.ObjectModel.ReadOnlyCollection<ContactEntry> contactEntries = contactDir.GetList();
        foreach (ContactEntry entry in contactEntries) 
        {
            System.Console.Out.WriteLine("{0}, {1}", entry.LastName, entry.FirstName);
        }
    }
}

Classes

  ClassDescription
Public classContactCountEventArgs
Provides data for the count change event ContactCountChanged.
Public classContactDirectory
Represents a contact directory. An instance of this object is used to obtain a watched list of contact entries and perform operations on them.
Public classContactDirectoryProgressChangedEventArgs
Public classContactDirectoryWatchSettings
This class represents settings for a directory watch that provides a filtered and sorted view of contact entries. This view can be returned in increments or pages at a time.
Public classContactEntry
Represents a directory contact watched object.
Public classContactFilterGroup
Represents a grouping of filter items.
Public classContactFilterItem
Serves as a base class for items that filter contact entries that should be returned.
Public classContactFilterMatch
Represents an item to filter contact entries that should be returned.
Public classContactSortItem
Represents an item to sort on a particular contact entry property.
Public classCreateDirectoryCompletedEventArgs
Public classDirectoriesManager
Provides access to all the various IC directories.
Public classDirectoryConfiguration
Represents IC directory configuration. An instance of this object is used to obtain a list of available directories and perform operations on them.
Public classDirectoryEventArgs<(Of <(<'TWatchedObject>)>)>
Provides data for watched object change events.
Public classDirectoryMetadata
Represents a directory metadata watched object. This object maintains information of a particular directory that exists on the IC server. The directory metadata is used to identify a directory of contact entries.
Public classDirectoryPhoneNumber
Represents a phone number stored in the contact directory.
Public classEditableContactEntry
Represents an editable contact entry object. This object is used to make updates to directory contacts.
Public classEditableDirectoryPhoneNumber
Represents a editable telephone number stored in the contact directory.
Public classExternalContactEntries
Provides a list of ExternalContactEntry objects for a ContactEntry.
Public classExternalContactEntry
Contains additional information to ContactEntry for contacts that relate to a system external to IC. A contact is considered to have an external IC relation, when contacts are added or merged in from an external source, or IC contains information specific to an external system.
Public classExternalPresenceProvider
Provides External Presence provider details of a ContactEntry.
Public classExternalPresenceProviders
Provides a list of ExternalPresenceProviders of a ContactEntry.
Public classPendingDirectoryEntries
Used to identify overall pending status and individual PendingDirectoryGroup statuses for directories (DirectoryConfigurationChanged or Pending).
Public classPendingDirectoryGroup
Represents a grouping of directories that are or were pending to be loaded.
Public classPendingEntries
Base class for identification of pending directory data.
Public classTrackerFilterAttribute
Tracker filter attribute.
Public classTrackerFilterSettings
Tracker filter settings.
Public classUserSkill
Represents a user's skill.

Enumerations

  EnumerationDescription
Public enumerationContactAccessRights
Specifies constants for the access rights of a directory contact.
Public enumerationContactFilterType
Represents the type of pattern matching that should be performed.
Public enumerationContactPrimaryNumberDesignation
Specifies constants indicating which directory contact property is the primary number.
Public enumerationContactProperty
Each value in this enumeration represents a property in ContactEntry.
Public enumerationContactSource
Used to identify the source(s) for a contact entry.
Public enumerationDirectoryMetadataAccessRights
Specifies constants for the access rights of a directory.
Public enumerationDirectoryMetadataCategory
Specifies constants for the category of a directory.
Public enumerationDirectoryMetadataDisplayType
Specifies constants for the display type of a directory.
Public enumerationDirectoryMetadataProperty
Specifies constants for the DirectoryMetadata properties.
Public enumerationPendingStatus
Identifies the pending status of a directory object.

Version Information

Supported for IC Server version 2015 R1 and beyond.
For 4.0, supported for IC Server version 4.0 GA and beyond.
For 3.0, supported for IC Server version 3.0 GA and beyond.