Wiki source code of API Reference

Last modified by Thomas Mortagne on 2023/11/27

Hide last authors
Vincent Massol 346.1 1 {{velocity}}
Thomas Mortagne 707.1 2 #set ($versionStable = "15.10")
3 ##set ($versionDev = "15.10-rc-1")
Marius Dumitru Florea 706.1 4 #set ($versionLTS = "14.10.19")
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}}
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>>ScriptingDocumentation.WebHome]] (but beware, it'll show the Scripting API available on the XWiki version installed for, which may differ from your locally installed XWiki version).
Thomas Mortagne 419.1 23 == How to find a class ==
Marius Dumitru Florea 680.1 25 You can get the maven module where to find a Java class by using [[XWiki Nexus Search page>>;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}}
44 <form action="$xwiki.getURL('Javadoc')" class="xformInline">
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>>]] 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>>]]. For example for XWiki Platform Core JavaDocs, check the files suffixed by ##javadoc## for the version you wish under [[this directory>>]].

Get Connected