Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix documentation issues #79

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
246 changes: 229 additions & 17 deletions openidm-doc/src/main/asciidoc/connectors-guide/chap-groovy.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,22 @@ Sample implementations are provided in xref:../samples-guide/chap-groovy-samples
The Scripted Groovy Connector implements the following OpenICF interfaces.
--

link:../connectors-guide/index.html#interface-AuthenticationApiOp[Authenticate]::
xref:appendix-interfaces.adoc#interface-AuthenticationApiOp[Authenticate]::
Provides simple authentication with two parameters, presumed to be a user name and password.

link:../connectors-guide/index.html#interface-CreateApiOp[Create]::
xref:appendix-interfaces.adoc#interface-CreateApiOp[Create]::
Creates an object and its `uid`.

link:../connectors-guide/index.html#interface-DeleteApiOp[Delete]::
xref:appendix-interfaces.adoc#interface-DeleteApiOp[Delete]::
Deletes an object, referenced by its `uid`.

link:../connectors-guide/index.html#interface-ResolveUsernameApiOp[Resolve Username]::
xref:appendix-interfaces.adoc#interface-ResolveUsernameApiOp[Resolve Username]::
Resolves an object by its username and returns the `uid` of the object.

link:../connectors-guide/index.html#interface-SchemaApiOp[Schema]::
xref:appendix-interfaces.adoc#interface-SchemaApiOp[Schema]::
Describes the object types, operations, and options that the connector supports.

link:../connectors-guide/index.html#interface-ScriptOnConnectorApiOp[Script on Connector]::
xref:appendix-interfaces.adoc#interface-ScriptOnConnectorApiOp[Script on Connector]::
Enables an application to run a script in the context of the connector. Any script that runs on the connector has the following characteristics:
+

Expand All @@ -67,16 +67,16 @@ Enables an application to run a script in the context of the connector. Any scri
* The script has access to any script-arguments passed in by the application.


link:../connectors-guide/index.html#interface-ScriptOnResourceApiOp[Script on Resource]::
xref:appendix-interfaces.adoc#interface-ScriptOnResourceApiOp[Script on Resource]::
Runs a script on the target resource that is managed by this connector.

link:../connectors-guide/index.html#interface-SearchApiOp[Search]::
xref:appendix-interfaces.adoc#interface-SearchApiOp[Search]::
Searches the target resource for all objects that match the specified object class and filter.

link:../connectors-guide/index.html#interface-SyncApiOp[Sync]::
xref:appendix-interfaces.adoc#interface-SyncApiOp[Sync]::
Polls the target resource for synchronization events, that is, native changes to objects on the target resource.

link:../connectors-guide/index.html#interface-TestApiOp[Test]::
xref:appendix-interfaces.adoc#interface-TestApiOp[Test]::
Tests the connector configuration. Testing a configuration checks all elements of the environment that are referred to by the configuration are available. For example, the connector might make a physical connection to a host that is specified in the configuration to verify that it exists and that the credentials that are specified in the configuration are valid.

+
Expand All @@ -85,7 +85,7 @@ This operation might need to connect to a resource, and, as such, might take som
+
You can invoke the test operation before a connector configuration has been validated.

link:../connectors-guide/index.html#interface-UpdateApiOp[Update]::
xref:appendix-interfaces.adoc#interface-UpdateApiOp[Update]::
Updates (modifies or replaces) objects on a target resource.

--
Expand All @@ -100,29 +100,241 @@ The Scripted Groovy Connector has the following configurable properties.
==== Operation Script Files Properties


[cols="33%,17%,16%,17%,17%"]
[cols="33%,17%,16%,17%,17%", stripes=even]
|===
|Property |Type |Default |Encrypted |Required
|Property |Type |Default |Encrypted |Required

a| `authenticateScriptFileName`
a| `String`
a| `null`
a|
a| xref:appendix-interfaces.adoc#interface-AuthenticationApiOp[Authenticate]

5+a| The name of the file used to perform the AUTHENTICATE operation.

a| `deleteScriptFileName`
a| `String`
a| `null`
a|
a|xref:appendix-interfaces.adoc#interface-DeleteApiOp[Delete]

5+a| The name of the file used to perform the DELETE operation.

a| `schemaScriptFileName`
a| `String`
a| `null`
a|
a|xref:appendix-interfaces.adoc#interface-SchemaApiOp[Schema]

5+a| The name of the file used to perform the SCHEMA operation.

a| `customizerScriptFileName`
a| `String`
a| `null`
a|
a| No

5+a| The script used to customize some function of the connector. Read the documentation for more details.

a| `resolveUsernameScriptFileName`
a| `String`
a| `null`
a|
a| xref:appendix-interfaces.adoc#interface-ResolveUsernameApiOp[Resolve Username]

5+a| The name of the file used to perform the RESOLVE_USERNAME operation.

a| `testScriptFileName`
a| `String`
a| `null`
a|
a| xref:appendix-interfaces.adoc#interface-TestApiOp[Test]

5+a| The name of the file used to perform the TEST operation.

a| `updateScriptFileName`
a| `String`
a| `null`
a|
a| xref:appendix-interfaces.adoc#interface-UpdateApiOp[Update]

5+a| The name of the file used to perform the UPDATE operation.

a| `searchScriptFileName`
a| `String`
a| `null`
a|
a| xref:appendix-interfaces.adoc#interface-SearchApiOp[Search]

5+a| The name of the file used to perform the SEARCH operation.

a| `scriptOnResourceScriptFileName`
a| `String`
a| `null`
a|
a| xref:appendix-interfaces.adoc#interface-ScriptOnResourceApiOp[Script on Resource]

5+a| The name of the file used to perform the RUNSCRIPTONRESOURCE operation.

a| `createScriptFileName`
a| `String`
a| `null`
a|
a| xref:appendix-interfaces.adoc#interface-CreateApiOp[Create]

5+a| The name of the file used to perform the CREATE operation.

a| `syncScriptFileName`
a| `String`
a| `null`
a|
a| xref:appendix-interfaces.adoc#interface-SyncApiOp[Sync]

5+a| The name of the file used to perform the SYNC operation

|===


[#groovy-engine-configuration-properties-org-forgerock-openicf-connectors-groovy-ScriptedConnector-1_4_2_1]
==== Groovy Engine configuration Properties


[cols="33%,17%,16%,17%,17%"]
[cols="33%,17%,16%,17%,17%", stripes=even]
|===
|Property |Type |Default |Encrypted |Required
|Property |Type |Default |Encrypted |Required

a| `warningLevel`
a| `int`
a| `1`
a|
a| No

5+a| Warning Level of the compiler

a| `minimumRecompilationInterval`
a| `int`
a| `100`
a|
a| No

5+a| Sets the minimum of time after a script can be recompiled.

a| `scriptRoots`
a| `String[]`
a| `null`
a|
a| Yes

5+a| The root folder to load the scripts from. If the value is null or empty the classpath value is used.

a| `debug`
a| `boolean`
a| `false`
a|
a| No

5+a| If true, debugging code should be activated

a| `targetDirectory`
a| `File`
a| `null`
a|
a| No

5+a| Directory into which to write classes.

a| `disabledGlobalASTTransformations`
a| `String[]`
a| `null`
a|
a| No

5+a| Sets a list of global AST transformations which should not be loaded even if they are defined in `META-INF/org.codehaus.groovy.transform.ASTTransformation` files. By default, none is disabled.

a| `classpath`
a| `String[]`
a| `[]`
a|
a| No

5+a| Classpath for use during compilation.

a| `scriptExtensions`
a| `String[]`
a| `['groovy']`
a|
a| No

5+a| Script extensions

a| `sourceEncoding`
a| `String`
a| `UTF-8`
a|
a| No

5+a| Encoding for source files

a| `scriptBaseClass`
a| `String`
a| `null`
a|
a| No

5+a| Base class name for scripts (must derive from Script)

a| `verbose`
a| `boolean`
a| `false`
a|
a| No

5+a| If true, the compiler should produce action information

a| `recompileGroovySource`
a| `boolean`
a| `false`
a|
a| No

5+a| If set to true recompilation is enabled

a| `tolerance`
a| `int`
a| `10`
a|
a| No

5+a| The error tolerance, which is the number of non-fatal errors (per unit) that should be tolerated before compilation is aborted


|===


[#configuration-properties-org-forgerock-openicf-connectors-groovy-ScriptedConnector-1_4_2_1]
==== Configuration Properties


[cols="33%,17%,16%,17%,17%"]
[cols="33%,17%,16%,17%,17%", stripes=even]
|===
|Property |Type |Default |Encrypted |Required
|Property |Type |Default |Encrypted |Required

a| `customConfiguration`
a| `String`
a| `null`
a|
a| No

5+a| Custom Configuration script for Groovy ConfigSlurper

a| `customSensitiveConfiguration`
a| `GuardedString`
a| `null`
a| Yes
a| No

5+a| Custom Sensitive Configuration script for Groovy ConfigSlurper

|===


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The mapping from the internal repository to the external `hrdb` database (`manag

* Custom scripted endpoints
+
All scripted connectors support the configuration of custom scripted endpoints. These are configured in the provisioner configuration file and allow you to execute custom scripts over REST. This example uses a custom scripted endpoint to reset the database and populate it with data. Custom scripted endpoints are illustrated in the the custom script step< of xref:#build-custom-connector["Building the Custom ScriptedSQL Connector"].
All scripted connectors support the configuration of custom scripted endpoints. These are configured in the provisioner configuration file and allow you to execute custom scripts over REST. This example uses a custom scripted endpoint to reset the database and populate it with data. Custom scripted endpoints are illustrated in the custom script step< of xref:#build-custom-connector["Building the Custom ScriptedSQL Connector"].


[CAUTION]
Expand Down Expand Up @@ -83,10 +83,10 @@ $ cp mysql-connector-java-version-bin.jar /path/to/openidm/bundle/

. Set up MySQL to listen on localhost, port 3306. You will connect to the database as user `root` with password `password`.
+
If want to use an existing MySQL instance that runs on a different host or port, adjust the configuration file for the sample (`sample3/data/scriptedsql.json`) before you launch the connector bundler. The default generated configuration is as follows:
If you want to use an existing MySQL instance that runs on a different host or port, adjust the configuration file for the sample (`sample3/data/scriptedsql.json`) before you launch the connector bundler. The default generated configuration is as follows:
+

[source, javascript]
[source, json]
----
"configurationProperties" : {
"username" : "root",
Expand Down Expand Up @@ -217,7 +217,7 @@ Edit the value of the `"systemActions"` property in the connector configuration
The edited excerpt of the `conf/provisioner.openicf-hrdb.json` file should appear as follows:
+

[source, javascript]
[source, json]
----
"systemActions": [
{
Expand Down Expand Up @@ -619,7 +619,7 @@ This sample assumes an OpenDJ server, running on the localhost. Follow these ste

====

. Download and extract the OpenDJ zip archive from link:https://forgerock.org/downloads/[https://forgerock.org/downloads/, window=\_blank].
. Download and extract the OpenDJ zip archive from the link:https://github.com/OpenIdentityPlatform/OpenDJ/releases[GitHub, window=\_blank].

. Install OpenDJ using the command-line setup, as follows:
+
Expand Down Expand Up @@ -749,7 +749,7 @@ Processing ADD request for ou=Groups,dc=example,dc=com
ADD operation successful for DN ou=Groups,dc=example,dc=com
----

. To configure the mapping between JSON resources and LDAP entries, copy the the configuration file for the HTTP connection handler (`scriptedrest2dj/data/http-config.json`) to OpenDJ's configuration directory.
. To configure the mapping between JSON resources and LDAP entries, copy the configuration file for the HTTP connection handler (`scriptedrest2dj/data/http-config.json`) to OpenDJ's configuration directory.
+

[source, console]
Expand Down Expand Up @@ -1056,7 +1056,7 @@ This sample assumes an OpenDJ server, running on the localhost. Follow these ste

====

. Download and extract the OpenDJ zip archive from link:https://forgerock.org/downloads/[https://forgerock.org/downloads/, window=\_blank].
. Download and extract the OpenDJ zip archive from the link:https://github.com/OpenIdentityPlatform/OpenDJ/releases[GitHub, window=\_blank].

. Install OpenDJ using the command-line setup, as follows:
+
Expand Down Expand Up @@ -1186,7 +1186,7 @@ Processing ADD request for ou=Groups,dc=example,dc=com
ADD operation successful for DN ou=Groups,dc=example,dc=com
----

. To configure the mapping between JSON resources and LDAP entries, copy the the configuration file for the HTTP connection handler (`scriptedcrest2dj/data/http-config.json`) to OpenDJ's configuration directory.
. To configure the mapping between JSON resources and LDAP entries, copy the configuration file for the HTTP connection handler (`scriptedcrest2dj/data/http-config.json`) to OpenDJ's configuration directory.
+

[source, console]
Expand Down
Loading