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 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

      Imports the data.

      Parameters:
      cms - the current users OpenCms context
      report - a report object to output the progress information to
      parameters - the parameters to use during the import
      Throws:
      CmsImportExportException - if something goes wrong
      CmsXmlException - 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
      Imports the resources.

      Parameters:
      cms - the current users OpenCms context
      importPath - the path in the OpenCms VFS to import into
      report - a report object to output the progress information to
      importResource - the import-resource (folder) to load resources from
      importZip - the import-resource (zip) to load resources from
      docXml - the manifest.xml file 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:
      true if the file can be imported by this import version implementation
      Throws:
      CmsImportExportException - if something goes wrong