On Tue, Nov 3, 2009 at 22:16, Jerome Velociter <[email protected]> wrote: > Hello all, > > We need to be able to expose APIs to scripting languages. Following the > idea initially expressed by Vincent in this thread > http://lists.xwiki.org/pipermail/devs/2009-August/013934.html, I would > like to propose the following : > > - We add a org.xwiki.script.ScriptService component role, which is an > empty tag interface that services class implements > - A org.xwiki.script.ScriptServiceManager implementation gets all > services injected in a roleHint/service map
Having a roleHint/service map is already CM job, no need to have one in ScriptServiceManager, use lookup when a service is asked. It make code more simple and support registration/unregistration of service at runtime. > - This script service manager gets injected where script bindings are > initialized and is bound "as is" with under "services" name. Currently > in two places : in the XWikiScriptContextInitializer and in the > DefaultVelocityManager (since velocity is treated separetely from JSR223 > scripting languages for the moment). > > I've uploaded an initial patch on > http://jira.xwiki.org/jira/browse/XWIKI-4551 if you want to give a look. > > My +1 Except for the ScriptServiceManager Map, +1 > > Jerome. > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs > -- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

