Hide last authors
Vincent Massol 346.1 1 {{velocity}}
Guillaume Delhumeau 524.1 2 #set($versionStable = "9.8.1")
Marius Dumitru Florea 525.1 3 #set($versionDev = "9.9-rc-2")
Vincent Massol 511.2 4 #set($versionOldStable = "8.4.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
Thomas Mortagne 446.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
Vincent Massol 459.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}}
Vincent Massol 459.1 32 Right now we're providing all Javadocs for all modules:
33 * [[Javadoc for XWiki ${versionStable} (stable)>>Javadoc||queryString="versionId=$versionStable&versionName=stable"]]
34 #if ($versionDev)
35 * [[Javadoc for XWiki ${versionDev} (dev)>>Javadoc||queryString="versionId=$versionDev&versionName=dev"]]
Vincent Massol 457.1 36 #end
Vincent Massol 459.1 37 #if ($versionOldStable)
Thomas Mortagne 485.1 38 * [[Javadoc for XWiki ${versionOldStable} (LTS)>>Javadoc||queryString="versionId=$versionOldStable&versionName='LTS'"]]
Vincent Massol 459.1 39 #end
Eduard Moraru 489.2 40 * (((
41 {{html}}
42 <form action="$xwiki.getURL('Javadoc')" class="xformInline">
43 <label for="javadocVersionId">Older version:</label>
44 <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 45 <input type="hidden" name="versionName" value="LTS"/>
Eduard Moraru 489.2 46 <input class="button" type="submit" value="View"/>
47 </form>
48 {{/html}}
49 )))
Vincent Massol 346.1 50 {{/velocity}}
Thomas Mortagne 420.1 51
Vincent Massol 456.1 52 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 53
Manuel Smeria 376.2 54 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