@Deprecated public class CmsImportVersion2 extends A_CmsImport
I_CmsImport
) for
the import version 2.This import format was used in OpenCms 5.0.0 - 5.1.2.
A_CmsImport
限定符和类型 | 字段和说明 |
---|---|
protected java.util.List<java.lang.String> |
m_webAppNames
已过时。
Web application names for conversion support.
|
protected java.lang.String |
m_webappUrl
已过时。
Old webapp URL for import conversion.
|
static java.lang.String |
VFS_PATH_BODIES
已过时。
Parameter for content body folder.
|
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
构造器和说明 |
---|
CmsImportVersion2()
已过时。
|
限定符和类型 | 方法和说明 |
---|---|
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 |
importData(CmsObject cms,
I_CmsReport report,
CmsImportParameters params)
已过时。
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)
已过时。
|
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<java.lang.String,java.lang.Object> userInfo,
java.util.List<java.lang.String> 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.
|
public static final java.lang.String VFS_PATH_BODIES
protected java.util.List<java.lang.String> m_webAppNames
protected java.lang.String m_webappUrl
public static java.lang.String setDirectories(java.lang.String content, java.lang.String[] rules)
content
- the filecontentrules
- the translation rulespublic int getVersion()
I_CmsImport
I_CmsImport.getVersion()
public void importData(CmsObject cms, I_CmsReport report, CmsImportParameters params) throws CmsImportExportException, CmsXmlException
I_CmsImport
cms
- the current users OpenCms contextreport
- a report object to output the progress information toparams
- the parameters to use during the importCmsImportExportException
- if something goes wrongCmsXmlException
- if the manifest file could not be unmarshalledI_CmsImport.importData(CmsObject, I_CmsReport, CmsImportParameters)
@Deprecated 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
importData(CmsObject, I_CmsReport, CmsImportParameters)
insteadI_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 filesCmsImportExportException
- 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
在类中 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 resourceprotected java.lang.String getEncoding(java.lang.String content)
content
- the file contentprotected 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<java.lang.String,java.lang.Object> userInfo, java.util.List<java.lang.String> userGroups) throws CmsImportExportException
A_CmsImport
importUser
在类中 A_CmsImport
name
- user nameflags
- user flagspassword
- user passwordfirstname
- firstname of the userlastname
- lastname of the useremail
- user emaildateCreated
- creation dateuserInfo
- user infouserGroups
- user groupsCmsImportExportException
- in case something goes wrongA_CmsImport.importUser(String, String, String, String, String, String, long, Map, List)
protected void initialize()
This is required since there is only one instance for each import version that is kept in memory and reused.
initialize
在类中 A_CmsImport
protected java.lang.String setEncoding(java.lang.String content, java.lang.String encoding)
content
- the filecontentencoding
- the encoding to use