Issue #182 has been updated by Quentin Raynaud.
File include.diff added
Here is a first patch. I'm not saying everything is perfect in this one. It's
more like a testing ground with the basics to get it done. It looks like
working. The lsc file can now have two new properties that are
<pre>
lsc.include = file.js
lsk.tasks.<task_name>.include = file2.js
</pre>
The files are retireved relatively from the configuration directory so paths
like js/file.js are OK. The definitions in them are residing in a different
scope so in a JS file you can't call directly locale variables. Per example :
<pre>
function test()
{
return srcBean.getAttributeValueById("toto");
}
</pre>
n'est pas correct, il faudrait écrire :
<pre>
function test(srcBean)
{
return srcBean.getAttributeValueById("toto");
}
</pre>
pour que cela fonctionne et passer cet argument à la fonction.
Je pense avoir fait le tour du travail effectué.
----------------------------------------
Feature #182: Separated JS
http://tools.lsc-project.org/issues/show/182
Author: Quentin Raynaud
Status: New
Priority: Normal
Assigned to:
Category:
Target version:
It would be great to have the possibility to add for each tasks and maybe
globally too a JS file in which we can define things that would be present for
every syncoptions.
Let me give some exemples :
etc/lib.js:
==
function myFct1()
{
return "myFct1";
}
==
etc/libtask1.js:
==
function myFct2()
{
return "FyFct2";
}
==
etc/lsc.properties:
==
#...
lsc.java.tasks = "src/lib.js"
#...
lsc.tasks = task1, task2
lsc.tasks.task1.java = "src/libtask1.js"
#...
lsc.syncoptions.task1.property.force_value = myFct1() + myFct2() # OK
#...
lsc.syncoptions.task2.property.force_value = myFct1() + myFct2() # Not OK
myFct1 is available but not myFct2 that is only included for task1
==
--
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