Would a groovy script make it for you ?
like (again, from Mr "Wizard" Ludovic) :
package xwiki.export;
import com.xpn.xwiki.*;
import com.xpn.xwiki.plugin.packaging.*;
println "Starting export"
basedir = ".";
context = new com.xpn.xwiki.XWikiContext();
context.setUser("XWiki.superadmin");
config = new XWikiConfig();
config.put("xwiki.store.class",
"com.xpn.xwiki.store.XWikiHibernateStore");
config.put("xwiki.store.hibernate.path", basedir +
"/hibernate.cfg.xml");
config.put("xwiki.store.hibernate.updateschema", "1");
config.put("xwiki.virtual", "1");
println "Starting xwiki"
xwiki = new XWiki(config, context)
context.setWiki(xwiki);
store = xwiki.getHibernateStore();
sfactory = store.injectCustomMappingsInSessionFactory(context);
if (sfactory)
store.setSessionFactory(sfactory);
db = "xwiki"
println("Export database " + db)
context.setDatabase(db);
println "Creating package"
pack = new Package()
pack.setWithVersions(false)
println "Adding documents"
pack.addAllWikiDocuments(context)
println "Exporting documents"
pack.exportToDir(new File(basedir + "/../src/xwiki/"), context)
println "Finished."
...
If not, this gives you an idea of the API anyway.
Erwan
On 11/26/05, Jacco Steur <Jacco.Steur(a)sun.com> wrote:
Would it be possible to retrieve all the XWiki
documents from a java app
using the XWiki api. Does anybody have a code snippet of what that would
look like?
Thanks.
Jacco.
--
You receive this message as a subscriber of the xwiki-dev(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws