org.opencms.importexport
Interface I_CmsImport

All Known Implementing Classes:
A_CmsImport, 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
Version:
$Revision: 1.21 $
Author:
Michael Emmerich, Thomas Weckert, Michael Moossen

Method Summary
 int getVersion()
          Returns the version of the import implementation.
 void importData(CmsObject cms, I_CmsReport report, CmsImportParameters parameters)
          Imports the data.
 void importResources(CmsObject cms, java.lang.String importPath, I_CmsReport report, java.io.File importResource, java.util.zip.ZipFile importZip, org.dom4j.Document docXml)
          Deprecated. use importData(CmsObject, I_CmsReport, CmsImportParameters) instead
 boolean matches(CmsImportParameters parameters)
          Checks if the file given as parameter matches this import version implementation.
 

Method Detail

getVersion

int getVersion()
Returns the version of the import implementation.

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

void importResources(CmsObject cms,
                     java.lang.String importPath,
                     I_CmsReport report,
                     java.io.File importResource,
                     java.util.zip.ZipFile importZip,
                     org.dom4j.Document docXml)
                     throws CmsImportExportException
Deprecated. use importData(CmsObject, I_CmsReport, CmsImportParameters) instead

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

boolean matches(CmsImportParameters parameters)
                throws CmsImportExportException
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