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:
- Retrieving and managing the list of directories
- 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. |
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
Class | Description | |
---|---|---|
ContactCountEventArgs |
Provides data for the count change event ContactCountChanged.
| |
ContactDirectory |
Represents a contact directory. An instance of this object is used
to obtain a watched list of contact entries and perform operations on them.
| |
ContactDirectoryProgressChangedEventArgs |
Represents the current progress for a task invoked by StartWatchingAsync(AsyncCompletedEventHandler, Object),
or StartWatchingAsync(ContactDirectoryWatchSettings, AsyncCompletedEventHandler, Object).
| |
ContactDirectoryWatchSettings |
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.
| |
ContactEntry |
Represents a directory contact watched object.
| |
ContactFilterGroup |
Represents a grouping of filter items.
| |
ContactFilterItem |
Serves as a base class for items that filter contact entries that should be returned.
| |
ContactFilterMatch |
Represents an item to filter contact entries that should be returned.
| |
ContactSortItem |
Represents an item to sort on a particular contact entry property.
| |
CreateDirectoryCompletedEventArgs |
Provides data for the CreateTrackerDirectoryAsync(String, TrackerFilterSettings, EventHandler<(Of <<'(CreateDirectoryCompletedEventArgs>)>>), Object)
and CreateSpeedDialDirectory(String, DirectoryMetadataAccessRights) completedCallback
delegate of DirectoryConfiguration.
| |
DirectoriesManager |
Provides access to all the various IC directories.
| |
DirectoryConfiguration |
Represents IC directory configuration. An instance of this object is used
to obtain a list of available directories and perform operations on them.
| |
DirectoryEventArgs<(Of <(<'TWatchedObject>)>)> |
Provides data for watched object change events.
| |
DirectoryMetadata |
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.
| |
DirectoryPhoneNumber |
Represents a phone number stored in the contact directory.
| |
EditableContactEntry |
Represents an editable contact entry object. This object is used to make updates to directory contacts.
| |
EditableDirectoryPhoneNumber |
Represents a editable telephone number stored in the contact directory.
| |
ExternalContactEntries |
Provides a list of ExternalContactEntry objects for a ContactEntry.
| |
ExternalContactEntry |
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.
| |
ExternalPresenceProvider |
Provides External Presence provider details of a ContactEntry.
| |
ExternalPresenceProviders |
Provides a list of ExternalPresenceProviders of a ContactEntry.
| |
PendingDirectoryEntries |
Used to identify overall pending status and individual PendingDirectoryGroup statuses for
directories (DirectoryConfigurationChanged or
Pending).
| |
PendingDirectoryGroup |
Represents a grouping of directories that are or were pending to be loaded.
| |
PendingEntries |
Base class for identification of pending directory data.
| |
TrackerFilterAttribute |
Tracker filter attribute.
| |
TrackerFilterSettings |
Tracker filter settings.
| |
UserSkill |
Represents a user's skill.
|
Enumerations
Enumeration | Description | |
---|---|---|
ContactAccessRights |
Specifies constants for the access rights of a directory contact.
| |
ContactFilterType |
Represents the type of pattern matching that should be performed.
| |
ContactPrimaryNumberDesignation |
Specifies constants indicating which directory contact property
is the primary number.
| |
ContactProperty |
Each value in this enumeration represents a property in ContactEntry.
| |
ContactSource |
Used to identify the source(s) for a contact entry.
| |
DirectoryMetadataAccessRights |
Specifies constants for the access rights of a directory.
| |
DirectoryMetadataCategory |
Specifies constants for the category of a directory.
| |
DirectoryMetadataDisplayType |
Specifies constants for the display type of a directory.
| |
DirectoryMetadataProperty |
Specifies constants for the DirectoryMetadata properties.
| |
PendingStatus |
Identifies the pending status of a directory object.
|
Version Information
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.