General task options

This section describes available options to configure a LSC task. You should replace TASKNAME by a task name specified in the global configuration option lsc.tasks.

Overview

lsc.tasks.TASKNAME.bean

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

Advanced features

Conditions

You can specify conditions for the 4 actions create, update, delete and modrdn. These conditions are written in JavaScript.

For example :

lsc.tasks.TASKNAME.condition.create = 1 > 0
lsc.tasks.TASKNAME.condition.update =
srcBean.getAttr('updateTimeStamp') > dstBean.getAttr('updateTimeStamp')
lsc.tasks.TASKNAME.condition.delete = false
lsc.tasks.TASKNAME.condition.modrdn = false

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 modrdn you have access to the srcBean and dstBean.

The DN

You can set the dn of the object in the configuration. You can use Javascript and you have access to the srcBean.

Example:

lsc.tasks.TASKNAME.dn = 'cn=' + srcBean.getAttributeValueById('uid')

This DN is then automatically suffixed with the base DN from your LDAP URL in dst.ldap properties. So for example, if you have:

dst.java.naming.provider.url = ldap://ldap.company.com:389/dc=company,dc=com

Then the example above will create a DN of “cn=<UID>,dc=company,dc=com”.

Note: To never change the DN, set this property to ”” (the empty string). In this case, LSC will ignore MODRDN operations. This will also stop LSC from creating objects, since they have no DN.