Hierarchies

Hierarchies is only available when you use an LDAP DN-style. Hierarchies are the substructures to partitions.

GetHierarchy

The signature of the single method is as follows:

Function GetHierarchy(configParameters, parent) As HierarchyNode

This method is called from the sync engine UI to draw the content of Select Containers. As input parameters, you receive the usual configParameters and the DN of the parent. The method is then supposed to return the direct descendants of that node in the target directory. Every time the administrator clicks one of the plus-signs to expand a node, this method is called again. If there are no children, simply return nothing back and the UI removes the plus, indicating no children.

How hierarchies are represented

The hierarchies are stored as a number of included and excluded nodes. The easiest way to understand is by looking at an example. You can see the same view using the built-in ADMA and select and unselect OUs. Then click on Advanced to see how the configuration is stored in the sync engine.

As you can see, the entire structure is a list of included and excluded nodes.

Hierarchies in the Active Directory connector

Hierarchies in the Active Directory connector

Notice that the checkboxes in the UI have four states:

  • Unselected and white background (for example "Users")
  • Unselected and grey background (for example "Europe")
  • Selected and white background (for example "Americas")
  • Selected and grey background(for example "ManagedObjects")

These different states represent how new OUs should be handled.

  • When selected, a new OU (for example "Canada" under "Americas") would be included.
  • When unselected, a new OU (for example "Germany" under "Europe") would be excluded.

The OU "ManagedObjects" is included, but it has OUs under it marked as excluded. The OU "Europe" is excluded, but it has OUs under it marked as included. That is why these two have a grey background.

This structure of included and excluded hierarchy nodes is what is going to be passed into the OpenImportConnection method. You can then adjust your import code to use this information.