Package org.opencms.importexport
Interface I_CmsImport
- All Known Implementing Classes:
A_CmsImport,CmsImportResourceDataReader,CmsImportVersion10,CmsImportVersion2,CmsImportVersion3,CmsImportVersion4,CmsImportVersion5,CmsImportVersion6,CmsImportVersion7
public interface I_CmsImport
This interface describes a import class which is used to import resources into the VFS.
OpenCms supports different import versions, for each version a own import class must be implemented.
- Since:
- 6.0.0
-
Method Summary
Modifier and TypeMethodDescriptionintReturns the version of the import implementation.voidimportData(CmsObject cms, I_CmsReport report, CmsImportParameters parameters) Imports the data.voidimportResources(CmsObject cms, String importPath, I_CmsReport report, File importResource, ZipFile importZip, org.dom4j.Document docXml) Deprecated.booleanmatches(CmsImportParameters parameters) Checks if the file given as parameter matches this import version implementation.
-
Method Details
-
getVersion
int getVersion()Returns the version of the import implementation.- 0 indicates an export file without a version number, that is before version 4.3.23 of OpenCms
- 1 indicates an export file of OpenCms with a version before 5.0.0
- 2 indicates an export file of OpenCms with a version before 5.1.2
- 3 indicates an export file of OpenCms with a version before 5.1.6
- 4 indicates an export file of OpenCms with a version before 6.3.0
- 5 indicates an export file of OpenCms with a version before 6.5.6
- 6 indicates an export file of OpenCms with a version before 7.0.4
- 7 indicates an export file of OpenCms with a version after 7.0.3
- Returns:
- the version of the import implementation
-
importData
void importData(CmsObject cms, I_CmsReport report, CmsImportParameters parameters) throws CmsImportExportException, CmsXmlException Imports the data.- Parameters:
cms- the current users OpenCms contextreport- a report object to output the progress information toparameters- the parameters to use during the import- Throws:
CmsImportExportException- if something goes wrongCmsXmlException- if the manifest file could not be unmarshalled
-
importResources
@Deprecated void importResources(CmsObject cms, String importPath, I_CmsReport report, File importResource, ZipFile importZip, org.dom4j.Document docXml) throws CmsImportExportException Deprecated.Imports the resources.- Parameters:
cms- the current users OpenCms contextimportPath- the path in the OpenCms VFS to import intoreport- a report object to output the progress information toimportResource- the import-resource (folder) to load resources fromimportZip- the import-resource (zip) to load resources fromdocXml- themanifest.xmlfile which contains the meta information of the imported files- Throws:
CmsImportExportException- if something goes wrong
-
matches
Checks if the file given as parameter matches this import version implementation.- Parameters:
parameters- the parameters to use during matching- Returns:
trueif the file can be imported by this import version implementation- Throws:
CmsImportExportException- if something goes wrong
-
importData(CmsObject, I_CmsReport, CmsImportParameters)instead