com.ecyrd.jspwiki.content
Class Exporter

java.lang.Object
  extended by com.ecyrd.jspwiki.content.Exporter

public class Exporter
extends Object

Exports the contents of the wiki in a JCR System Tree format. UUIDs that this class generates are based on the jspwiki application name set in jspwiki.properties, and the name of the page. This means that it is possible to get collisions, if you have two wikis with the same appname.

The exported WikiSpace name is always "main". You can edit the XML file by hand if you wish to import it to a different wikispace.


Constructor Summary
Exporter(OutputStream outStream, boolean verbose)
          Create a new wiki exporter.
 
Method Summary
protected  void export(String dir)
           
 void export(WikiEngine engine)
          Exports the entire repository using a WikiEngine.
protected  void exportPage(WikiEngine engine, Attachment att)
           
protected  void exportPage(WikiEngine engine, WikiPage p)
           
static void exportWithDir(String dir, String outFile)
          This is a special version of the routine which knows the FileSystemProvider default format.
static void exportWithProperties(String propFile, String outFile)
           
static void main(String[] argv)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Exporter

public Exporter(OutputStream outStream,
                boolean verbose)
         throws UnsupportedEncodingException
Create a new wiki exporter.

Parameters:
outStream - The stream to which the XML data should be written.
verbose - use verbosity or not
Throws:
UnsupportedEncodingException - If your platform does not support UTF-8
Method Detail

export

public void export(WikiEngine engine)
            throws ProviderException,
                   IOException
Exports the entire repository using a WikiEngine.

Throws:
ProviderException
IOException

export

protected void export(String dir)
               throws IOException
Throws:
IOException

exportPage

protected void exportPage(WikiEngine engine,
                          WikiPage p)
                   throws IOException,
                          ProviderException
Throws:
IOException
ProviderException

exportPage

protected void exportPage(WikiEngine engine,
                          Attachment att)
                   throws IOException,
                          ProviderException
Throws:
IOException
ProviderException

main

public static void main(String[] argv)
                 throws IOException
Throws:
IOException

exportWithDir

public static void exportWithDir(String dir,
                                 String outFile)
                          throws IOException
This is a special version of the routine which knows the FileSystemProvider default format.

Parameters:
dir -
outFile -
Throws:
IOException

exportWithProperties

public static void exportWithProperties(String propFile,
                                        String outFile)
                                 throws IOException
Throws:
IOException