Hi devs,
I’ve briefly looked at the source code of the XFF module (sources at
https://github.com/xwiki-contrib/api-xff) and here’s what I think the status is.
Current Status
============
* A Maven plugin exists to package the sources in the XFF format into a XFF zip (.xff
file). See
http://extensions.xwiki.org/xwiki/bin/view/Extension/XFF+Maven+Plugin
* A Filter Stream filter exists (see
http://extensions.xwiki.org/xwiki/bin/view/Extension/XFF+filter) for importing a XFF file
(.xff file) into a running XWiki. You need to install the Filter Stream application to use
it:
http://extensions.xwiki.org/xwiki/bin/view/Extension/Filter+Application (input = the
XFF filter, output =
http://extensions.xwiki.org/xwiki/bin/view/Extension/Filter+XWiki+Instance+…).
Note: Since there exists a XAR Filter streams input/output filter already, we can convert
a XFF zip (.xff file) into a XAR file (.xar file).
* A XFF REST API also exists to push a XFF file into a running XWiki. Apparently it uses
the Filter Stream API to read the XFF file using the input filter and it uses the XWiki
filter output filter as the output. However this REST API has to be used manually (curl)…
So it’s a shortcut from having to install the Filter Streams Application in your wiki for
importing an XFF file.
To summarize, right now you should be able to have an XFF structure in your maven project
and import it into a running XWiki (either using curl or through the Filter Streams
Application in your wiki).
What’s missing
============
* Lot of code cleanup ;)
* There doesn’t seem to be a XFF output filter so we cannot take as input an xwiki
instance and as output a XFF file (nor convert from XAR to XFF). Thus, right now I don’t
think we can do round-tripping
* The XFF format needs to be reviewed and discussed on the list for improving it.
Apparently it’s possible to have content specified outside of the page.xml file (see
https://github.com/xwiki-contrib/api-xff/blob/f0e32aae3e852e966b0d2bf6648c9…)
but I’m not sure how this is working. In this example there’s both content defined in
page.xml and in content.xwiki21. Not sure which one wins… It’s possible that this wasn’t
fully implemented yet.
* I think it would be nice to have an XFF mojo to generate a XAR file (using the existing
XAR Filter Stream filter).
* It would also be nice to have a mojo to publish directly the source content to a running
XWiki instance, using the provided REST API. Instead of having to use curl manually to do
that. Similarly, once a XFF output filter is coded, it would be nice to have a mojo to
automatically retrieve the data from a running XWiki instance and save them in the
sources.
Please correct me if I’m wrong!
Thanks
-Vincent