Changes for page Script Module

Last modified by Thomas Mortagne on 2024/03/19 14:18

<
From version < 14.1 >
edited by slauriere
on 2019/02/08 16:59
To version < 16.1 >
edited by Paul Libbrecht
on 2019/11/12 18:05
>
Change comment: Added an exaplantion that the interface/implementation separation is not usual with script-services.

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.slauriere
1 +xwiki:XWiki.polx
EXOExtensionCode.ExtensionClass[0]
Bundled With
... ... @@ -1,1 +1,1 @@
1 -enterprise manager
1 +XWiki Standard
ExtensionCode.ExtensionClass[0]
Description
... ... @@ -27,7 +27,7 @@
27 27  
28 28  = Script Services =
29 29  
30 -To expose an API to a script macro you simply need to implement the ##org.xwiki.script.service.ScriptService## component role (see [[Component Module>>Extension.Component Module]] to know more about components).
30 +To expose an API to a script macro you simply need to implement the ##org.xwiki.script.service.ScriptService## component role (see [[Component Module>>Extension.Component Module]] to know more about components). Note that it is rather usual to not separate script-services between interface and implementation as the visibility is at a different level than that of java. Rather, script-service components should perform mostly delegation to other components or simple transformations (such as objects translation).
31 31  
32 32  For example:
33 33  
... ... @@ -69,5 +69,5 @@
69 69  
70 70  Learn how to write a script service:
71 71  
72 -* In Java: [[xwiki:Documentation.DevGuide.Tutorials.WritingComponents||anchor="HFromwikipages"]]
72 +* In Java: [[Create a script service in Java>>xwiki:Documentation.DevGuide.Tutorials.WritingComponents||anchor="HFromwikipages"]]
73 73  * In Groovy: [[Groovy script service tutorial>>Extension.Script Module.GroovyScriptServiceTutorial]]

Get Connected