org.mmbase.util.xml.applicationdata
Class FullBackupDataWriter

java.lang.Object
  extended by org.mmbase.util.xml.applicationdata.FullBackupDataWriter

public class FullBackupDataWriter
extends Object

This is used to export a full backup, by writing all nodes to XML.

Since:
MMBase-1.8
Version:
$Id: FullBackupDataWriter.java 41843 2010-04-12 15:04:13Z michiel $
Author:
Pierre van Rooden

Constructor Summary
FullBackupDataWriter()
           
 
Method Summary
static void writeContext(ApplicationReader reader, String targetPath, MMBase mmbase, Logger logger)
          Writes all nodes to XML.
(package private) static void writeNodes(String subTargetPath, MMBase mmbase, Logger logger)
          Searches the MMBase cloud, collecting all nodes and storing them in data files.
(package private) static void writeNodes(String subTargetPath, MMBase mmbase, Logger logger, MMObjectBuilder builder, List<MMObjectNode> nodes, boolean isRelation)
          Writes the nodes of a particular type to the corresponding XML file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FullBackupDataWriter

public FullBackupDataWriter()
Method Detail

writeContext

public static void writeContext(ApplicationReader reader,
                                String targetPath,
                                MMBase mmbase,
                                Logger logger)
                         throws SearchQueryException
Writes all nodes to XML.

Parameters:
reader - A ApplicationReader initialised to read the application's description (xml) file
targetPath - The path where to save the application
mmbase - Reference to the MMbase processormodule. Used to retrieve the nodes to write.
logger - Storage for messages which can be displayed to the user.
Throws:
IOException - if a file could not be written
SearchQueryException - if data could not be obtained from the database

writeNodes

static void writeNodes(String subTargetPath,
                       MMBase mmbase,
                       Logger logger)
                throws SearchQueryException
Searches the MMBase cloud, collecting all nodes and storing them in data files.

Parameters:
targetPath - The path where to save the application data
mmb - MMBase object used to retrieve builder information
logger - Storage for messages which can be displayed to the user.
Throws:
IOException - if a file could not be written
SearchQueryException - if data could not be obtained from the database

writeNodes

static void writeNodes(String subTargetPath,
                       MMBase mmbase,
                       Logger logger,
                       MMObjectBuilder builder,
                       List<MMObjectNode> nodes,
                       boolean isRelation)
Writes the nodes of a particular type to the corresponding XML file.

Parameters:
builder - The builder.
nodes - The nodes, must type corresponding to the builder.
subTargetPath - Path where the XML file is written.
mmb - MMBase object used to retrieve builder information
logger - Used to store messages that can be shown to the user
isRelation - Indicates whether the nodes to write are data (false) or relation (true) nodes


MMBase 2.0-SNAPSHOT - null