There is two main ways depending on your context: * from outside: use the REST API for that, see http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI#H2Fwikis2F7BwikiName7D * in Java (or Groovy and other advanced programming script languages): using old package plugin before 6.0 and using WikiStream after, you can see an example of both in recent Import action sources (1): * in a Velocity script: same as java but the API is a bit different for WikiStream since you will use a dedicated (young and not much documented yet) script service ($services.wikistream) (2). You can look at WikiStream generic UI (2) for example of its use. In velocity you access the old plugin API using $xwiki.package and you end up with the exact same object than in Java.
1: https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/ImportAction.java 2: http://nexus.xwiki.org/nexus/service/local/repositories/releases/archive/org/xwiki/platform/xwiki-platform-wikistream-script/6.0.1/xwiki-platform-wikistream-script-6.0.1-javadoc.jar/!/index.html 3: https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwiki-platform-wikistream/xwiki-platform-wikistream-ui and http://extensions.xwiki.org/xwiki/bin/view/Extension/XWiki+Platform+-+WikiStream+-+UI What WikiStream brings compared to the old plugin for XAR import is streaming support, when importing with the old plugin you load the entire XAR in memory before saving it in database which is not exactly the best for big XARs. On Wed, May 28, 2014 at 11:10 PM, Brockmeier, Chris S <[email protected]> wrote: > Hey All, > > I've seen a couple of threads out in the web about importing an "XAR" file > programatically, however it seems they might be out of date a bit. Has > anyone had any luck using the API that xwiki has to do such a thing? > > Thanks, > Chris. > _______________________________________________ > users mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
