Wiki source code of API Reference

Last modified by Michael Hamann on 2025/03/25

Hide last authors
Vincent Massol 346.1 1 {{velocity}}
Thomas Mortagne 751.1 2 #set ($versionStable = "17.1.0")
Michael Hamann 753.1 3 #set ($versionDev = "17.2.0-rc-1")
Manuel Leduc 752.1 4 #set ($versionLTS = "16.10.5")
Vincent Massol 346.1 5 {{/velocity}}
Thomas Mortagne 305.1 6
Vincent Massol 522.1 7 XWiki's APIs are the methods that the XWiki development team consider safe for you to use (i.e. for which backward compatibility is guaranteed). They can be called from Java or directly from your wiki pages [[using a scripting language>>Documentation.DevGuide.Scripting.WebHome]] (Velocity, Groovy, Python, Ruby, etc).
Vincent Massol 346.1 8
Vincent Massol 390.1 9 {{info}}
10 As users of the XWiki API you need to be aware of some important points:
Guillaume Delhumeau 523.1 11
Vincent Massol 390.1 12 * You should never use a class having ##internal## in its package. It means this class is not a public API and XWiki developers can change it at any time. If you depend on such a class you're on your own and the XWiki Development Team doesn't guarantee its stability.
13 * You should pay attention to the ##@Unstable## annotation. When you see code marked with this annotation it means it's a new public API that it still considered unstable and that can change at any time too. See [[Unstable Annotation>>dev:Community.DevelopmentPractices||anchor="H40UnstableAnnotation"]] for more details.
14 {{/info}}
15
Ludovic Dubost 381.1 16 == Scripting Reference Documentation ==
Ludovic Dubost 371.1 17
Vincent Massol 522.3 18 In order to know the full list of APIs that you can use you can:
Ludovic Dubost 381.1 19
Vincent Massol 522.4 20 * (//Recommended//) Install the [[Scripting Documentation Application>>extensions:Extension.Scripting Documentation Application]] in your wiki.
Vincent Massol 522.3 21 * [[Browse a version of it installed on xwiki.org>>ScriptingDocumentation.WebHome]] (but beware, it'll show the Scripting API available on the XWiki version installed for xwiki.org, which may differ from your locally installed XWiki version).
22
Thomas Mortagne 419.1 23 == How to find a class ==
24
Marius Dumitru Florea 680.1 25 You can get the maven module where to find a Java class by using [[XWiki Nexus Search page>>http://nexus.xwiki.org/nexus/index.html#nexus-search;classname~~]]. Put the complete class name and you will get all modules containing it. Nexus also allows you to see what's in those artifacts and read the JavaDoc.
Thomas Mortagne 419.1 26
Vincent Massol 456.1 27 == JavaDoc ==
Ludovic Dubost 371.1 28
Marius Dumitru Florea 680.1 29 XWiki is made of various extensions/modules and each module offers API for both developers coding in Java and for Scripts written in wiki pages. In the future our goal is to have JavaDoc links directly from each extension page located in the [[Extensions Wiki>>extensions:Main.WebHome]].
Silvia Macovei 239.1 30
Vincent Massol 346.1 31 {{velocity}}
Marius Dumitru Florea 680.1 32 Right now we're providing all JavaDocs for all modules:
Eduard Moraru 561.2 33 #if ($versionStable)
Marius Dumitru Florea 681.1 34 * [[JavaDoc for XWiki ${versionStable} (stable)>>Javadoc||queryString="versionId=$versionStable&versionName=stable"]]
Eduard Moraru 561.2 35 #end
Vincent Massol 459.1 36 #if ($versionDev)
Marius Dumitru Florea 681.1 37 * [[JavaDoc for XWiki ${versionDev} (dev)>>Javadoc||queryString="versionId=$versionDev&versionName=dev"]]
Vincent Massol 457.1 38 #end
Thomas Mortagne 535.1 39 #if ($versionLTS)
Marius Dumitru Florea 681.1 40 * [[JavaDoc for XWiki ${versionLTS} (LTS)>>Javadoc||queryString="versionId=$versionLTS&versionName='LTS'"]]
Vincent Massol 459.1 41 #end
Eduard Moraru 489.2 42 * (((
43 {{html}}
Simon Urli 713.1 44 <form action="$xwiki.getURL('Documentation.DevGuide.Javadoc')" class="xformInline">
Eduard Moraru 489.2 45 <label for="javadocVersionId">Older version:</label>
46 <input id="javadocVersionId" type="text" size="30" name="versionId" class="withTip" value="e.g., 3.2.1, 4.1-milestone-1, 5.1-rc-1"/>
Eduard Moraru 489.3 47 <input type="hidden" name="versionName" value="LTS"/>
Eduard Moraru 489.2 48 <input class="button" type="submit" value="View"/>
49 </form>
50 {{/html}}
51 )))
Vincent Massol 346.1 52 {{/velocity}}
Thomas Mortagne 420.1 53
Marius Dumitru Florea 680.1 54 The [[full JavaDoc>>http://maven.xwiki.org/site/docs/]] is also available ({{info}}but only for old versions, we need to fix this{{/info}}).
Thomas Mortagne 189.1 55
Marius Dumitru Florea 680.1 56 Older JavaDocs of XWiki can be found in our [[Maven Release repository>>http://maven.xwiki.org/releases/]]. For example for XWiki Platform Core JavaDocs, check the files suffixed by ##javadoc## for the version you wish under [[this directory>>http://maven.xwiki.org/releases/org/xwiki/platform/xwiki-platform-oldcore/]].

Get Connected