For configuring a connector, several interfaces are available.
These can be broken down into some categories. There are interfaces used for configuring the connector, interfaces used at runtime, and finally password interfaces.
Configuration interfaces are used during initial creation of the connector and for reconfiguring it.
There are two different interfaces for retrieving connector capabilities:
The first is used when you know exactly what your connector can support and you do not need any input from the administrator. The second interface provides information gathered from the administrator in the sync engine UI. As an example, this can be seen in the PowerShell connector from Microsoft. In this connector, all possible options can be configured by the administrator:
Then there are interfaces for defining the pages that appear during creation and reconfiguration. These are defined as parameter objects that should be drawn by the sync engine UI:
There is also an interface for returning the connected directory's schema to the sync engine. This interface is called on creation of the connector and when the administrator selects refresh schema in the sync engine UI.
LDAP DN-style interfaces
When you configured the DN-style in the capabilities to be LDAP, then you have two additional interfaces you can implement and support:
Import and export
There are four interfaces for working with import and export. Two file-based and two call-based. Of these, the call-based are preferred. The file-based interfaces were only added to allow backward compatibility with ECMA1. An ECMA1 connector (not using a hybrid approach of file-import and call-export) should be possible to recompile with ECMA2. For all other scenarios, the call-based interfaces should be used. File-based interfaces are not described any further - these are deprecated and not further developed.
The interfaces have three common methods:
The purpose is to put everything you need to establish a connection in the Open method. Get/Put is used for the main processing. Close is used to clean-up and properly close the connection.
It might seem overly complicated and I have frequently seen code samples putting everything in the Get/Put method. The reason for why there are three is what happens when exceptions are thrown or the connector is forcefully stopped from the UI. In this case, the sync engine calls the Close method to give the connector the possibility to gracefully clean up and not leave open connections. That said, if your connector is only working with processing files and only supports full import, then there might not be anything to clean-up and easier to only implement a single method.
The interfaces also have these two properties:
These two properties determine the default value that should appear in the page (import)/batch (export) size property in the run profile and the max value the administrator can set it to:
The final category of interfaces is for password management. This interface is called to synchronize passwords from either PCNS or when set/changed using WMI.