|
||||||
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
public class 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
Deprecated. Web application names for conversion support. |
protected java.lang.String |
m_webappUrl
Deprecated. Old webapp URL for import conversion. |
static java.lang.String |
VFS_PATH_BODIES
Deprecated. Parameter for content body folder. |
Constructor Summary | |
---|---|
CmsImportVersion2()
Deprecated. |
Method Summary | |
---|---|
protected void |
cleanUp()
Deprecated. 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)
Deprecated. Performs all required pre-import steps. |
protected java.lang.String |
getEncoding(java.lang.String content)
Deprecated. Gets the encoding from the <? |
int |
getVersion()
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,
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 |
initialize()
Deprecated. Initializes all member variables before the import is started. |
static java.lang.String |
setDirectories(java.lang.String content,
java.lang.String[] rules)
Deprecated. 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)
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VFS_PATH_BODIES
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 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 import
CmsImportExportException
- if something goes wrong
CmsXmlException
- if the manifest file could not be unmarshalledI_CmsImport.importData(CmsObject, I_CmsReport, CmsImportParameters)
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)
instead
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 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
A_CmsImport
importUser
in class A_CmsImport
name
- user nameflags
- user flagspassword
- user passwordfirstname
- firstname of the userlastname
- lastname of the useremail
- user emaildateCreated
- creation dateuserInfo
- user infouserGroups
- user groups
CmsImportExportException
- 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
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 |