Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorial:dev:conector_-_how_to_implement_connector [2019/01/07 15:35] hanakp [4. Setup logging for connector] |
tutorial:dev:conector_-_how_to_implement_connector [2020/06/10 08:07] (current) kucerar licence |
||
---|---|---|---|
Line 3: | Line 3: | ||
In this tutorial, we will see how to implement connector. Our example is CSV Connector. | In this tutorial, we will see how to implement connector. Our example is CSV Connector. | ||
- | ===== 1. Download and generate | + | ===== 1. Generate |
+ | ==== First option without downloading ==== | ||
+ | Other option is to use this command to generate skeleton for new connector. You don't need to clone the repository and this should work, because the connector-archetype artifact is available in standard maven repository. | ||
+ | < | ||
+ | After this you will be prompted to fill additional information about your connector. See picture in Second option how to create connector | ||
+ | |||
+ | ==== Second option with downloading the artifact to your machine ==== | ||
We do not have start whole project from scratch. What we need to is: | We do not have start whole project from scratch. What we need to is: | ||
* Download or clone archetype - https:// | * Download or clone archetype - https:// | ||
Line 11: | Line 17: | ||
{{ : | {{ : | ||
* After we have this setup, we can start to generate the schema. Just type 'mvn archetype: | * After we have this setup, we can start to generate the schema. Just type 'mvn archetype: | ||
- | * We have to go through point-to-point creation of our connector as you can see in the picture below | + | * We have to go through point-to-point creation of our connector as you can see in the picture under Few other steps to go through |
{{ : | {{ : | ||
* Here we have to find number of the ' | * Here we have to find number of the ' | ||
Line 25: | Line 31: | ||
</ | </ | ||
- | ===== 2. Implement generated schema ===== | + | ===== 2. Licence for new connector ===== |
+ | When you have skeleton for the new connector from artifact, you need to created two files if you have plans to edit any file which was generated. Your new connector will be under CDDL and Apache licence. Requirements are changelog file and licence file. | ||
+ | |||
+ | In root directory for you connector create: | ||
+ | * LICENCE - example https:// | ||
+ | * CHANGELOG.md - example https:// | ||
+ | |||
+ | |||
+ | ===== 3. Implement generated schema ===== | ||
Now everything is generated so we can start to implement the connector. First, we need to change the name of our Sample classes. Let's say we change these names to // | Now everything is generated so we can start to implement the connector. First, we need to change the name of our Sample classes. Let's say we change these names to // | ||
Line 722: | Line 736: | ||
</ | </ | ||
- | ===== 3. Add connector to IDM ===== | + | ===== 4. Add connector to IDM ===== |
After everything is written we should add our new connector into IDM. It might look like its hard but actually, it is easy. We just add dependency into app module in CzechIdM app. | After everything is written we should add our new connector into IDM. It might look like its hard but actually, it is easy. We just add dependency into app module in CzechIdM app. | ||
Line 735: | Line 749: | ||
</ | </ | ||
- | ===== 4. Setup logging for connector ===== | + | ===== 5. Setup logging for connector ===== |
If you want to log for example INFO messages from connectors you have to add following property to your active profile in logback-spring.xml: | If you want to log for example INFO messages from connectors you have to add following property to your active profile in logback-spring.xml: |