org.opencms.importexport
Class CmsImport

java.lang.Object
  extended by org.opencms.importexport.CmsImport

public class CmsImport
extends java.lang.Object

Holds the functionality to import resources from the file system or a zip file into the OpenCms VFS.

Since:
6.0.0
Version:
$Revision: 1.52 $
Author:
Andreas Zahner, Alexander Kandzior, Michael Emmerich, Thomas Weckert

Field Summary
protected  CmsObject m_cms
          The cms context.
protected  java.util.List m_importImplementations
          Stores all import interface implementations .
protected  I_CmsReport m_report
          The output report.
 
Constructor Summary
CmsImport()
          Constructs a new uninitialized import, required for special subclass data import.
CmsImport(CmsObject cms, I_CmsReport report)
          Constructs a new import object which imports the resources from an OpenCms export zip file or a folder in the "real" file system.
 
Method Summary
 void importData(CmsImportParameters parameters)
          Imports the resources and writes them to the cms VFS, even if there already exist files with the same name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_cms

protected CmsObject m_cms
The cms context.


m_report

protected I_CmsReport m_report
The output report.


m_importImplementations

protected java.util.List m_importImplementations
Stores all import interface implementations .

Constructor Detail

CmsImport

public CmsImport()
Constructs a new uninitialized import, required for special subclass data import.


CmsImport

public CmsImport(CmsObject cms,
                 I_CmsReport report)
          throws CmsRoleViolationException
Constructs a new import object which imports the resources from an OpenCms export zip file or a folder in the "real" file system.

Parameters:
cms - the cms context
report - the output report
Throws:
CmsRoleViolationException - if the current user dies not have role permissions to import the database
Method Detail

importData

public void importData(CmsImportParameters parameters)
                throws CmsImportExportException,
                       CmsXmlException
Imports the resources and writes them to the cms VFS, even if there already exist files with the same name.

Parameters:
parameters - the import parameters
Throws:
CmsImportExportException - if something goes wrong
CmsXmlException - if the manifest of the import file could not be unmarshalled