Package org.opencms.importexport
Class CmsImportVersion2
java.lang.Object
org.opencms.importexport.A_CmsImport
org.opencms.importexport.CmsImportVersion2
- All Implemented Interfaces:
I_CmsImport
Deprecated.
this import class is no longer in use and should only be used to import old export files
Implementation of the OpenCms Import Interface (
I_CmsImport
) for
the import version 2.This import format was used in OpenCms 5.0.0 - 5.1.2.
- Since:
- 6.0.0
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionDeprecated.Web application names for conversion support.protected String
Deprecated.Old webapp URL for import conversion.static final String
Deprecated.Parameter for content body folder.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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
cleanUp()
Deprecated.Cleans up member variables after the import is finished.protected byte[]
convertContent
(String source, String destination, byte[] content, String resType) Deprecated.Performs all required pre-import steps.protected String
getEncoding
(String content) Deprecated.Gets the encoding from the <?XML ...> tag if present.int
Deprecated.Returns the version of the import implementation.void
importData
(CmsObject cms, I_CmsReport report, CmsImportParameters params) Deprecated.Imports the data.void
importResources
(CmsObject cms, String importPath, I_CmsReport report, File importResource, ZipFile importZip, org.dom4j.Document docXml) Deprecated.protected void
importUser
(String name, String flags, String password, String firstname, String lastname, String email, long dateCreated, Map<String, Object> userInfo, List<String> userGroups) Deprecated.Imports a single user.protected void
Deprecated.Initializes all member variables before the import is started.static String
setDirectories
(String content, String[] rules) Deprecated.Translates directory Strings from OpenCms 4.x structure to new 5.0 structure.protected String
setEncoding
(String content, String encoding) Deprecated.Sets the right encoding and returns the result.Methods inherited from class org.opencms.importexport.A_CmsImport
checkImmutable, convertDigestEncoding, convertPointerToSiblings, getChildElementTextValue, getFileBytes, getImportAccessControlEntry, getLocale, importAccessControlEntries, importGroup, importGroups, importUsers, matches, readPropertiesFromManifest
-
Field Details
-
VFS_PATH_BODIES
Deprecated.Parameter for content body folder.- See Also:
-
m_webAppNames
Deprecated.Web application names for conversion support. -
m_webappUrl
Deprecated.Old webapp URL for import conversion.
-
-
Constructor Details
-
CmsImportVersion2
public CmsImportVersion2()Deprecated.
-
-
Method Details
-
setDirectories
Deprecated.Translates directory Strings from OpenCms 4.x structure to new 5.0 structure.- Parameters:
content
- the filecontentrules
- the translation rules- Returns:
- String the manipulated file content
-
getVersion
Deprecated.Description copied from interface:I_CmsImport
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 number of this import implementation
- See Also:
-
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 contextreport
- a report object to output the progress information toparams
- the parameters to use during the import- Throws:
CmsImportExportException
- if something goes wrongCmsXmlException
- if the manifest file could not be unmarshalled- See Also:
-
importResources
@Deprecated public void importResources(CmsObject cms, String importPath, I_CmsReport report, File importResource, ZipFile importZip, org.dom4j.Document docXml) throws CmsImportExportException Deprecated.Description copied from interface:I_CmsImport
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.xml
file which contains the meta information of the imported files- Throws:
CmsImportExportException
- if something goes wrong- See Also:
-
cleanUp
Deprecated.Cleans up member variables after the import is finished.This is required since there is only one instance for each import version that is kept in memory and reused.
- Overrides:
cleanUp
in classA_CmsImport
-
convertContent
Deprecated.Performs all required pre-import steps.The content is *NOT* changed in the implementation of this class.
- Parameters:
source
- the source path of the resourcedestination
- the destination path of the resourcecontent
- the content of the resourceresType
- the type of the resource- Returns:
- the (prepared) content of the resource
-
getEncoding
Deprecated.Gets the encoding from the <?XML ...> tag if present.- Parameters:
content
- the file content- Returns:
- String the found encoding
-
importUser
protected void importUser(String name, String flags, String password, String firstname, String lastname, String email, long dateCreated, Map<String, Object> userInfo, List<String> userGroups) throws CmsImportExportExceptionDeprecated.Description copied from class:A_CmsImport
Imports a single user.- Overrides:
importUser
in classA_CmsImport
- Parameters:
name
- user nameflags
- user flagspassword
- user passwordfirstname
- firstname of the userlastname
- lastname of the useremail
- user emaildateCreated
- creation dateuserInfo
- user infouserGroups
- user groups- Throws:
CmsImportExportException
- in case something goes wrong- See Also:
-
initialize
Deprecated.Initializes all member variables before the import is started.This is required since there is only one instance for each import version that is kept in memory and reused.
- Overrides:
initialize
in classA_CmsImport
-
setEncoding
Deprecated.Sets the right encoding and returns the result.- Parameters:
content
- the filecontentencoding
- the encoding to use- Returns:
- modified content
-