Changes for page Groovy Script Service Tutorial
Last modified by Anca Luca on 2023/02/22 11:17
Change comment:
Slight clarifications (using label as in 11.3 for class-names, sentence about included execution less ambiguous).
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki. ThomasMortagne1 +xwiki:XWiki.polx - Content
-
... ... @@ -40,7 +40,7 @@ 40 40 = Create a Wiki Component Event Listener = 41 41 42 42 * Create a wiki page, e.g. ##HelloWorldGroovyScriptService## 43 -* Add an object of class {{code}}XWiki.ComponentClass{{/code}} to it, with the following properties: 43 +* Add an object of class //Wiki Component XWiki Class// ({{code}}XWiki.ComponentClass{{/code}}) to it, with the following properties: 44 44 ** Role type: {{code}}org.xwiki.observation.EventListener{{/code}} 45 45 ** Role hint: {{code}}helloWorldGroovyScriptService{{/code}} 46 46 ** Scope: ##Current Wiki## ... ... @@ -47,7 +47,7 @@ 47 47 48 48 = Turn the Component into an Initializable = 49 49 50 -* Add an object of class {{code}}XWiki.ComponentInterfaceClass{{/code}} to the page, with the following property: 50 +* Add an object of class //Wiki Component Implements Interface XWiki Class// ({{code}}XWiki.ComponentInterfaceClass{{/code}}) to the page, with the following property: 51 51 ** Interface qualified name: {{code}}org.xwiki.component.phase.Initializable{{/code}} 52 52 53 53 = Add the methods to the component = ... ... @@ -62,7 +62,7 @@ 62 62 63 63 Follow these steps: 64 64 65 -* Add an object of class {{code}}XWiki.ComponentMethodClass{{/code}} to the page, with the following properties: 65 +* Add an object of class //Wiki Component Method XWiki Class// ({{code}}XWiki.ComponentMethodClass{{/code}}) to the page, with the following properties: 66 66 ** Name: {{code}}initialize{{/code}} 67 67 ** Body code:((( 68 68 {{code language="java"}} ... ... @@ -101,7 +101,7 @@ 101 101 {{/code}} 102 102 103 103 {{info}} 104 -You could of course use any script here in any supported Scripting language. You could also use an [[##~~{~~{include/}}## macro>>doc:Extension.Include Macro]] to get the scripttoexecute from another page.104 +You could of course use any script here in any supported Scripting language. You could also use an [[##~~{~~{include/}}## macro>>doc:Extension.Include Macro]] macro to let the script execution read code from another page. 105 105 {{/info}} 106 106 ))) 107 107 * Add the following method to the component, to make sure the listener has a unique name, e.g. the current page reference converted to a string: