On Thu, Feb 4, 2010 at 11:17, Vincent Massol
<vincent(a)massol.net> wrote:
On Feb 4, 2010, at 11:08 AM, Thomas Mortagne wrote:
On Thu, Feb 4, 2010 at 09:25, Vincent Massol
<vincent(a)massol.net> wrote:
> Hi devs,
>
> I'm going to work on this and put the code in the xwiki-script module.
>
> There's only Thomas who voiced his positive opinion on the proposal below. Could
you please let me know if you don't agree (or even if you do, actually).
>
> Just to complement a bit the proposal here are what some existing mapping would
become (in Velocity for the example):
>
> * $syntaxFactory --> $services.rendering.syntaxFactory
> * $officeimporter --> $services.officeImporter.importer
> * $ooconfig --> $services.officeImporter.openOfficeConfiguration
> * $oomanager --> $services.officeImporter.openOfficeManager
> * $captchaservice --> $services.captcha
>
> Note 1: It might be good to split xwiki-officeimporter into 2 modules: one for the
importer and one for managing an openoffice server (xwiki-openoffice). In this case the
mapping would be:
>
> * $officeimporter --> $services.officeImporter
> * $ooconfig --> $services.openOffice.configuration
> * $oomanager --> $services.openOffice.manager
>
> Note 2: It might be good to force the format $services.<modulename>.<object
to get>.<method> since otherwise it would mean putting all the APIs into a single
object. I'm not sure on this, we need to decide.
Not sure how it will work, what would be $services.<modulename> ?
For ex for the office importer asiri has a OfficeImporterVelocityBridge (which is the
object that $services.offcieimproter would return)
I
think Velocity stop at the dot and will not try to call
$services.get("rendering.syntaxFactory") but
$services.get("rendering").get("syntaxFactory") but I'm not 100%
sure
about that.
I'm pretty sure it's fine: $services.moduleName.whatever() is equivalent to
$services.get("moduleName").whatever()
I know and that's exactly what is said but that's not what I'm talking
about here, in your proposal you have
$services.module.submodule.whatever()
($services.rendering.syntaxFactory.whatever()) and not
$services.moduleName.whatever() so I'm asking what java object will
represent will be $services.module ? since $services.module.submodule
will be the registered service component.