com.xpn.xwiki.tool.backup
Class Importer
java.lang.Object
com.xpn.xwiki.tool.backup.AbstractPackager
com.xpn.xwiki.tool.backup.Importer
public class Importer
- extends AbstractPackager
Import a set of XWiki documents into an existing database.
- Version:
- $Id: 9412bc8cdf89cebdd99b3af3fd9fef38ce37dcb7 $
|
Method Summary |
void |
importDocuments(File sourceDirectory,
String databaseName,
File hibernateConfig)
Import documents defined in an XML file located in the passed document definition directory into a database
defined by its passed name and by an Hibernate configuration file. |
void |
importDocuments(File sourceDirectory,
String databaseName,
File hibernateConfig,
String importUser)
Import documents defined in an XML file located in the passed document definition directory into a database
defined by its passed name and by an Hibernate configuration file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Importer
public Importer()
importDocuments
public void importDocuments(File sourceDirectory,
String databaseName,
File hibernateConfig)
throws Exception
- Import documents defined in an XML file located in the passed document definition directory into a database
defined by its passed name and by an Hibernate configuration file.
Note: I would have liked to call this method "import" but it's a reserved keyword... Strange that it's not
allowed for method names though.
- Parameters:
sourceDirectory - the directory where the package.xml file is located and where the documents to import are
locateddatabaseName - some database name (TODO: find out what this name is really)hibernateConfig - the Hibernate config fill containing the database definition (JDBC driver, username and
password, etc)
- Throws:
Exception - if the import failed for any reason
importDocuments
public void importDocuments(File sourceDirectory,
String databaseName,
File hibernateConfig,
String importUser)
throws Exception
- Import documents defined in an XML file located in the passed document definition directory into a database
defined by its passed name and by an Hibernate configuration file.
Note: I would have liked to call this method "import" but it's a reserved keyword... Strange that it's not
allowed for method names though.
- Parameters:
sourceDirectory - the directory where the package.xml file is located and where the documents to import are
locateddatabaseName - some database name (TODO: find out what this name is really)hibernateConfig - the Hibernate config fill containing the database definition (JDBC driver, username and
password, etc)importUser - optionally the user under which to perform the import (useful for example when importing
pages that need to have Programming Rights and the page author is not the same as the importing user)
- Throws:
Exception - if the import failed for any reason
Copyright © 2004-2012 XWiki. All Rights Reserved.