ConnectorFacade interface
|
Connectors continue to be released outside the IDM release. For the latest documentation, refer to the OpenICF documentation. |
An application interacts with a connector through an instance of the ConnectorFacade class. The following diagram shows the creation and configuration of the connector facade. The components shown here are described in more detail in the sections that follow.
The connector facade is instantiated and configured in the following steps:
-
The application creates a
LocalConnectorInfoManagerinstance (or instances) and adds the individual connector bundles (or assemblies).The
LocalConnectorInfoManagerprocesses these bundles or assemblies to instantiate aConnectorInfoobject.To be processed by the connector info manager, the connector bundle or assembly must have the following characteristics:
- Java Connector Bundle
-
The
META-INF/MANIFEST.MFfile must include the following entries:-
ConnectorBundle-FrameworkVersion- Minimum required OpenICF Framework version (either 1.1, 1.4, or 1.5) -
ConnectorBundle-Name- Unique name of the connector bundle -
ConnectorBundle-Version- Version of the connector bundle
The combination of the
ConnectorBundle-Nameand theConnectorBundle-Versionmust be unique.The connector bundle JAR must contain at least one class, that has the
ConnectorClassannotation and implements theConnectorinterface. -
- .NET Connector Assembly
-
The
AssemblyInfo.csis used to determine the bundle version, from theAssemblyVersionproperty.The bundle name is derived from the
Nameproperty of the assembly. For more information, refer to the corresponding Microsoft documentation.If you change the name of your assembly, you must adjust the
bundleNameproperty in your connector configuration file, accordingly.The connector assembly DLL must contain at least one class, that has the
ConnectorClassAttributeattribute and implements theConnectorinterface.
-
For each connector, the
LocalConnectorInfoManagerprocesses theMessageCatalog, which contains the localized help and description messages for the configuration, and any log or error messages for the connector.Your application can use this information to provide additional help during the connector configuration process.
-
For each connector, the
LocalConnectorInfoManagerthen processes theConfigurationClass, to build the configuration properties for the connector. -
Your application finds the connector info by its connector key. When the application has the connector info, it creates an API Configuration object that customizes the following components:
-
Object pool configuration
-
Result handler configuration
-
Configuration properties
-
Timeout configuration
The API Configuration object is described in more detail in The API Configuration Object.
-
-
The
ConnectorFacadetakes this customized API configuration object, determines which connector to use and how to configure it, and implements all of the OpenICF API operations.
Creating a ConnectorFacade
Applications access the connector API through a ConnectorFacade class, and interact with the connector through a ConnectorFacade instance.
The following steps describe how to create a ConnectorFacade in your application.
-
Create a
ConnectorInfoManagerand acquire theConnectorInfoobject for your connector, as described in the previous section. -
From the
ConnectorInfoobject, create the defaultAPIConfiguration.APIConfiguration apiConfig = info.createDefaultAPIConfiguration(); -
Use the default
APIConfigurationto set theObjectPoolConfiguration,ResultsHandlerConfiguration,ConfigurationProperties, andTimeoutConfiguration.ConfigurationProperties properties = apiConfig.getConfigurationProperties(); -
Set all of the
ConfigurationPropertiesthat you need for the connector, usingsetPropertyValue().properties.setPropertyValue("host", SAMPLE_HOST); properties.setPropertyValue("adminName", SAMPLE_ADMIN); properties.setPropertyValue("adminPassword", SAMPLE_PASSWORD); properties.setPropertyValue("useSSL", false); -
Use the
newInstance()method of theConnectorFacadeFactoryto create a new instance of the connector.ConnectorFacade conn = ConnectorFacadeFactory.getInstance() .newInstance(apiConfig); -
Validate that you have set up the connector configuration correctly.
conn.validate(); -
Use the new connector with the supported operations (described in the following sections).
conn.[authenticate|create|update|delete|search|...]