Issue #756 has been updated by Raphaël Ouazana.

This feature allows tree synchronization too. Sample configuration:
<pre>
                <task>
                        <name>a</name>
                        <bean>org.lsc.beans.SimpleBean</bean>
                        <ldapSourceService>
                                <name>srca</name>
                                <connection reference="ldap-conn" />
                                <baseDn>ou=srcorgs,dc=my-domain,dc=com</baseDn>
                                <pivotAttributes>
                                        <string>entryDn</string>
                                </pivotAttributes>
                                <fetchedAttributes>
                                        <string>description</string>
                                        <string>objectClass</string>
                                        <string>ou</string>
                                </fetchedAttributes>
                                
<getAllFilter>(&amp;(ou=*)(description=*))</getAllFilter>
                                <getOneFilter>(entryDn={entryDn})</getOneFilter>
                                <cleanFilter>(entryDn={entryDn})</cleanFilter>
                        </ldapSourceService>
                        <ldapDestinationService>
                                <name>dsta</name>
                                <connection reference="ldap-conn" />
                                <baseDn>ou=dstorgs,dc=my-domain,dc=com</baseDn>
                                <pivotAttributes>
                                        <string>entryDn</string>
                                </pivotAttributes>
                                <fetchedAttributes>
                                        <string>description</string>
                                        <string>objectClass</string>
                                        <string>ou</string>
                                </fetchedAttributes>
                                
<getAllFilter>(&amp;(ou=*)(description=*))</getAllFilter>
                                <getOneFilter>(entryDn={entryDn})</getOneFilter>
                        </ldapDestinationService>
                        <propertiesBasedSyncOptions>
                                
<mainIdentifier>js:srcBean.getMainIdentifier().replace(',ou=srcorgs', 
',ou=dstorgs')</mainIdentifier>
                                <pivotTransformation>
                                        <transformation fromAttribute="entryDn" 
toAttribute="entryDn" pivotOrigin="SOURCE"><![CDATA[js:
                                                value.replace(',ou=srcorgs', 
',ou=dstorgs');
                                        ]]></transformation>
                                        <transformation fromAttribute="entryDn" 
toAttribute="entryDn" pivotOrigin="DESTINATION"><![CDATA[js:
                                                value.replace(',ou=dstorgs', 
',ou=srcorgs');
                                        ]]></transformation>
                                </pivotTransformation>
                                <defaultDelimiter>|</defaultDelimiter>
                                <defaultPolicy>FORCE</defaultPolicy>
                                <dataset>
                                        <name>description</name>
                                        
<forceValues><string>srcBean.getDatasetFirstValueById("description")+"-transformed";</string></forceValues>
                                </dataset>
                        </propertiesBasedSyncOptions>
                </task>
</pre>

Launching lsc with -s a -c a -t 1 syncs all the tree.
----------------------------------------
Feature #756: Pivot transformation
http://tools.lsc-project.org/issues/756

Author: Raphaël Ouazana
Status: Resolved
Priority: Normal
Assigned to: 
Category: Core
Target version: 2.2


Pivot transformation is needed by some users.

Some typical use cases:
- transform a pivot by adding some chars
- transform a source binary pivot to a destination string pivot


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://tools.lsc-project.org/my/account
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-dev mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-dev

Reply via email to