[lsc-changes] [Ldap Synchronization Connector (LSC)] page added: documentation:2.0:configuration:task

webmaster at lsc-project.org webmaster at lsc-project.org
Wed Sep 14 23:54:11 CEST 2011

A page in your DokuWiki was added or changed. Here are the details:

Date        : 2011/09/14 23:54
Browser     : Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.162 Safari/535.1
IP-Address  :
Hostname    : nsg93-4-82-235-239-71.fbx.proxad.net
Old Revision: none
New Revision: http://lsc-project.org/wiki/documentation/2.0/configuration/task
Edit Summary: created
User        : sbahloul

====== General task options ======

This section describes available options to configure a LSC task. 

===== Synchronization options (lsc>tasks>task>syncOptions)=====

You can describe synchronization options through the corresponding task subnode lsc>tasks>task>syncOptions :

<code xml>
      <syncOptions class="propertiesBasedSyncOptions">

You may include various information there :
  * main identifier
  * conditions
  * default delimiter
  * default policy
  * attributes description
  * implementation bean

==== Main identifier (lsc>tasks>task>syncOptions>mainIdentifier)====

You must provide their a main identifier construction rule. Depending on the referential you are writing to, this may have a really strong importance or not : in LDAP, OSes, ... it is really important whereas this has not any meaning if you plan to populate a database.

Take the LDAP case : the main identifier will be the distinguish name and, for example, you want to use the email value you catch inside the datasource to create the RDN inside the ou=People branch :

<code xml>
<mainIdentifier>"mail=" + srcBean.getAttributeValueById("email") + ",ou=People,dc=lsc-project,dc=org"</mainIdentifier>

You can use Javascript and you have access to the //srcBean//.

If this is meaning less for the referential you plan to write to, just copy the source value :

<code xml>

==== Attributes (lsc>tasks>task>syncOptions>attribute) ====

This is the node describing how to handle each attribute :

<code xml>

See the [[..:syncoptions]] page for more information.

==== Conditions (lsc>tasks>task>syncOptions>conditions) ====

Depending on your needs, you may want to achieve only some types of operation. 
LSC is handling four different types of action : create, update, delete and change main identifier. 
You can provide on a source and destination objects basis a rule to decide if you want
to achieve any or all of the operation. The following conditions samples are written in JavaScript :

<code xml>
  <create>1 &gt; 0</create>
  <update>srcBean.getAttr('updateTimeStamp') &gt; dstBean.getAttr('updateTimeStamp')</update>

Note : do not forget to escape special characters and use XML entities (&gt; for >, &lt; for <, ...)

In the condition **create** you have access to the //srcBean//.

In the condition **update** you have access to the //srcBean// and //dstBean//.

In the condition **delete** you have access to the //dstBean//.

In the condition **change main identifier** you have access to the //srcBean// and //dstBean//.

==== Default delimiter (lsc>tasks>task>syncOptions>defaultDelimiter) ====

This is the value used to split multiple values when are provided as a single one. Each attribute definition (see below) can define its own delimiter, but this attribute define the default one :

<code xml>

==== Default policy (lsc>tasks>task>syncOptions>defaultPolicy) ====

This is the value used to determine how to synchronize attributes value in destination, according to existing values,
provided default, forced and create values. It may take the following values : FORCE, KEEP or MERGE

<code xml>

See the [[..:syncoptions]] page for more information.

==== Bean value (lsc>tasks>task>syncOptions>bean) ====

This value can be customized with a specific bean but includes a default value: org.lsc.beans.SimpleBean.

This parameter points to a class that is used by LSC as an simple object storing values in a neutral way : table of named datasets which contain values.

This mail was generated by DokuWiki at

More information about the lsc-changes mailing list