|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.importexport.A_CmsImport
org.opencms.importexport.CmsImportVersion2
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.
A_CmsImport
Field Summary | |
protected java.util.List |
m_webAppNames
Web application names for conversion support. |
protected java.lang.String |
m_webappUrl
Old webapp URL for import conversion. |
Fields inherited from class org.opencms.importexport.A_CmsImport |
DEBUG, m_cms, m_convertToXmlPage, m_docXml, m_groupsToCreate, m_importingChannelData, 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 | |
CmsImportVersion2()
|
Method Summary | |
protected void |
cleanUp()
Cleans up member variables after the import is finished. |
protected byte[] |
convertContent(java.lang.String source,
java.lang.String destination,
byte[] content,
java.lang.String resType)
Performs all required pre-import steps. |
protected java.lang.String |
getEncoding(java.lang.String content)
Gets the encoding from the <? |
int |
getVersion()
Returns the version of the import implementation. |
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 description,
java.lang.String flags,
java.lang.String password,
java.lang.String firstname,
java.lang.String lastname,
java.lang.String email,
java.lang.String address,
java.lang.String type,
java.util.Map userInfo,
java.util.List userGroups)
Imports a single user. |
protected void |
initialize()
Initializes all member variables before the import is started. |
static java.lang.String |
setDirectories(java.lang.String content,
java.lang.String[] rules)
Translates directory Strings from OpenCms 4.x structure to new 5.0 structure. |
protected java.lang.String |
setEncoding(java.lang.String content,
java.lang.String encoding)
Sets the right encoding and returns the result. |
Methods inherited from class org.opencms.importexport.A_CmsImport |
checkImmutable, convertDigestEncoding, convertPointerToSiblings, getFileBytes, getImportAccessControlEntry, getLocale, importAccessControlEntries, importGroup, importGroups, importUsers, readPropertiesFromManifest |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.List m_webAppNames
protected java.lang.String m_webappUrl
Constructor Detail |
public CmsImportVersion2()
Method Detail |
public static java.lang.String setDirectories(java.lang.String content, java.lang.String[] rules)
content
- the filecontentrules
- the translation rules
public int getVersion()
I_CmsImport
I_CmsImport.getVersion()
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
I_CmsImport
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
- the manifest.xml
file which contains the meta information of the imported files
CmsImportExportException
- if something goes wrongI_CmsImport.importResources(org.opencms.file.CmsObject, java.lang.String, org.opencms.report.I_CmsReport, java.io.File, java.util.zip.ZipFile, org.dom4j.Document)
protected void cleanUp()
This is required since there is only one instance for each import version that is kept in memory and reused.
cleanUp
in class A_CmsImport
protected byte[] convertContent(java.lang.String source, java.lang.String destination, byte[] content, java.lang.String resType)
The content is *NOT* changed in the implementation of this class.
source
- the source path of the resourcedestination
- the destination path of the resourcecontent
- the content of the resourceresType
- the type of the resource
protected java.lang.String getEncoding(java.lang.String content)
content
- the file content
protected void importUser(java.lang.String name, java.lang.String description, java.lang.String flags, java.lang.String password, java.lang.String firstname, java.lang.String lastname, java.lang.String email, java.lang.String address, java.lang.String type, java.util.Map userInfo, java.util.List userGroups) throws CmsImportExportException
importUser
in class A_CmsImport
name
- user namedescription
- user descriptionflags
- user flagspassword
- user passwordfirstname
- firstname of the userlastname
- lastname of the useremail
- user emailaddress
- user addresstype
- user typeuserInfo
- user infouserGroups
- user groups
CmsImportExportException
- in case something goes wrongprotected void initialize()
This is required since there is only one instance for each import version that is kept in memory and reused.
initialize
in class A_CmsImport
protected java.lang.String setEncoding(java.lang.String content, java.lang.String encoding)
content
- the filecontentencoding
- the encoding to use
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |