org.opencms.importexport
Class CmsImportVersion5

java.lang.Object
  extended by org.opencms.importexport.A_CmsImport
      extended by org.opencms.importexport.CmsImportVersion5
All Implemented Interfaces:
I_CmsImport
Direct Known Subclasses:
CmsImportVersion6

public class CmsImportVersion5
extends A_CmsImport

Implementation of the OpenCms Import Interface (I_CmsImport) for the import version 5.

This import format is used in OpenCms since 7 dev branch.

Since:
6.3.0
Version:
$Revision: 1.2 $
Author:
Michael Moossen
See Also:
A_CmsImport

Field Summary
static int IMPORT_VERSION
          The version number of this import implementation.
 
Fields inherited from class org.opencms.importexport.A_CmsImport
DEBUG, m_cms, m_convertToXmlPage, m_docXml, m_groupsToCreate, m_importPath, m_importResource, m_importZip, m_linkPropertyStorage, m_linkStorage, m_report, m_userMessages, RESOURCE_TYPE_LEGACY_PAGE_NAME, RESOURCE_TYPE_LINK_ID, RESOURCE_TYPE_LINK_NAME, RESOURCE_TYPE_NEWPAGE_ID, RESOURCE_TYPE_NEWPAGE_NAME
 
Constructor Summary
CmsImportVersion5()
          Creates a new CmsImportVerion7 object.
 
Method Summary
 int getVersion()
          Returns the version of the import implementation.
protected  void importRelations()
          Imports the relations.
protected  void importRelations(CmsResource resource, org.dom4j.Element parentElement)
          Reads all the relations of the resource from the manifest.xml file and adds them to the according resource.
 void importResources(CmsObject cms, java.lang.String importPath, I_CmsReport report, java.io.File importResource, java.util.zip.ZipFile importZip, org.dom4j.Document docXml)
          Imports the resources.
protected  void importUser(java.lang.String name, java.lang.String flags, java.lang.String password, java.lang.String firstname, java.lang.String lastname, java.lang.String email, long dateCreated, java.util.Map userInfo, java.util.List userGroups)
          Imports a single user.
protected  void rewriteParseables()
          Rewrites all parseable files, to assure link check.
 
Methods inherited from class org.opencms.importexport.A_CmsImport
checkImmutable, cleanUp, convertDigestEncoding, convertPointerToSiblings, getFileBytes, getImportAccessControlEntry, getLocale, importAccessControlEntries, importGroup, importGroups, importUsers, initialize, readPropertiesFromManifest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IMPORT_VERSION

public static final int IMPORT_VERSION
The version number of this import implementation.

See Also:
Constant Field Values
Constructor Detail

CmsImportVersion5

public CmsImportVersion5()
Creates a new CmsImportVerion7 object.

Method Detail

getVersion

public int getVersion()
Description copied from interface: I_CmsImport
Returns the version of the import implementation.

Returns:
the version of the import implementation
See Also:
I_CmsImport.getVersion()

importResources

public 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
Description copied from interface: I_CmsImport
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
See Also:
I_CmsImport.importResources(org.opencms.file.CmsObject, java.lang.String, org.opencms.report.I_CmsReport, java.io.File, java.util.zip.ZipFile, org.dom4j.Document)

importRelations

protected void importRelations()
Imports the relations.


importRelations

protected void importRelations(CmsResource resource,
                               org.dom4j.Element parentElement)
Reads all the relations of the resource from the manifest.xml file and adds them to the according resource.

Parameters:
resource - the resource to import the relations for
parentElement - the current element

importUser

protected void importUser(java.lang.String name,
                          java.lang.String flags,
                          java.lang.String password,
                          java.lang.String firstname,
                          java.lang.String lastname,
                          java.lang.String email,
                          long dateCreated,
                          java.util.Map userInfo,
                          java.util.List userGroups)
                   throws CmsImportExportException
Description copied from class: A_CmsImport
Imports a single user.

Overrides:
importUser in class A_CmsImport
Parameters:
name - user name
flags - user flags
password - user password
firstname - firstname of the user
lastname - lastname of the user
email - user email
dateCreated - creation date
userInfo - user info
userGroups - user groups
Throws:
CmsImportExportException - in case something goes wrong
See Also:
A_CmsImport.importUser(String, String, String, String, String, String, long, Map, List)

rewriteParseables

protected void rewriteParseables()
Rewrites all parseable files, to assure link check.