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#H2Fwikis2…
* 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/xwi…
2:
http://nexus.xwiki.org/nexus/service/local/repositories/releases/archive/or…
3:
https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwi…
and
http://extensions.xwiki.org/xwiki/bin/view/Extension/XWiki+Platform+-+WikiS…
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
<chris.s.brockmeier(a)lmco.com> 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
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
--
Thomas Mortagne