Hi Jonathan,
Hopefully one last question.
I am now trying to sync up the manager attribute based upon CN of the
source dir. I am trying this:
lsc.syncoptions.MySyncTask.manager.force_value =ldap.search("","(cn=" +
srcBean.getAttributeValueById("manager") + ")").get(0)
and I get an error like this:
Jul 12 12:47:45 - ERROR - Error while synchronizing ID
{mail=john_...@mydomain.
com}: org.mozilla.javascript.WrappedException: Wrapped
java.lang.IndexOutOfBound
sException: Index: 0, Size: 0 (<cmd>#1)
Do I need to write some kind of subroutine? AD requires the full DN to
enter as manager attribute, but since directory structures are both
completely different, trying to figure out how to match manager similar to
ldap.search (though I never got the latter to work)...
Also wondering if there is more detailed documentation on ldap.search
syntax....
Thanks!!!!
Jonathan Clarke <[email protected]>
07/12/2010 11:10 AM
To
<[email protected]>
cc
<[email protected]>
Subject
Re: [lsc-users] How to map attributes ldap2ldap
On Mon, 12 Jul 2010 10:56:55 -0400, [email protected] wrote:
> Hello All,
>
> After a nice victory trying to sync directories, I am now trying to
figure
> out how to map an attribute from the source to a different attribute in
> the destination. I took a look at sql-map-config, but that seems to
apply
> only to sql db.
This is what syncoptions are for. See the documentation at
http://lsc-project.org/wiki/documentation/1.2/configuration/syncoptions.
You'll also find some examples in the distribution, under
etc/lsc.properties-sample.
A simple example is writing the "cn" attribute as "SURNAME, Givenname":
lsc.syncoptions.MyTaskName.cn.force_value =
srcBean.getAttributeValueById("sn").toUpperCase() + ", " +
srcBean.getAttributeValueById("givenName")
(this assumes "sn" and "givenName" are read from the source directory)
This is one of the strengths of LSC. Each syncoption value can take a
JavaScript expression, enabling you to manipulate data virtually any way
you like!
> Thanks much to this very helpful community...
It's a pleasure to help. Thanks for your patience in getting into LSC, and
feel free to send us feedback on how it could be easier!
Regards,
Jonathan
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org
lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users