Package org.opencms.importexport
Class CmsImport
- java.lang.Object
-
- 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
-
-
Field Summary
Fields Modifier and Type Field Description protected CmsObject
m_cms
The cms context.protected java.util.List<I_CmsImport>
m_importImplementations
Stores all import interface implementations .protected I_CmsReport
m_report
The output report.
-
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
importData(CmsImportParameters parameters)
Imports the resources and writes them to the cms VFS, even if there already exist files with the same name.
-
-
-
Field Detail
-
m_report
protected I_CmsReport m_report
The output report.
-
m_importImplementations
protected java.util.List<I_CmsImport> 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 contextreport
- 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 wrongCmsXmlException
- if the manifest of the import file could not be unmarshalled
-
-