Easy development of REST-based connectors is a very attractive feature. Therefore we have created an alternative way: the REST connector superclass. This is a small component in the polygon project:
The component can be used as a superclass for your connector. It will provide basic configuration parameters (URL, username, ...) and connection management. So you will still need only to write the operation methods. But you will do that in Java, with proper type checking, versioning, dependency management, ConnId version checks and so on. All the things that a proper connector should have.
How To Use The Superclass
There are three basic things: dependency, configuration class and connector class.
The dependency is simple. Just add the following dependency into your connector
(adjust the polygon version with the version that you use for connector parent)
Your connector configuration class should be a subclass of
AbstractRestConfiguration class defines the basic configuration variables for establishing a connection. Add any configuration variables that are specific to your connector code to this subclass.
Your connector class should be a subclass of
AbstractRestConnector and it should be parametrized with the specific type of the configuration class:
AbstractRestConnector class implements the basic initialization and disposal code, connection management and so on.
Implement The Operations
And that's it. Now go heade and implement the operations. E.g.:
|Example REST Connector||https://github.com/Evolveum/connector-rest-example||Dummy REST connector that illustrates basic connector structure. It does not really do much.|
|Drupal Connector||https://github.com/Evolveum/connector-drupal||Fully functional connector for Drupal using its REST API.|