[prev in list] [next in list] [prev in thread] [next in thread]
List: forgerock-openidm-commit
Subject: [CommitOpenIDM] [5477] trunk/src/main/docbkx/integrators-guide/appendix-scripting.xml: [
From: anonymous () forgerock ! org
Date: 2015-06-23 22:36:29
Message-ID: 20150623223629.3984A3FA1E () sources ! internal ! forgerock ! com
[Download RAW message or body]
[Attachment #2 (text/html)]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[5477] trunk/src/main/docbkx/integrators-guide/appendix-scripting.xml: \
[OPENIDM-3151] [OPENIDM-3322] Changes to scripting appendix</title> </head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: \
verdana,arial,helvetica,sans-serif; font-size: 10pt; } #msg dl a { font-weight: \
bold} #msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: \
bold; } #msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: \
6px; } #logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em \
0; } #logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg \
h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; } \
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; \
} #logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: \
-1.5em; padding-left: 1.5em; } #logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em \
1em 0 1em; background: white;} #logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid \
#fa0; border-bottom: 1px solid #fa0; background: #fff; } #logmsg table th { \
text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted \
#fa0; } #logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: \
0.2em 0.5em; } #logmsg table thead th { text-align: center; border-bottom: 1px solid \
#fa0; } #logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: \
6px; } #patch { width: 100%; }
#patch h4 {font-family: \
verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, \
#patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch ins \
{background:#dfd;text-decoration:none;display:block;padding:0 10px;} #patch del \
{background:#fdd;text-decoration:none;display:block;padding:0 10px;} #patch .lines, \
.info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a \
href="http://sources.forgerock.org/changelog/openidm/?cs=5477">5477</a></dd> \
<dt>Author</dt> <dd>Mike2</dd> <dt>Date</dt> <dd>2015-06-23 23:36:29 +0100 (Tue, 23 \
Jun 2015)</dd> </dl>
<h3>Log Message</h3>
<pre>[<a href="https://bugster.forgerock.org/jira/browse/OPENIDM-3151">OPENIDM-3151</a>] \
[<a href="https://bugster.forgerock.org/jira/browse/OPENIDM-3322">OPENIDM-3322</a>] \
Changes to scripting appendix</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcmaindocbkxintegratorsguideappendixscriptingxml">trunk/src/main/docbkx/integrators-guide/appendix-scripting.xml</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcmaindocbkxintegratorsguideappendixscriptingxml"></a>
<div class="modfile"><h4>Modified: \
trunk/src/main/docbkx/integrators-guide/appendix-scripting.xml (5476 => 5477)</h4> \
<pre class="diff"><span> <span class="info">--- \
trunk/src/main/docbkx/integrators-guide/appendix-scripting.xml 2015-06-23 14:32:45 \
UTC (rev 5476)
+++ trunk/src/main/docbkx/integrators-guide/appendix-scripting.xml 2015-06-23 \
22:36:29 UTC (rev 5477) </span><span class="lines">@@ -1598,189 +1598,200 @@
</span><span class="cx"> <para>
</span><span class="cx"> The variables that are available to scripts depend on \
the triggers that </span><span class="cx"> launch the script, and on the \
locations in which those triggers are </span><del>- defined. The following \
section outlines the available variables, per
- trigger.
</del><ins>+ defined. The following table lists triggers, with associated \
variables. </ins><span class="cx"> </para>
</span><ins>+
+ <table pgwide="1" xml:id="table-openam-basic">
+ <title>Script Triggers and Associated Variables</title>
+
+ <tgroup cols="3">
+ <colspec colnum="1" colwidth="2*" />
+ <colspec colnum="2" colwidth="3*" />
+ <colspec colnum="3" colwidth="2*"/>
+
+ <thead>
+ <row>
+ <entry>Trigger</entry>
+ <entry>Variables</entry>
+ <entry>Configuration File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>condition</entry>
+ <entry>object</entry>
+ </row>
+ <row>
+ <entry>correlationQuery</entry>
+ <entry>source</entry>
+ </row>
+ <row>
+ <entry>correlationScript</entry>
+ <entry>source</entry>
+ </row>
+ <row>
+ <entry>linkQualifier</entry>
+ <entry>source</entry>
+ <entry><filename>sync.json</filename></entry>
+ </row>
+ <row>
+ <entry>onCreate</entry>
+ <entry><para>object, source, target</para></entry>
+ <entry><filename>sync.json</filename></entry>
+ </row>
+ <row>
+ <entry>onCreate</entry>
+ <entry>object</entry>
+ <entry><filename>managed.json</filename></entry>
+ </row>
+ <row>
+ <entry>onDelete</entry>
+ <entry>object, source, target</entry>
+ <entry><filename>managed.json</filename></entry>
+ </row>
+ <row>
+ <entry>onDelete</entry>
+ <entry>object</entry>
+ <entry><filename>managed.json</filename></entry>
+ </row>
+ <row>
+ <entry>onLink</entry>
+ <entry>source, target</entry>
+ </row>
+ <row>
+ <entry>onRead</entry>
+ <entry><para>object, when called from either an object or a \
property storage trigger</para> + <para>property, only when \
called from a property storage trigger</para> + </entry>
+ </row>
+ <row>
+ <entry>onStore</entry>
+ <entry>object, property</entry>
+ </row>
+ <row>
+ <entry>onUnlink</entry>
+ <entry>source, target</entry>
+ </row>
+ <row>
+ <entry>onUpdate</entry>
+ <entry>object, source, target</entry>
+ <entry><filename>sync.json</filename></entry>
+ </row>
+ <row>
+ <entry>onUpdate</entry>
+ <entry>object</entry>
+ <entry><filename>managed.json</filename></entry>
+ </row>
+ <row>
+ <entry>onValidate</entry>
+ <entry>object, property</entry>
+ </row>
+ <row>
+ <entry>postCreate</entry>
+ <entry>object</entry>
+ <entry><filename>managed.json</filename></entry>
+ </row>
+ <row>
+ <entry>postDelete</entry>
+ <entry>object</entry>
+ <entry><filename>managed.json</filename></entry>
+ </row>
+ <row>
+ <entry>Custom endpoint scripts</entry>
+ <entry>request</entry>
+ </row>
+ <row>
+ <entry>result</entry>
+ <entry>source, target</entry>
+ </row>
+ <row>
+ <entry>taskScanner</entry>
+ <entry>input, objectID</entry>
+ </row>
+ <row>
+ <entry>transform</entry>
+ <entry>source</entry>
+ </row>
+ <row>
+ <entry>validSource</entry>
+ <entry>source</entry>
+ </row>
+ <row>
+ <entry>validTarget</entry>
+ <entry>target</entry>
+ </row>
+ </tbody>
+
+ </tgroup>
+
+ </table>
+
</ins><span class="cx"> <variablelist>
</span><ins>+ <para>
+ OpenIDM includes one additional variable used in scripts:
+ </para>
+
</ins><span class="cx"> <varlistentry>
</span><del>- <term>condition</term>
- <listitem>
- <para>object</para>
- </listitem>
</del><ins>+ <term>identityServer</term>
+ <listitem>
+ <itemizedlist>
+ <para>
+ The <literal>identityServer</literal> variable can be used in
+ several ways. The <literal>ScriptRegistryService</literal> \
described + in <xref linkend="script-endpoint" /> binds \
this variable to: + </para>
+ <listitem>
+ <para><literal>getProperty</literal></para>
+ <para>
+ Retrieves property information from configuration files.
+ Creates a new identity environment configuration.
+ </para>
+ <para>
+ For example, you can retrieve the value of the
+ <literal>openidm.config.crypto.alias</literal> property from \
that + file with the following code:
+ <literal>alias = \
identityServer.getProperty("openidm.config.crypto.alias", "true", \
true);</literal> + </para>
+ </listitem>
+ <listitem>
+ <para><literal>getInstallLocation</literal></para>
+ <para>
+ Retrieves the installation path for OpenIDM, such as
+ <filename>/path/to/openidm</filename>. May be superseded by \
an + absolute path.
+ </para>
+ </listitem>
+ <listitem>
+ <para><literal>getProjectLocation</literal></para>
+ <para>Retrieves the directory used when you started OpenIDM. That
+ directory includes configuration and script files for your
+ project.</para>
+ <para>
+ For more information on the project location, see
+ <link xlink:show="new" \
xlink:role="http://docbook.org/xlink/role/olink" + \
xlink:href="integrators-guide#startup-configuration"> + \
<citetitle>Specifying the OpenIDM Startup + \
Configuration</citetitle></link> + </para>
+ </listitem>
+ <listitem>
+ <para><literal>getWorkingLocation</literal></para>
+ <para>Retrieves the directory associated with database cache and
+ audit logs. You can find <filename>db/</filename> and
+ <filename>audit/</filename> subdirectories \
there.</para> + <para>
+ For more information on the working location, see
+ <link xlink:show="new" \
xlink:role="http://docbook.org/xlink/role/olink" + \
xlink:href="integrators-guide#startup-configuration"> + \
<citetitle>Specifying the OpenIDM Startup + \
Configuration</citetitle></link> + </para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
</ins><span class="cx"> </varlistentry>
</span><del>- <varlistentry>
- <term>correlationQuery</term>
- <listitem>
- <para>source</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>correlationScript</term>
- <listitem>
- <para>source</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Custom endpoint scripts</term>
- <listitem>
- <para>request</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>linkQualifier</term>
- <listitem>
- <para>target</para>
- <para>
- Often used to qualify objects for a \
<literal>correlationQuery</literal>,
- a <literal>correlationScript</literal>, or a policy.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>onCreate</term>
- <listitem>
- <para>
- Triggered in <filename>sync.json</filename> : object, source, \
target
- </para>
- <para>
- Triggered in <filename>managed.json</filename> : object
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>onDelete</term>
- <listitem>
- <para>
- Triggered in <filename>sync.json</filename> : object, source, \
target
- </para>
- <para>
- Triggered in <filename>managed.json</filename> : object
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>onLink</term>
- <listitem>
- <para>source, target</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>onRead</term>
- <listitem>
- <para>object</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>onRetrieve</term>
- <listitem>
- <para>
- object (when called from either an object or a property storage
- trigger)
- </para>
- <para>
- property (only when called from a property storage trigger)
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>onStore</term>
- <listitem>
- <para>object, property</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>onUnlink</term>
- <listitem>
- <para>source, target</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>onUpdate</term>
- <listitem>
- <para>
- Triggered in <filename>sync.json</filename> : source, target
- </para>
- <para>
- Triggered in <filename>managed.json</filename> : oldObject, \
newObject
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>onValidate</term>
- <listitem>
- <para>object, property</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>postCreate, postDelete</term>
- <listitem>
- <para>
- Triggered in <filename>managed.json</filename> : object
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>postUpdate</term>
- <listitem>
- <para>
- Triggered in <filename>managed.json</filename> : oldObject, \
newObject
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>result</term>
- <listitem>
- <para>source, target</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>synchronization situation scripts</term>
- <listitem>
- <para>
- <literal>recon.actionParam</literal> - the details of the
- synchronization operation in progress. This variable can be used for
- asynchronous callbacks to execute the action at a later stage.
- </para>
- <para>
- <literal>sourceAction</literal> - a boolean that indicates \
whether the
- situation was assessed during the source phase
- </para>
- <para>
- <literal>source</literal> (if found)
- </para>
- <para>
- <literal>target</literal> (if found)
- </para>
- <para>
- The properties from the configured script object.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>taskScanner</term>
- <listitem>
- <para>input, objectID</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>transform</term>
- <listitem>
- <para>source</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>validSource</term>
- <listitem>
- <para>source</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>validTarget</term>
- <listitem>
- <para>target</para>
- </listitem>
- </varlistentry>
</del><span class="cx"> </variablelist>
</span><ins>+
</ins><span class="cx"> </section>
</span><span class="cx">
</span><span class="cx"> <!--TODO Uncomment this section when OPENIDM-3351 is \
resolved </span><span class="lines">@@ -1921,7 +1932,7 @@
</span><span class="cx"> scripts in this way can be useful in debugging.
</span><span class="cx"> </para>
</span><span class="cx"> <para>
</span><del>- In addition, the script service enables you to call out to other \
scripts </del><ins>+ In addition, the script registry service supports calls to \
other scripts </ins><span class="cx"> (even scripts written in a different \
language, such as from JavaScript to </span><span class="cx"> Groovy). For \
example, you might have logic written in Javascript, but also </span><span \
class="cx"> some code available in Groovy. Ordinarily, it would be challenging to \
</span></span></pre> </div>
</div>
<div id="footer">Copyright (c) by ForgeRock. All rights reserved.</div>
</body>
</html>
_______________________________________________
CommitOpenIDM mailing list
CommitOpenIDM@forgerock.org
https://lists.forgerock.org/mailman/listinfo/commitopenidm
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic