[xwiki-dev] An unorthodox way of developing with Xwiki

Sergiu Dumitriu sergiu.dumitriu at gmail.com
Thu Jun 7 23:54:36 CEST 2007


Sorry, for the delayed response.

You can do anything. For example:
1- Write the XML version of the class and load the document from XML
2- Write a kind of schematic class definition and write a small script
that RESTfully calls the proper URL for each line in the definition,
something like:
foreach(line in scriptfile)
  compose URL like:
  /xwiki/bin/propadd/XWiki/MyClass?propname=${property name from
file}&proptype=${property type from file}
  /xwiki/bin/propupdate/XWiki/MyClass?myprop_name=${newname}&myprop_multiSelect=1&myotherprop_values=${some
values}
3- Define the classes as scripts (velocity or groovy). Look at the
com.xpn.xwiki.api.* and the com.xpn.xwiki.objects.* methods to see
what you can use.

Sergiu

On 6/5/07, François Déchelle <fdechelle at mandriva.com> wrote:
> Hi,
>
> I'm currently working on the development of a portal based on Xwiki, and
> may be what I am using to deploy groovy code could be helpfull.
>
> You can find the code at:
> https://protactinium.pps.jussieu.fr:12345/websvn/listing.php?repname=EDOS&path=%2Fsoftware%2Fqa%2Fqa-portal%2F#_software_qa_qa-portal_
>
> The whole stuff is based on autotools (automake/autoconf) and curl.
>
> The very simple configure script builds a property file that stores the
> Xwiki server name, port, username, password. There are then bash scripts
> that use 'curl' for login in, uploading and downloading Xwiki pages. The
> pages are stored as plain text files with .xwiki extension.
>
> I edit the pages using emacs and groovy-mode (syntax coloring,
> indentation, parenthesis checking...). The groovy-mode Emacs lisp file
> can be found on http://groovy.codehaus.org/Emacs+Plugin
>
> Once the pages edited and saved in emacs, I upload them in Xwiki using
> 'make upload' and test them using firefox. This can of course be done
> directly from Emacs with M-compile.
>
> Thanks to the fact that automake/autoconf support running configure in a
> different directory than the sources (i.e. the Xwiki documents), I can
> deploy simultaneously on 2 Xwikis, one running localy where I test the
> code, and another one running a more stable version. This is done by
> creating 2 'build' directories and running configure with
> --srcdir=SRCDIR argument.
>
> I know it is not in any case the standard way of developing in Xwiki,
> but I find it helpfull. If it can be of any help...
>
> A question now: is it possible to define Xwiki classes the same way?
> Right now, I define my classes using the web interface, but if I am
> curious to know if it is possible to do it textually?
>
> François
>
>
>
> --
> You receive this message as a subscriber of the xwiki-dev at objectweb.org mailing list.
> To unsubscribe: mailto:xwiki-dev-unsubscribe at objectweb.org
> For general help: mailto:sympa at objectweb.org?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>


-- 
http://purl.org/net/sergiu


More information about the devs mailing list