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

Deprecated. this import class is no longer in use and should only be used to import old export files

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

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

Field Summary
static int IMPORT_VERSION
          Deprecated. The version number of this import implementation.
protected  java.util.Map m_importedRelations
          Deprecated. Stores all relations defined in the import file to be created after all resources has been imported.
protected  boolean m_keepPermissions
          Deprecated. The keep permissions flag.
protected  java.util.List m_parseables
          Deprecated. Stores all resources of any type that implements the I_CmsLinkParseable interface.
 
Fields inherited from class org.opencms.importexport.A_CmsImport
A_NAME, A_TYPE, m_cms, m_convertToXmlPage, m_docXml, m_groupsToCreate, m_importPath, m_importResource, m_importZip, m_linkPropertyStorage, m_linkStorage, m_report, m_userMessages, N_ACCESS, N_ACCESSCONTROL_ALLOWEDPERMISSIONS, N_ACCESSCONTROL_DENIEDPERMISSIONS, N_ACCESSCONTROL_ENTRIES, N_ACCESSCONTROL_ENTRY, N_ACCESSCONTROL_PERMISSIONSET, N_ACCESSCONTROL_PRINCIPAL, N_DATECREATED, N_DATEEXPIRED, N_DATELASTMODIFIED, N_DATERELEASED, N_DEFAULTGROUP, N_DESCRIPTION, N_DESTINATION, N_EMAIL, N_FILE, N_FIRSTNAME, N_FLAGS, N_GROUPDATA, N_GROUPNAME, N_ID, N_LASTMODIFIED, N_LASTNAME, N_NAME, N_ORGUNITDATA, N_PARENTGROUP, N_PASSWORD, N_PROPERTIES, N_PROPERTY, N_PROPERTY_ATTRIB_TYPE, N_PROPERTY_ATTRIB_TYPE_SHARED, N_RELATION, N_RELATION_ATTRIBUTE_ID, N_RELATION_ATTRIBUTE_PATH, N_RELATION_ATTRIBUTE_TYPE, N_RELATIONS, N_SOURCE, N_TAG_ADDRESS, N_TYPE, N_USER, N_USERCREATED, N_USERDATA, N_USERGROUPDATA, N_USERGROUPS, N_USERINFO, N_USERINFO_ENTRY, N_USERLASTMODIFIED, N_UUIDRESOURCE, N_UUIDSTRUCTURE, N_VALUE, RESOURCE_TYPE_LEGACY_PAGE_NAME, RESOURCE_TYPE_LINK_ID, RESOURCE_TYPE_LINK_NAME, RESOURCE_TYPE_NEWPAGE_ID, RESOURCE_TYPE_NEWPAGE_NAME
 
Constructor Summary
CmsImportVersion5()
          Deprecated. Creates a new CmsImportVerion7 object.
 
Method Summary
protected  long convertTimestamp(java.lang.String timestamp)
          Deprecated. Convert a given time stamp from a String format to a long value.
 int getVersion()
          Deprecated. Returns the version of the import implementation.
 void importData(CmsObject cms, I_CmsReport report, CmsImportParameters params)
          Deprecated. Imports the data.
protected  void importRelations()
          Deprecated. Imports the relations.
protected  void importRelations(CmsResource resource, org.dom4j.Element parentElement)
          Deprecated. Reads all the relations of the resource from the manifest.xml file and adds them to the according resource.
protected  CmsResource importResource(java.lang.String source, java.lang.String destination, I_CmsResourceType type, java.lang.String uuidstructure, java.lang.String uuidresource, long datelastmodified, java.lang.String userlastmodified, long datecreated, java.lang.String usercreated, long datereleased, long dateexpired, java.lang.String flags, java.util.List properties)
          Deprecated. Imports a resource (file or folder) into the cms.
 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
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)
          Deprecated. Imports a single user.
protected  void readResourcesFromManifest()
          Deprecated. Reads all file nodes plus their meta-information (properties, ACL) from the manifest.xml and imports them as Cms resources to the VFS.
protected  void rewriteParseables()
          Deprecated. Rewrites all parseable files, to assure link check.
 
Methods inherited from class org.opencms.importexport.A_CmsImport
checkImmutable, cleanUp, convertDigestEncoding, convertPointerToSiblings, getChildElementTextValue, getFileBytes, getImportAccessControlEntry, getLocale, importAccessControlEntries, importGroup, importGroups, importUsers, initialize, matches, 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
Deprecated. 
The version number of this import implementation.

See Also:
Constant Field Values

m_importedRelations

protected java.util.Map m_importedRelations
Deprecated. 
Stores all relations defined in the import file to be created after all resources has been imported.


m_parseables

protected java.util.List m_parseables
Deprecated. 
Stores all resources of any type that implements the I_CmsLinkParseable interface.


m_keepPermissions

protected boolean m_keepPermissions
Deprecated. 
The keep permissions flag.

Constructor Detail

CmsImportVersion5

public CmsImportVersion5()
Deprecated. 
Creates a new CmsImportVerion7 object.

Method Detail

getVersion

public int getVersion()
Deprecated. 
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
Deprecated. use importData(CmsObject, I_CmsReport, CmsImportParameters) instead

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)

importData

public void importData(CmsObject cms,
                       I_CmsReport report,
                       CmsImportParameters params)
                throws CmsImportExportException,
                       CmsXmlException
Deprecated. 
Description copied from interface: I_CmsImport
Imports the data.

Parameters:
cms - the current users OpenCms context
report - a report object to output the progress information to
params - the parameters to use during the import
Throws:
CmsImportExportException - if something goes wrong
CmsXmlException - if the manifest file could not be unmarshalled
See Also:
I_CmsImport.importData(CmsObject, I_CmsReport, CmsImportParameters)

convertTimestamp

protected long convertTimestamp(java.lang.String timestamp)
Deprecated. 
Convert a given time stamp from a String format to a long value.

The time stamp is either the string representation of a long value (old export format) or a user-readable string format.

Parameters:
timestamp - time stamp to convert
Returns:
long value of the time stamp

importRelations

protected void importRelations()
Deprecated. 
Imports the relations.


importRelations

protected void importRelations(CmsResource resource,
                               org.dom4j.Element parentElement)
Deprecated. 
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

importResource

protected CmsResource importResource(java.lang.String source,
                                     java.lang.String destination,
                                     I_CmsResourceType type,
                                     java.lang.String uuidstructure,
                                     java.lang.String uuidresource,
                                     long datelastmodified,
                                     java.lang.String userlastmodified,
                                     long datecreated,
                                     java.lang.String usercreated,
                                     long datereleased,
                                     long dateexpired,
                                     java.lang.String flags,
                                     java.util.List properties)
Deprecated. 
Imports a resource (file or folder) into the cms.

Parameters:
source - the path to the source-file
destination - the path to the destination-file in the cms
type - the resource type name of the file
uuidstructure - the structure uuid of the resource
uuidresource - the resource uuid of the resource
datelastmodified - the last modification date of the resource
userlastmodified - the user who made the last modifications to the resource
datecreated - the creation date of the resource
usercreated - the user who created
datereleased - the release date of the resource
dateexpired - the expire date of the resource
flags - the flags of the resource
properties - a list with properties for this resource
Returns:
imported resource

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
Deprecated. 
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)

readResourcesFromManifest

protected void readResourcesFromManifest()
                                  throws CmsImportExportException
Deprecated. 
Reads all file nodes plus their meta-information (properties, ACL) from the manifest.xml and imports them as Cms resources to the VFS.

Throws:
CmsImportExportException - if something goes wrong

rewriteParseables

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