IDM 7.2.2

Scripted connectors with Groovy

Connectors continue to be released outside the IDM release. For the latest documentation, refer to the ICF documentation.

The Groovy Connector Toolkit lets you run Groovy scripts to interact with any external resource.

The Groovy Connector Toolkit is not a complete connector, in the traditional sense. Rather, it is a framework within which you must write your own Groovy scripts to address the requirements of your deployment. The toolkit is bundled with IDM in the JAR openidm/connectors/groovy-connector-1.5.20.15.jar.

IDM provides a number of deployment-specific scripts to help you get started with the Groovy Connector Toolkit. These scripts demonstrate how the toolkit can be used. The scripts cannot be used "as is" in your deployment, but can be used as a starting point on which to base your customization.

The Groovy Connector Toolkit can be used with any ICF-enabled project (that is, any project in which the ForgeRock Open Connector Framework is installed).

About the Groovy scripting language

Groovy is a powerful, convenient scripting language for the Java platform. Groovy lets you take advantage of existing Java resources, and generally makes development quicker. Syntactically, Groovy is similar to JavaScript. Extensive information about Groovy is available on the Groovy documentation site.

Selecting a scripted connector implementation

The Groovy Connector Toolkit provides five default connector implementations. The default implementations should address the requirements of most target resources. If you use one of the default implementations, you need only write the accompanying scripts and point your connector to their location. If your target resource is not covered by the default implementations, you can use the Maven archetype to create a new connector project, and write a custom Groovy-based connector from scratch.

The following list describes the default scripted connector implementations provided with the Groovy Connector Toolkit:

  • GROOVY - a basic non-pooled Groovy connector, provided in the org.forgerock.openicf.connectors.groovy.ScriptedConnector class.

    POOLABLEGROOVY - a poolable Groovy connector, provided in the org.forgerock.openicf.connectors.groovy.ScriptedPoolableConnector class.

When you have selected a scripted connector implementation, write the required scripts that correspond to that connector type. ICF operations with Groovy scripts provides information and examples on how to write scripts for the basic scripted connector implementation, and information on the extensions available for the other implementations.

Copyright © 2010-2023 ForgeRock, all rights reserved.