Class CmsImportExportManager
- java.lang.Object
-
- org.opencms.importexport.CmsImportExportManager
-
public class CmsImportExportManager extends java.lang.Object
Provides information about how to handle imported resources.- Since:
- 6.0.0
- See Also:
OpenCms.getImportExportManager()
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CmsImportExportManager.TimestampMode
Time modes to specify how time stamps should be handled.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
A_NAME
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
A_TYPE
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
EXPORT_MANIFEST
The name of the XML manifest file used for the description of exported OpenCms VFS properties and attributes.static java.lang.String
EXPORT_VERSION
The current version of the OpenCms export (appears in theEXPORT_MANIFEST
header).static java.lang.String
EXPORT_XMLFILENAME
Deprecated.useEXPORT_MANIFEST
insteadstatic java.lang.String
N_ACCESS
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_ACCESSCONTROL_ALLOWEDPERMISSIONS
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_ACCESSCONTROL_DENIEDPERMISSIONS
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_ACCESSCONTROL_ENTRIES
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_ACCESSCONTROL_ENTRY
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_ACCESSCONTROL_PERMISSIONSET
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_ACCESSCONTROL_PRINCIPAL
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_CREATOR
Tag for the "creator" node (appears in theEXPORT_MANIFEST
header).static java.lang.String
N_DATE
Tag for the "createdate" node (appears in theEXPORT_MANIFEST
header).static java.lang.String
N_DATECREATED
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_DATEEXPIRED
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_DATELASTMODIFIED
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_DATERELEASED
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_DEFAULTGROUP
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_DESCRIPTION
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_DESTINATION
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_EMAIL
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_EXPORT
Tag in theEXPORT_MANIFEST
for the "export" node.static java.lang.String
N_FILE
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_FIRSTNAME
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_FLAGS
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_GROUPDATA
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_GROUPNAME
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_ID
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_INFO
Tag in theEXPORT_MANIFEST
, starts the manifest info header.static java.lang.String
N_INFO_PROJECT
Tag in theEXPORT_MANIFEST
for the "infoproject" node, appears in the manifest info header.static java.lang.String
N_LASTMODIFIED
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_LASTNAME
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_NAME
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_OC_VERSION
Tag in theEXPORT_MANIFEST
for the "opencms_version" node, appears in the manifest info header.static java.lang.String
N_ORGUNITDATA
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_PARENTGROUP
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_PASSWORD
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_PROPERTIES
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_PROPERTY
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_PROPERTY_ATTRIB_TYPE
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_PROPERTY_ATTRIB_TYPE_SHARED
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_RELATION
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_RELATION_ATTRIBUTE_ID
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_RELATION_ATTRIBUTE_PATH
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_RELATION_ATTRIBUTE_TYPE
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_RELATIONS
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_SOURCE
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_TAG_ADDRESS
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_TYPE
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_USER
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_USERCREATED
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_USERDATA
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_USERGROUPDATA
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_USERGROUPS
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_USERINFO
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_USERINFO_ENTRY
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_USERLASTMODIFIED
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_UUIDRESOURCE
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_UUIDSTRUCTURE
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_VALUE
Deprecated.Use the appropriate tag from latest import class insteadstatic java.lang.String
N_VERSION
Tag in theEXPORT_MANIFEST
for the "export_version" node, appears in the manifest info header.static java.lang.String
PROP_EXPORT_TIMESTAMP
Property to specify the export time written for a resource's date last modified.
-
Constructor Summary
Constructors Constructor Description CmsImportExportManager()
Creates a new instance for the import/export manager, will be called by the import/export configuration manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addDefaultTimestampMode(java.lang.String timestampMode)
Adds the provided default timestamp mode for the resourcetypes in listm_resourcetypes
.void
addIgnoredProperty(java.lang.String propertyName)
Adds a property name to the list of properties that should be removed from imported resources.void
addImmutableResource(java.lang.String immutableResource)
Adds a resource to the list of immutable resources that should remain unchanged when resources are imported.void
addImportExportHandler(I_CmsImportExportHandler handler)
Adds an import/export handler to the list of configured handlers.void
addImportPrincipalTranslation(java.lang.String type, java.lang.String from, java.lang.String to)
Adds an import princial translation to the configuration.void
addImportVersionClass(I_CmsImport importVersionClass)
Adds a import version class name to the configuration.void
addResourceTypeForDefaultTimestampMode(java.lang.String resourcetypeName)
Adds a resourcetype name to the list of resourcetypes that obtain a default timestamp mode inaddDefaultTimestampMode(String)
.void
addTempExportpointPath(java.lang.String path)
Adds a temporary export point path.boolean
convertToXmlPage()
Checks if imported pages should be converted into XML pages.I_CmsExportPointDriver
createExportPointDriver(java.util.Set<CmsExportPoint> exportPoints)
Creates a new export point driver based on the import/export configuration.void
exportData(CmsObject cms, I_CmsImportExportHandler handler, I_CmsReport report)
Checks if the current user has permissions to export Cms data of a specified export handler, and if so, triggers the handler to write the export.CmsImportExportManager.TimestampMode
getDefaultTimestampMode(java.lang.String resourcetypeName)
Returns the default timestamp mode for the resourcetype - ornull
if no default mode is set.java.util.Map<CmsImportExportManager.TimestampMode,java.util.List<java.lang.String>>
getDefaultTimestampModes()
Returns the map from resourcetype names to default timestamp modes.CmsExtendedHtmlImportDefault
getExtendedHtmlImportDefault()
Returns the extendedHtmlImportDefault.CmsExtendedHtmlImportDefault
getExtendedHtmlImportDefault(boolean withNull)
Returns the extendedHtmlImportDefault.java.util.List<java.lang.String>
getIgnoredProperties()
Returns the list of property keys that should be removed from imported resources.java.util.List<java.lang.String>
getImmutableResources()
Returns the list of immutable resources that should remain unchanged when resources are imported.I_CmsImportExportHandler
getImportExportHandler(CmsImportParameters parameters)
Returns an instance of an import/export handler implementation that is able to import a specified resource.java.util.List<I_CmsImportExportHandler>
getImportExportHandlers()
Returns the list of configured import/export handlers.java.util.Map<java.lang.String,java.lang.String>
getImportGroupTranslations()
Returns the configured principal group translations.java.util.Map<java.lang.String,java.lang.String>
getImportUserTranslations()
Returns the configured principal user translations.java.util.List<I_CmsImport>
getImportVersionClasses()
Returns the configured import version class names.java.lang.String
getOldWebAppUrl()
Returns the URL of a 4.x OpenCms app.java.util.List<java.lang.String>
getTempExportPointPaths()
Gets the configured list of temporary export point paths.CmsUserExportSettings
getUserExportSettings()
Returns the user settings for export.void
importData(CmsObject cms, java.lang.String importFile, java.lang.String importPath, I_CmsReport report)
Deprecated.void
importData(CmsObject cms, I_CmsReport report, CmsImportParameters parameters)
Checks if the current user has permissions to import data into the Cms, and if so, creates a new import handler instance that imports the data.boolean
isImmutable(java.lang.String rootPath)
Checks if the given root path belongs to an immutable resource.boolean
overwriteCollidingResources()
Checks if colliding resources should be overwritten during the import.void
setConvertToXmlPage(boolean convertToXmlPage)
Sets if imported pages should be converted into XML pages.void
setConvertToXmlPage(java.lang.String convertToXmlPage)
Sets if imported pages should be converted into XML pages.void
setExtendedHtmlImportDefault(CmsExtendedHtmlImportDefault extendedHtmlImportDefault)
Sets the extendedHtmlImportDefault.void
setOldWebAppUrl(java.lang.String webAppUrl)
Sets the URL of a 4.x OpenCms app.void
setOverwriteCollidingResources(boolean overwriteCollidingResources)
Sets whether colliding resources should be overwritten during the import for a specified import implementation.void
setOverwriteCollidingResources(java.lang.String overwriteCollidingResources)
void
setUserExportSettings(CmsUserExportSettings userExportSettings)
Sets the user export settings.java.lang.String
translateGroup(java.lang.String name)
Returns the translated name for the given group name.java.lang.String
translateUser(java.lang.String name)
Returns the translated name for the given user name.
-
-
-
Field Detail
-
A_NAME
@Deprecated public static final java.lang.String A_NAME
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "userinfo/entry@name" attribute, contains the additional user info entry name.- See Also:
- Constant Field Values
-
A_TYPE
@Deprecated public static final java.lang.String A_TYPE
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "userinfo/entry@type" attribute, contains the additional user info entry data type name.- See Also:
- Constant Field Values
-
EXPORT_MANIFEST
public static final java.lang.String EXPORT_MANIFEST
The name of the XML manifest file used for the description of exported OpenCms VFS properties and attributes.- See Also:
- Constant Field Values
-
EXPORT_VERSION
public static final java.lang.String EXPORT_VERSION
The current version of the OpenCms export (appears in theEXPORT_MANIFEST
header).- See Also:
- Constant Field Values
-
EXPORT_XMLFILENAME
@Deprecated public static final java.lang.String EXPORT_XMLFILENAME
Deprecated.useEXPORT_MANIFEST
insteadThe name of the XML manifest file used for the description of exported OpenCms VFS properties and attributes.- See Also:
- Constant Field Values
-
N_ACCESS
@Deprecated public static final java.lang.String N_ACCESS
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "access" node.- See Also:
- Constant Field Values
-
N_ACCESSCONTROL_ALLOWEDPERMISSIONS
@Deprecated public static final java.lang.String N_ACCESSCONTROL_ALLOWEDPERMISSIONS
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "allowed" node, to identify allowed user permissions.- See Also:
- Constant Field Values
-
N_ACCESSCONTROL_DENIEDPERMISSIONS
@Deprecated public static final java.lang.String N_ACCESSCONTROL_DENIEDPERMISSIONS
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "denied" node, to identify denied user permissions.- See Also:
- Constant Field Values
-
N_ACCESSCONTROL_ENTRIES
@Deprecated public static final java.lang.String N_ACCESSCONTROL_ENTRIES
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "accesscontrol" node, to identify access control entries.- See Also:
- Constant Field Values
-
N_ACCESSCONTROL_ENTRY
@Deprecated public static final java.lang.String N_ACCESSCONTROL_ENTRY
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "accessentry" node, to identify a single access control entry.- See Also:
- Constant Field Values
-
N_ACCESSCONTROL_PERMISSIONSET
@Deprecated public static final java.lang.String N_ACCESSCONTROL_PERMISSIONSET
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "permissionset" node, to identify a permission set.- See Also:
- Constant Field Values
-
N_ACCESSCONTROL_PRINCIPAL
@Deprecated public static final java.lang.String N_ACCESSCONTROL_PRINCIPAL
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "uuidprincipal" node, to identify a principal UUID.- See Also:
- Constant Field Values
-
N_CREATOR
public static final java.lang.String N_CREATOR
Tag for the "creator" node (appears in theEXPORT_MANIFEST
header).- See Also:
- Constant Field Values
-
N_DATE
public static final java.lang.String N_DATE
Tag for the "createdate" node (appears in theEXPORT_MANIFEST
header).- See Also:
- Constant Field Values
-
N_DATECREATED
@Deprecated public static final java.lang.String N_DATECREATED
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "datecreated" node, contains the date created VFS file attribute.- See Also:
- Constant Field Values
-
N_DATEEXPIRED
@Deprecated public static final java.lang.String N_DATEEXPIRED
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "dateexpired" node, contains the expiration date VFS file attribute.- See Also:
- Constant Field Values
-
N_DATELASTMODIFIED
@Deprecated public static final java.lang.String N_DATELASTMODIFIED
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "datelastmodified" node, contains the date last modified VFS file attribute.- See Also:
- Constant Field Values
-
N_DATERELEASED
@Deprecated public static final java.lang.String N_DATERELEASED
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "datereleased" node, contains the release date VFS file attribute.- See Also:
- Constant Field Values
-
N_DEFAULTGROUP
@Deprecated public static final java.lang.String N_DEFAULTGROUP
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "defaultgroup" node, for backward compatibility with OpenCms 5.x.- See Also:
- Constant Field Values
-
N_DESCRIPTION
@Deprecated public static final java.lang.String N_DESCRIPTION
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "description" node, contains a users description test.- See Also:
- Constant Field Values
-
N_DESTINATION
@Deprecated public static final java.lang.String N_DESTINATION
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "destination" node, contains target VFS file name.- See Also:
- Constant Field Values
-
N_EMAIL
@Deprecated public static final java.lang.String N_EMAIL
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "email" node, contains a users email.- See Also:
- Constant Field Values
-
N_EXPORT
public static final java.lang.String N_EXPORT
Tag in theEXPORT_MANIFEST
for the "export" node.- See Also:
- Constant Field Values
-
N_FILE
@Deprecated public static final java.lang.String N_FILE
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "file" node, container node for all VFS resources.- See Also:
- Constant Field Values
-
N_FIRSTNAME
@Deprecated public static final java.lang.String N_FIRSTNAME
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "firstname" node, contains a users first name.- See Also:
- Constant Field Values
-
N_FLAGS
@Deprecated public static final java.lang.String N_FLAGS
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "flags" node, contains the flags of a VFS resource.- See Also:
- Constant Field Values
-
N_GROUPDATA
@Deprecated public static final java.lang.String N_GROUPDATA
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "groupdata" node, contains a users group data.- See Also:
- Constant Field Values
-
N_GROUPNAME
@Deprecated public static final java.lang.String N_GROUPNAME
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "groupname" node, contains a groups name.- See Also:
- Constant Field Values
-
N_ID
@Deprecated public static final java.lang.String N_ID
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "id" node, only required for backward compatibility with import version 2.- See Also:
- Constant Field Values
-
N_INFO
public static final java.lang.String N_INFO
Tag in theEXPORT_MANIFEST
, starts the manifest info header.- See Also:
- Constant Field Values
-
N_INFO_PROJECT
public static final java.lang.String N_INFO_PROJECT
Tag in theEXPORT_MANIFEST
for the "infoproject" node, appears in the manifest info header.- See Also:
- Constant Field Values
-
N_LASTMODIFIED
@Deprecated public static final java.lang.String N_LASTMODIFIED
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "lastmodified" node, only required for backward compatibility with import version 2.- See Also:
- Constant Field Values
-
N_LASTNAME
@Deprecated public static final java.lang.String N_LASTNAME
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "lastname" node, contains a users last name.- See Also:
- Constant Field Values
-
N_NAME
@Deprecated public static final java.lang.String N_NAME
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "name" node, contains a users login name.- See Also:
- Constant Field Values
-
N_OC_VERSION
public static final java.lang.String N_OC_VERSION
Tag in theEXPORT_MANIFEST
for the "opencms_version" node, appears in the manifest info header.- See Also:
- Constant Field Values
-
N_ORGUNITDATA
@Deprecated public static final java.lang.String N_ORGUNITDATA
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "orgunitdatas" node, starts the organizational unit data.- See Also:
- Constant Field Values
-
N_PARENTGROUP
@Deprecated public static final java.lang.String N_PARENTGROUP
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "parentgroup" node, contains a groups parent group name.- See Also:
- Constant Field Values
-
N_PASSWORD
@Deprecated public static final java.lang.String N_PASSWORD
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "password" node, contains a users encrypted password.- See Also:
- Constant Field Values
-
N_PROPERTIES
@Deprecated public static final java.lang.String N_PROPERTIES
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "properties" node, starts the list of properties of a VFS resource.- See Also:
- Constant Field Values
-
N_PROPERTY
@Deprecated public static final java.lang.String N_PROPERTY
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "property" node, starts a property for a VFS resource.- See Also:
- Constant Field Values
-
N_PROPERTY_ATTRIB_TYPE
@Deprecated public static final java.lang.String N_PROPERTY_ATTRIB_TYPE
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "type" property attribute, contains a property type.- See Also:
- Constant Field Values
-
N_PROPERTY_ATTRIB_TYPE_SHARED
@Deprecated public static final java.lang.String N_PROPERTY_ATTRIB_TYPE_SHARED
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "shared" property type attribute value.- See Also:
- Constant Field Values
-
N_RELATION
@Deprecated public static final java.lang.String N_RELATION
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "relation" node, starts a relation for a VFS resource.- See Also:
- Constant Field Values
-
N_RELATION_ATTRIBUTE_ID
@Deprecated public static final java.lang.String N_RELATION_ATTRIBUTE_ID
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "id" relation attribute, contains the structure id of the target resource of the relation.- See Also:
- Constant Field Values
-
N_RELATION_ATTRIBUTE_PATH
@Deprecated public static final java.lang.String N_RELATION_ATTRIBUTE_PATH
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "path" relation attribute, contains the path to the target resource of the relation.- See Also:
- Constant Field Values
-
N_RELATION_ATTRIBUTE_TYPE
@Deprecated public static final java.lang.String N_RELATION_ATTRIBUTE_TYPE
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "type" relation attribute, contains the type of relation.- See Also:
- Constant Field Values
-
N_RELATIONS
@Deprecated public static final java.lang.String N_RELATIONS
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "relations" node, starts the list of relations of a VFS resources.- See Also:
- Constant Field Values
-
N_SOURCE
@Deprecated public static final java.lang.String N_SOURCE
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "source" node, contains the source path of a VFS resource in the import zip (or folder).- See Also:
- Constant Field Values
-
N_TAG_ADDRESS
@Deprecated public static final java.lang.String N_TAG_ADDRESS
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "address" node, contains a users address.- See Also:
- Constant Field Values
-
N_TYPE
@Deprecated public static final java.lang.String N_TYPE
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "type" node, the resource type name of a VFS resource.- See Also:
- Constant Field Values
-
N_USER
@Deprecated public static final java.lang.String N_USER
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "user" node, starts the user data.- See Also:
- Constant Field Values
-
N_USERCREATED
@Deprecated public static final java.lang.String N_USERCREATED
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "usercreated" node, contains the name of the user who created the VFS resource.- See Also:
- Constant Field Values
-
N_USERDATA
@Deprecated public static final java.lang.String N_USERDATA
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "userdata" node, starts the list of users.- See Also:
- Constant Field Values
-
N_USERGROUPDATA
@Deprecated public static final java.lang.String N_USERGROUPDATA
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "usergroupdatas" node, starts the users group data.- See Also:
- Constant Field Values
-
N_USERGROUPS
@Deprecated public static final java.lang.String N_USERGROUPS
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "usergroups" node, starts the users group data.- See Also:
- Constant Field Values
-
N_USERINFO
@Deprecated public static final java.lang.String N_USERINFO
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "userinfo" node, contains the additional user info.- See Also:
- Constant Field Values
-
N_USERINFO_ENTRY
@Deprecated public static final java.lang.String N_USERINFO_ENTRY
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "userinfo/entry" node, contains the additional user info entry value.- See Also:
- Constant Field Values
-
N_USERLASTMODIFIED
@Deprecated public static final java.lang.String N_USERLASTMODIFIED
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "userlastmodified" node, contains the name of the user who last modified the VFS resource.- See Also:
- Constant Field Values
-
N_UUIDRESOURCE
@Deprecated public static final java.lang.String N_UUIDRESOURCE
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "uuidresource" node, contains a the resource UUID of a VFS resource.- See Also:
- Constant Field Values
-
N_UUIDSTRUCTURE
@Deprecated public static final java.lang.String N_UUIDSTRUCTURE
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "uuidstructure" node, only required for backward compatibility with import version 2.- See Also:
- Constant Field Values
-
N_VALUE
@Deprecated public static final java.lang.String N_VALUE
Deprecated.Use the appropriate tag from latest import class insteadTag in theEXPORT_MANIFEST
for the "value" node, contains the value of a property.- See Also:
- Constant Field Values
-
N_VERSION
public static final java.lang.String N_VERSION
Tag in theEXPORT_MANIFEST
for the "export_version" node, appears in the manifest info header.- See Also:
- Constant Field Values
-
PROP_EXPORT_TIMESTAMP
public static final java.lang.String PROP_EXPORT_TIMESTAMP
Property to specify the export time written for a resource's date last modified.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsImportExportManager
public CmsImportExportManager()
Creates a new instance for the import/export manager, will be called by the import/export configuration manager.
-
-
Method Detail
-
addDefaultTimestampMode
public void addDefaultTimestampMode(java.lang.String timestampMode)
Adds the provided default timestamp mode for the resourcetypes in listm_resourcetypes
. The method is called by the digester.- Parameters:
timestampMode
- the timestamp mode to add as default.
-
addIgnoredProperty
public void addIgnoredProperty(java.lang.String propertyName)
Adds a property name to the list of properties that should be removed from imported resources.- Parameters:
propertyName
- a property name
-
addImmutableResource
public void addImmutableResource(java.lang.String immutableResource)
Adds a resource to the list of immutable resources that should remain unchanged when resources are imported.- Parameters:
immutableResource
- a resources uri in the OpenCms VFS
-
addImportExportHandler
public void addImportExportHandler(I_CmsImportExportHandler handler)
Adds an import/export handler to the list of configured handlers.- Parameters:
handler
- the import/export handler to add
-
addImportPrincipalTranslation
public void addImportPrincipalTranslation(java.lang.String type, java.lang.String from, java.lang.String to)
Adds an import princial translation to the configuration.- Parameters:
type
- the princial type ("USER" or "GROUP")from
- the "from" translation sourceto
- the "to" translation target
-
addImportVersionClass
public void addImportVersionClass(I_CmsImport importVersionClass)
Adds a import version class name to the configuration.- Parameters:
importVersionClass
- the import version class name to add
-
addResourceTypeForDefaultTimestampMode
public void addResourceTypeForDefaultTimestampMode(java.lang.String resourcetypeName)
Adds a resourcetype name to the list of resourcetypes that obtain a default timestamp mode inaddDefaultTimestampMode(String)
. The method is called only by the digester.- Parameters:
resourcetypeName
- name of the resourcetype
-
addTempExportpointPath
public void addTempExportpointPath(java.lang.String path)
Adds a temporary export point path.- Parameters:
path
- the new temporary export point path
-
convertToXmlPage
public boolean convertToXmlPage()
Checks if imported pages should be converted into XML pages.- Returns:
- true, if imported pages should be converted into XML pages
-
createExportPointDriver
public I_CmsExportPointDriver createExportPointDriver(java.util.Set<CmsExportPoint> exportPoints)
Creates a new export point driver based on the import/export configuration.- Parameters:
exportPoints
- the export points- Returns:
- the export point driver instance
-
exportData
public void exportData(CmsObject cms, I_CmsImportExportHandler handler, I_CmsReport report) throws CmsConfigurationException, CmsImportExportException, CmsRoleViolationException
Checks if the current user has permissions to export Cms data of a specified export handler, and if so, triggers the handler to write the export.- Parameters:
cms
- the cms contexthandler
- handler containing the export datareport
- the output report- Throws:
CmsRoleViolationException
- if the current user is not a allowed to export the OpenCms databaseCmsImportExportException
- if operation was not successfulCmsConfigurationException
- if something goes wrong- See Also:
I_CmsImportExportHandler
-
getDefaultTimestampMode
public CmsImportExportManager.TimestampMode getDefaultTimestampMode(java.lang.String resourcetypeName)
Returns the default timestamp mode for the resourcetype - ornull
if no default mode is set.- Parameters:
resourcetypeName
- name of the resourcetype to get the timestamp mode for- Returns:
- if set, the default timestamp mode for the resourcetype, otherwise
null
-
getDefaultTimestampModes
public java.util.Map<CmsImportExportManager.TimestampMode,java.util.List<java.lang.String>> getDefaultTimestampModes()
Returns the map from resourcetype names to default timestamp modes.- Returns:
- the map from resourcetype names to default timestamp modes.
-
getExtendedHtmlImportDefault
public CmsExtendedHtmlImportDefault getExtendedHtmlImportDefault()
Returns the extendedHtmlImportDefault.- Returns:
- the extendedHtmlImportDefault
-
getExtendedHtmlImportDefault
public CmsExtendedHtmlImportDefault getExtendedHtmlImportDefault(boolean withNull)
Returns the extendedHtmlImportDefault.- Parameters:
withNull
- returns the extendenHtmlImport as null if its null, otherwise a new CmsExtendedHtmlImportDefault Object is generated- Returns:
- the extendedHtmlImportDefault
-
getIgnoredProperties
public java.util.List<java.lang.String> getIgnoredProperties()
Returns the list of property keys that should be removed from imported resources.- Returns:
- the list of property keys that should be removed from imported resources, or Collections.EMPTY_LIST
-
getImmutableResources
public java.util.List<java.lang.String> getImmutableResources()
Returns the list of immutable resources that should remain unchanged when resources are imported.Certain system resources should not be changed during import. This is the case for the main folders in the /system/ folder. Changes to these folders usually should not be imported to another system.
- Returns:
- the list of immutable resources, or
Collections.EMPTY_LIST
-
getImportExportHandler
public I_CmsImportExportHandler getImportExportHandler(CmsImportParameters parameters) throws CmsImportExportException
Returns an instance of an import/export handler implementation that is able to import a specified resource.- Parameters:
parameters
- the import parameters- Returns:
- an instance of an import/export handler implementation
- Throws:
CmsImportExportException
- if something goes wrong
-
getImportExportHandlers
public java.util.List<I_CmsImportExportHandler> getImportExportHandlers()
Returns the list of configured import/export handlers.- Returns:
- the list of configured import/export handlers
-
getImportGroupTranslations
public java.util.Map<java.lang.String,java.lang.String> getImportGroupTranslations()
Returns the configured principal group translations.- Returns:
- the configured principal group translations
-
getImportUserTranslations
public java.util.Map<java.lang.String,java.lang.String> getImportUserTranslations()
Returns the configured principal user translations.- Returns:
- the configured principal user translations
-
getImportVersionClasses
public java.util.List<I_CmsImport> getImportVersionClasses()
Returns the configured import version class names.- Returns:
- the configured import version class names
-
getOldWebAppUrl
public java.lang.String getOldWebAppUrl()
Returns the URL of a 4.x OpenCms app. (e.g. http://localhost:8080/opencms/opencms/) from which content was exported.This setting is required to import content of 4.x OpenCms apps. correct into 5.x OpenCms apps.
- Returns:
- the webAppUrl.
-
getTempExportPointPaths
public java.util.List<java.lang.String> getTempExportPointPaths()
Gets the configured list of temporary export point paths.If any temporary export point paths are configured, then export points writing to these paths will write to a temporary folder instead.
- Returns:
- the list of temporary export point paths
-
getUserExportSettings
public CmsUserExportSettings getUserExportSettings()
Returns the user settings for export.- Returns:
- the user settings for export
-
importData
public void importData(CmsObject cms, I_CmsReport report, CmsImportParameters parameters) throws CmsImportExportException, CmsXmlException, CmsRoleViolationException, CmsException
Checks if the current user has permissions to import data into the Cms, and if so, creates a new import handler instance that imports the data.- Parameters:
cms
- the current OpenCms context objectreport
- a Cms report to print log messagesparameters
- the import parameters- Throws:
CmsRoleViolationException
- if the current user is not allowed to import the OpenCms databaseCmsImportExportException
- if operation was not successfulCmsXmlException
- if the manifest of the import could not be unmarshalledCmsException
- in case of errors accessing the VFS- See Also:
I_CmsImportExportHandler
,importData(CmsObject, String, String, I_CmsReport)
-
importData
@Deprecated public void importData(CmsObject cms, java.lang.String importFile, java.lang.String importPath, I_CmsReport report) throws CmsImportExportException, CmsXmlException, CmsRoleViolationException, CmsException
Deprecated.Checks if the current user has permissions to import data into the Cms, and if so, creates a new import handler instance that imports the data.- Parameters:
cms
- the current OpenCms context objectimportFile
- the name (absolute path) of the resource (zipfile or folder) to be importedimportPath
- the name (absolute path) of the destination folder in the Cms if required, or nullreport
- a Cms report to print log messages- Throws:
CmsRoleViolationException
- if the current user is not allowed to import the OpenCms databaseCmsImportExportException
- if operation was not successfulCmsXmlException
- if the manifest of the import could not be unmarshalledCmsException
- in case of errors accessing the VFS- See Also:
I_CmsImportExportHandler
,importData(CmsObject, I_CmsReport, CmsImportParameters)
-
isImmutable
public boolean isImmutable(java.lang.String rootPath)
Checks if the given root path belongs to an immutable resource.- Parameters:
rootPath
- the root path to check- Returns:
- true if the path is the path of an immutable resource
-
overwriteCollidingResources
public boolean overwriteCollidingResources()
Checks if colliding resources should be overwritten during the import.- Returns:
- true, if colliding resources should be overwritten during the import
- See Also:
setOverwriteCollidingResources(boolean)
-
setConvertToXmlPage
public void setConvertToXmlPage(boolean convertToXmlPage)
Sets if imported pages should be converted into XML pages.- Parameters:
convertToXmlPage
- true, if imported pages should be converted into XML pages.
-
setConvertToXmlPage
public void setConvertToXmlPage(java.lang.String convertToXmlPage)
Sets if imported pages should be converted into XML pages.- Parameters:
convertToXmlPage
-"true"
, if imported pages should be converted into XML pages.
-
setExtendedHtmlImportDefault
public void setExtendedHtmlImportDefault(CmsExtendedHtmlImportDefault extendedHtmlImportDefault)
Sets the extendedHtmlImportDefault.- Parameters:
extendedHtmlImportDefault
- the extendedHtmlImportDefault to set
-
setOldWebAppUrl
public void setOldWebAppUrl(java.lang.String webAppUrl)
Sets the URL of a 4.x OpenCms app. (e.g. http://localhost:8080/opencms/opencms/) from which content was exported.This setting is required to import content of 4.x OpenCms apps. correct into 5.x OpenCms apps.
- Parameters:
webAppUrl
- a URL of the a OpenCms app. (e.g. http://localhost:8080/opencms/opencms/)
-
setOverwriteCollidingResources
public void setOverwriteCollidingResources(boolean overwriteCollidingResources)
Sets whether colliding resources should be overwritten during the import for a specified import implementation.v1 and v2 imports (without resource UUIDs in the manifest) *MUST* overwrite colliding resources. Don't forget to set this flag back to it's original value in v1 and v2 import implementations!
This flag must be set to false to force imports > v2 to move colliding resources to /system/lost-found/.
The import implementation has to take care to set this flag correct!
- Parameters:
overwriteCollidingResources
- true if colliding resources should be overwritten during the import
-
setOverwriteCollidingResources
public void setOverwriteCollidingResources(java.lang.String overwriteCollidingResources)
- Parameters:
overwriteCollidingResources
-"true"
if colliding resources should be overwritten during the import- See Also:
setOverwriteCollidingResources(boolean)
-
setUserExportSettings
public void setUserExportSettings(CmsUserExportSettings userExportSettings)
Sets the user export settings.- Parameters:
userExportSettings
- the user export settings to set
-
translateGroup
public java.lang.String translateGroup(java.lang.String name)
Returns the translated name for the given group name.If no matching name is found, the given group name is returned.
- Parameters:
name
- the group name to translate- Returns:
- the translated name for the given group name
-
translateUser
public java.lang.String translateUser(java.lang.String name)
Returns the translated name for the given user name.If no matching name is found, the given user name is returned.
- Parameters:
name
- the user name to translate- Returns:
- the translated name for the given user name
-
-