net.sf.borg.model
Class ExportImport

java.lang.Object
  extended by net.sf.borg.model.ExportImport

public class ExportImport
extends Object

contains common import/export utilities


Constructor Summary
ExportImport()
           
 
Method Summary
static void exportToZip(String dir, boolean backup_email)
          Export all models to XML files inside a time-stamped zipfile.
static Model getImportModelForXML(BufferedReader in)
          get the model that can import the given XML
static void importFromXmlFile(Model model, InputStream is)
          Import from a single xml input stream.
static void importFromZip(String zipFileName)
          Import an entire backup Zip file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExportImport

public ExportImport()
Method Detail

exportToZip

public static void exportToZip(String dir,
                               boolean backup_email)
                        throws Exception
Export all models to XML files inside a time-stamped zipfile.

Parameters:
dir - the directory to create the zip file in
backup_email - - send email containing the backup
Throws:
Exception

importFromXmlFile

public static void importFromXmlFile(Model model,
                                     InputStream is)
                              throws Exception
Import from a single xml input stream.

Parameters:
model - the Model to use for the import
is - the input stream
Throws:
Exception

getImportModelForXML

public static Model getImportModelForXML(BufferedReader in)
                                  throws IOException
get the model that can import the given XML

Parameters:
in - - BufferedReader for the XML
Returns:
the Model
Throws:
IOException

importFromZip

public static void importFromZip(String zipFileName)
                          throws Exception
Import an entire backup Zip file

Parameters:
zipFileName - the backup file name
Throws:
Exception


Generated December 30 2011 by mbb using Apache Ant(TM) version 1.8.2 compiled on December 20 2010 and Java version 1.6.0_30 from Sun Microsystems Inc. on Linux i386 3.0.0-14-generic-pae