Changes for page Creating Plugins

Last modified by Simon Urli on 2023/10/10

From version 1.20
edited by jeanvivienmaurice
on 2007/10/25
Change comment: There is no comment for this version
To version 1.21
edited by Vincent Massol
on 2007/10/25
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.jeanvivienmaurice
1 +XWiki.VincentMassol
Content
... ... @@ -10,9 +10,12 @@
10 10  
11 11  Basically, a plugin is composed of two parts:
12 12  
13 -* The *plugin* itself: inherits from [XWikiDefaultPlugin>http://build.xpertnet.biz/doc/api/com/xpn/xwiki/plugin/XWikiDefaultPlugin.html]. contains the core functions of your plugin. They will not be accessible form the outside
14 -* Its *API*: inherits from [Api>http://build.xpertnet.biz/doc/api/com/xpn/xwiki/api/Api.html]. Will contain all the methods accessible form the Velocity context.
13 +A plugin .
15 15  
15 +
16 +* The *plugin* itself: it must implement the [XWikiPluginInterface>http://fisheye2.cenqua.com/browse/xwiki/xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/XWikiPluginInterface.java] interface. For simplicity you can also extends the [XWikiDefaultPlugin>http://fisheye2.cenqua.com/browse/xwiki/xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/XWikiDefaultPlugin.java] class which is an adapter to the XWikiPluginInterface. The plugin contains the core functions of your plugin. They will not be accessible form the outside.
17 +* Its *API*: it should extend the [Api>http://fisheye2.cenqua.com/browse/xwiki/xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/api/Api.java] class. Will contain all the methods accessible from the Velocity context.
18 +
16 16  1.1.1 Plugin lifecycle
17 17  
18 18  The XWiki class constructor is called only once by the Plugin Manager, not on startup but the first time a plugin is referenced by a Velocity script. For example, when you call a method served by the plugin API :

Get Connected