Class CmsImportVersion10
- java.lang.Object
-
- org.opencms.importexport.CmsImportVersion10
-
- All Implemented Interfaces:
I_CmsImport
- Direct Known Subclasses:
CmsImportResourceDataReader
public class CmsImportVersion10 extends java.lang.Object implements I_CmsImport
Adds the XML handler rules for import and export of resources and accounts.- Since:
- 7.0.4
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CmsImportVersion10.LinkParsableCategory
Categories of resources that need to be handled differently in the 'rewrite parseables' import step.static class
CmsImportVersion10.RelationData
Data class to temporarily keep track of relation data for a resource to be imported.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
A_NAME
Tag for the "userinfo / entry name" attribute, contains the additional user info entry name.static java.lang.String
A_TYPE
Tag for the "type" attribute, contains the property type.protected static long
DATE_CREATED_UNSPECIFIED
Constant for the unspecified creation date.protected static long
DATE_LAST_MODIFICATION_FILETIME
Constant for using file time as last modification date on file import.protected static long
DATE_LAST_MODIFICATION_UNSPECIFIED
Constant for an unspecified last modification date.static java.lang.String
DTD_FILENAME
The name of the DTD for this import version.static java.lang.String
DTD_LOCATION
The location of the OpenCms configuration DTD if the default prefix is the system ID.static int
IMPORT_VERSION10
The version number of this import implementation.protected int
m_aceFlags
The ACE flags value.protected int
m_acePermissionsAllowed
The ACE allowed permissions value.protected int
m_acePermissionsDenied
The ACE denied permissions value.protected CmsUUID
m_acePrincipalId
The ACE principal id value.protected java.util.List<CmsAccessControlEntry>
m_aces
The list of ACEs for the current imported resource.protected CmsObject
m_cms
The cms object.protected java.util.Set<CmsUUID>
m_contentFiles
The set of resource ids of files which actually are contained in the zip file.protected java.lang.String
m_destination
The destination value.protected int
m_fileCounter
The current file counter.protected java.lang.String
m_groupDescription
The description of the current group to import.protected int
m_groupFlags
The flags of the current group to import.protected java.lang.String
m_groupName
The name of the current group to import.protected java.lang.String
m_groupParent
The parent of the current group to import.protected java.util.Map<java.lang.String,java.util.List<java.lang.String>>
m_groupParents
Map of all parent groups that could not be set immediately, because of the import order.protected boolean
m_hasDateLastModified
True if a modification date has been set.protected boolean
m_hasStructureId
True if a structure id has been set.protected CmsImportHelper
m_helper
The import helper.protected java.util.List<java.lang.String>
m_ignoredProperties
List of ignored properties.protected java.util.List<java.lang.String>
m_immutables
List of immutable resources.protected boolean
m_importACEs
The flag to import ACEs.protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>>
m_membership
The membership structure.protected CmsOrganizationalUnit
m_orgUnit
The current imported organizational unit.protected java.lang.String
m_orgUnitDescription
The organizational unit description.protected int
m_orgUnitFlags
The organizational unit flags.protected java.lang.String
m_orgUnitName
The organizational unit fqn.protected java.util.Map<java.lang.String,java.util.List<java.lang.String>>
m_orgUnitResources
The map of organizational unit resources, this is a global field that will be use at the end of the import.protected CmsImportParameters
m_parameters
The import parameters to use.protected java.util.List<CmsResource>
m_parseables
The list of resource to be parsed, this is a global list, which will be handled at the end of the import.protected java.lang.String
m_projectDescription
The project description.protected java.lang.String
m_projectManagers
The project managers group name.protected java.lang.String
m_projectName
The project fqn.protected java.util.List<java.lang.String>
m_projectResources
The current read project resources.protected java.lang.String
m_projectUsers
The project users group name.protected java.util.Map<java.lang.String,CmsProperty>
m_properties
The map of properties for current imported resource.protected java.lang.String
m_propertyName
The property name value.protected java.lang.String
m_propertyValue
The property value value.protected CmsUUID
m_relationId
The relation id value.protected java.lang.String
m_relationPath
The relation path value.protected java.util.List<CmsImportVersion10.RelationData>
m_relationsForResource
Holds the relation data for the resource to be imported.protected CmsRelationType
m_relationType
The relation type value.protected I_CmsReport
m_report
The report.protected CmsResource
m_resource
The current imported resource.protected CmsResourceBuilder
m_resourceBuilder
Holds the field values for the CmsResource object to be created.protected java.lang.String
m_source
The source value.protected java.lang.Throwable
m_throwable
Possible exception during xml parsing.protected int
m_totalFiles
The total number of files to import.protected java.lang.String
m_typeName
The type name.protected CmsUser
m_user
The current imported user.protected long
m_userDateCreated
The current user date created.protected java.lang.String
m_userEmail
The current user email.protected java.lang.String
m_userFirstname
The current user first name.protected int
m_userFlags
The current user flags.protected java.util.Map<java.lang.String,java.lang.Object>
m_userInfos
The additional information for the current imported user.protected java.lang.String
m_userLastname
The current user last name.protected java.lang.String
m_userName
The current user name.protected java.lang.String
m_userPassword
The current user password.protected int
m_version
The export version.static java.lang.String
N_ACCESSCONTROL_ALLOWEDPERMISSIONS
Tag for the "allowed" node, to identify allowed user permissions.static java.lang.String
N_ACCESSCONTROL_DENIEDPERMISSIONS
Tag for the "denied" node, to identify denied user permissions.static java.lang.String
N_ACCESSCONTROL_ENTRIES
Tag for the "accesscontrol" node, to identify access control entries.static java.lang.String
N_ACCESSCONTROL_ENTRY
Tag for the "accessentry" node, to identify a single access control entry.static java.lang.String
N_ACCESSCONTROL_PERMISSIONSET
Tag for the "permissionset" node, to identify a permission set.static java.lang.String
N_ACCESSCONTROL_PRINCIPAL
Tag for the "uuidprincipal" node, to identify a principal UUID.static java.lang.String
N_ACCOUNTS
Tag for the "accounts" node.static java.lang.String
N_DATECREATED
Tag for the "datecreated" node, contains the date created VFS file attribute.static java.lang.String
N_DATEEXPIRED
Tag for the "dateexpired" node, contains the expiration date VFS file attribute.static java.lang.String
N_DATELASTMODIFIED
Tag for the "datelastmodified" node, contains the date last modified VFS file attribute.static java.lang.String
N_DATERELEASED
Tag for the "datereleased" node, contains the release date VFS file attribute.static java.lang.String
N_DESCRIPTION
Tag for the "description" node, contains a users description test.static java.lang.String
N_DESTINATION
Tag for the "destination" node, contains target VFS file name.static java.lang.String
N_EMAIL
Tag for the "email" node, contains a users email.static java.lang.String
N_FILE
Tag for the "file" node, container node for all VFS resources.static java.lang.String
N_FILES
Tag for the "files" node, container node for all VFS resources.static java.lang.String
N_FIRSTNAME
Tag for the "firstname" node, contains a users first name.static java.lang.String
N_FLAGS
Tag for the "flags" node, contains the flags of a VFS resource.static java.lang.String
N_GROUP
Tag for the "group" node, contains a group name.static java.lang.String
N_GROUPS
Tag for the "groups" node, contains a users group data.static java.lang.String
N_ID
Tag for the "id" relation attribute, contains the structure id of the target resource of the relation.static java.lang.String
N_LASTNAME
Tag for the "lastname" node, contains a users last name.static java.lang.String
N_MANAGERSGROUP
Tag for the "managersgroup" node, contains name of the managers group of the project.static java.lang.String
N_NAME
Tag for the "name" node, contains the name of a property.static java.lang.String
N_ORGUNIT
Tag for the "orgunit" node, starts the organizational unit data.static java.lang.String
N_ORGUNITS
Tag for the "orgunits" node, starts the organizational unit data.static java.lang.String
N_PARENTGROUP
Tag for the "parentgroup" node, contains a groups parent group fqn.static java.lang.String
N_PASSWORD
Tag for the "password" node, contains a users encrypted password.static java.lang.String
N_PATH
Tag for the "path" relation attribute, contains the path to the target resource of the relation.static java.lang.String
N_PROJECT
Tag for the "project" node, starts the project data.static java.lang.String
N_PROJECTS
Tag for the "projects" node, starts the project data.static java.lang.String
N_PROPERTIES
Tag for the "properties" node, starts the list of properties of a VFS resource.static java.lang.String
N_PROPERTY
Tag for the "property" node, starts a property for a VFS resource.static java.lang.String
N_RELATION
Tag in theCmsImportExportManager.EXPORT_MANIFEST
for the "relation" node, starts a relation for a VFS resource.static java.lang.String
N_RELATIONS
Tag for the "relations" node, starts the list of relations of a VFS resources.static java.lang.String
N_RESOURCE
Tag for the "resource" node, contains the a organizational unit resource name.static java.lang.String
N_RESOURCES
Tag for the "resources" node, contains the list of organizational unit resources.static java.lang.String
N_SOURCE
Tag for the "source" node, contains the source path of a VFS resource in the import zip (or folder).static java.lang.String
N_TYPE
Tag for the "type" node, the resource type name of a VFS resource.static java.lang.String
N_USER
Tag for the "user" node, starts the user data.static java.lang.String
N_USERCREATED
Tag for the "usercreated" node, contains the name of the user who created the VFS resource.static java.lang.String
N_USERGROUP
Tag for the "usergroup" node, the name of a users group.static java.lang.String
N_USERGROUPS
Tag for the "usergroups" node, starts the users group data.static java.lang.String
N_USERINFO
Tag for the "userinfo" node, contains the additional user info.static java.lang.String
N_USERINFO_ENTRY
Tag for the "userinfo/entry" node, contains the additional user info entry value.static java.lang.String
N_USERLASTMODIFIED
Tag for the "userlastmodified" node, contains the name of the user who last modified the VFS resource.static java.lang.String
N_USERROLE
Tag for the "userrole" node, contains an users role name.static java.lang.String
N_USERROLES
Tag for the "userroles" node, starts the users role data.static java.lang.String
N_USERS
Tag for the "users" node, starts the list of users.static java.lang.String
N_USERSGROUP
Tag for the "usersgroup" node, contains name of the users group of the project.static java.lang.String
N_UUIDRESOURCE
Tag for the "uuidresource" node, contains a the resource UUID of a VFS resource.static java.lang.String
N_UUIDSTRUCTURE
Tag for the "uuidstructure" node, only required for backward compatibility with import version 2.static java.lang.String
N_VALUE
Tag for the "value" node, contains the value of a property.static java.lang.String
PROPERTY_ATTRIB_TYPE_SHARED
Value for the "shared" property type attribute value.
-
Constructor Summary
Constructors Constructor Description CmsImportVersion10()
Public constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addAccessControlEntry()
Adds an ACE from the current xml data.protected void
addAccountsGroupRules(org.apache.commons.digester3.Digester digester, java.lang.String xpath)
Adds the XML digester rules for groups.protected void
addAccountsOrgunitRules(org.apache.commons.digester3.Digester digester, java.lang.String xpath)
Adds the XML digester rules for organizational units.protected void
addAccountsUserRules(org.apache.commons.digester3.Digester digester, java.lang.String xpath)
Adds the XML digester rules for users.void
addContentFile(java.lang.String source, java.lang.String resourceId)
Registers a file whose contents are contained in the zip file.void
addOrgUnitResource(java.lang.String resourceName)
Adds a new resource to be associated to the current organizational unit.void
addProjectResource(java.lang.String resourceName)
Adds a new resource to be associated to the current project.protected void
addProjectRules(org.apache.commons.digester3.Digester digester, java.lang.String xpath)
Adds the XML digester rules for projects.void
addProperty()
Adds a property from the current xml data, in case the type is implicit given.void
addProperty(java.lang.String propertyType)
Adds a property from the current xml data, in case the type is explicit given.void
addRelation()
Adds a relation to be imported from the current xml data.protected void
addResourceAceRules(org.apache.commons.digester3.Digester digester, java.lang.String xpath)
Adds the XML digester rules for resource access control entries.protected void
addResourceAttributesRules(org.apache.commons.digester3.Digester digester, java.lang.String xpath)
Adds the XML digester rules for resource attributes.protected void
addResourcePropertyRules(org.apache.commons.digester3.Digester digester, java.lang.String xpath)
Adds the XML digester rules for resource properties.protected void
addResourceRelationRules(org.apache.commons.digester3.Digester digester, java.lang.String xpath)
Adds the XML digester rules for resource relations.void
addXmlDigesterRules(org.apache.commons.digester3.Digester digester)
Adds the XML digester rules for a single import file.void
addXmlPreprocessingDigesterRules(org.apache.commons.digester3.Digester digester)
Adds the XML digester rules for pre-processing a single import file.void
associateOrgUnitResources()
Associates the stored resources to the created organizational units.protected boolean
checkImmutable(java.lang.String resourceName)
Checks if the resources is in the list of immutable resources.protected java.lang.String
convertDigestEncoding(java.lang.String value)
Converts a given digest to base64 encoding.protected long
convertTimestamp(java.lang.String timestamp)
Convert a given time stamp from a String format to a long value.protected CmsResource
createResourceObjectFromFields(java.lang.String translatedName, int size)
Create a CmsResource object from the currently set field values.protected void
findContentFiles()
This method goes through the manifest, records all files from the manifest for which the content also exists in the zip file, and stores their resource ids in m_contentFiles.int
getAceFlags()
Returns the ace Flags.int
getAcePermissionsAllowed()
Returns the ace Permissions Allowed.int
getAcePermissionsDenied()
Returns the acePermissionsDenied.CmsUUID
getAcePrincipalId()
Returns the acePrincipalId.CmsObject
getCms()
Returns the cms object.long
getDateCreated()
Returns the dateCreated.long
getDateExpired()
Returns the dateExpired.long
getDateLastModified()
Returns the dateLastModified.long
getDateReleased()
Returns the dateReleased.java.lang.String
getDestination()
Returns the destination.int
getFlags()
Returns the flags.java.lang.String
getGroupDescription()
Returns the group Description.int
getGroupFlags()
Returns the group Flags.java.lang.String
getGroupName()
Returns the group Name.java.lang.String
getGroupParent()
Returns the group Parent.protected CmsImportHelper
getHelper()
Gets the import helper instance.protected java.util.List<java.lang.String>
getIgnoredProperties()
Returns the list of properties to ignore during import.protected java.util.List<java.lang.String>
getImmutableResources()
Returns the list of immutable resources.java.lang.String
getOrgUnitDescription()
Returns the organizational unit description.int
getOrgUnitFlags()
Returns the organizational unit flags.java.lang.String
getOrgUnitName()
Returns the organizational unit name.java.lang.String
getProjectDescription()
Returns the project Description.java.lang.String
getProjectManagers()
Returns the project Managers group name.java.lang.String
getProjectName()
Returns the project Name.java.lang.String
getProjectUsers()
Returns the project Users group name.java.lang.String
getPropertyName()
Returns the propertyName.java.lang.String
getPropertyValue()
Returns the propertyValue.CmsUUID
getRelationId()
Returns the relationId.java.lang.String
getRelationPath()
Returns the relationPath.CmsRelationType
getRelationType()
Returns the relationType.I_CmsReport
getReport()
Returns the report.CmsRequestContext
getRequestContext()
Gets the request context of the currently used CmsObject.CmsUUID
getResourceId()
Returns the resourceId.java.lang.String
getSource()
Returns the source.CmsUUID
getStructureId()
Returns the structureId.java.lang.Throwable
getThrowable()
Returns the throwable.I_CmsResourceType
getType()
Returns the type.CmsUUID
getUserCreated()
Returns the userCreated.long
getUserDateCreated()
Returns the user Date Created.java.lang.String
getUserEmail()
Returns the user Email address.java.lang.String
getUserFirstname()
Returns the user First name.int
getUserFlags()
Returns the user Flags.CmsUUID
getUserLastModified()
Returns the userLastModified.java.lang.String
getUserLastname()
Returns the user Last name.java.lang.String
getUserName()
Returns the user Name.java.lang.String
getUserPassword()
Returns the user Password.int
getVersion()
Returns the version of the import implementation.void
importAccessControlEntries()
Imports an ACE from the current xml data.void
importData(CmsObject cms, I_CmsReport report, CmsImportParameters parameters)
Imports the data.void
importGroup()
Import the current group from xml data.void
importOrgUnit()
Imports the current organizational unit.void
importProject()
Imports the current project.void
importRelations()
Imports all relations from the current xml data.void
importResource()
Imports a resource from the current xml data.void
importResourceAll()
Imports the resource and access control entries.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.void
importUser()
Imports a new user from the current xml data.void
importUserGroup(java.lang.String groupName)
Sets the current user as member of the given group.void
importUserInfo(java.lang.String infoName, java.lang.String infoType, java.lang.String infoValue)
Creates a new additional information entry for the current user.void
importUserRole(java.lang.String roleName)
Sets the current user as member of the given role.void
increaseCounter()
Increases the file counter.void
increaseTotalFiles()
Increases the total number of files.boolean
matches(CmsImportParameters parameters)
Checks if the file given as parameter matches this import version implementation.static void
parseLinks(CmsObject cms, java.util.List<CmsResource> parseables, I_CmsReport report)
Parses the links.void
rewriteParseables()
Rewrites all parseable files, to assure link check.void
setAceFlags(java.lang.String aceFlags)
Sets the aceFlags.void
setAcePermissionsAllowed(java.lang.String acePermissionsAllowed)
Sets the acePermissionsAllowed.void
setAcePermissionsDenied(java.lang.String acePermissionsDenied)
Sets the acePermissionsDenied.void
setAcePrincipalId(java.lang.String acePrincipalId)
Sets the acePrincipalId.void
setDateCreated(java.lang.String dateCreated)
Sets the dateCreated.void
setDateExpired(java.lang.String dateExpired)
Sets the dateExpired.void
setDateLastModified(java.lang.String dateLastModified)
Sets the dateLastModified.void
setDateReleased(java.lang.String dateReleased)
Sets the dateReleased.protected void
setDefaultsForEmptyResourceFields()
Fills the unset fields for an imported resource with default values.void
setDestination(java.lang.String destination)
Sets the destination.void
setFlags(java.lang.String flags)
Sets the flags.void
setGroupDescription(java.lang.String groupDescription)
Sets the group Description.void
setGroupFlags(java.lang.String groupFlags)
Sets the group Flags.void
setGroupName(java.lang.String groupName)
Sets the group Name.void
setGroupParent(java.lang.String groupParent)
Sets the group Parent.void
setMembership()
Sets the membership information that could not been set immediately, because of import order issues.void
setOrgUnitDescription(java.lang.String orgUnitDescription)
Sets the organizational unit description.void
setOrgUnitFlags(java.lang.String orgUnitFlags)
Sets the organizational unit flags.void
setOrgUnitName(java.lang.String orgUnitName)
Sets the organizational unit name.void
setProjectDescription(java.lang.String projectDescription)
Sets the project Description.void
setProjectManagers(java.lang.String projectManagers)
Sets the project Managers group name.void
setProjectName(java.lang.String projectName)
Sets the project Name.void
setProjectUsers(java.lang.String projectUsers)
Sets the project Users group name.void
setPropertyName(java.lang.String propertyName)
Sets the propertyName.void
setPropertyValue(java.lang.String propertyValue)
Sets the propertyValue.void
setRelationId(java.lang.String relationId)
Sets the relationId.void
setRelationPath(java.lang.String relationPath)
Sets the relationPath.void
setRelationType(java.lang.String relationType)
Sets the relationType.void
setResourceId(java.lang.String resourceId)
Sets the resourceId.void
setSource(java.lang.String source)
Sets the source.void
setStructureId(java.lang.String structureId)
Sets the structureId.void
setThrowable(java.lang.Throwable throwable)
Sets the throwable.void
setType(java.lang.String typeName)
Sets the type.void
setUserCreated(java.lang.String userCreated)
Sets the userCreated.void
setUserCreated(CmsUUID userCreated)
Sets the user Created.void
setUserDateCreated(java.lang.String userDateCreated)
Sets the user Date Created.void
setUserEmail(java.lang.String userEmail)
Sets the user email address.void
setUserFirstname(java.lang.String userFirstname)
Sets the user First name.void
setUserFlags(java.lang.String userFlags)
Sets the user Flags.void
setUserLastModified(java.lang.String userLastModified)
Sets the userLastModified.void
setUserLastModified(CmsUUID userLastModified)
Sets the user Last Modified.void
setUserLastname(java.lang.String userLastname)
Sets the user Last name.void
setUserName(java.lang.String userName)
Sets the user Name.void
setUserPassword(java.lang.String userPassword)
Sets the user Password.void
setVersion(java.lang.String version)
Sets the export version from the manifest file.
-
-
-
Field Detail
-
A_NAME
public static final java.lang.String A_NAME
Tag for the "userinfo / entry name" attribute, contains the additional user info entry name.- See Also:
- Constant Field Values
-
A_TYPE
public static final java.lang.String A_TYPE
Tag for the "type" attribute, contains the property type.- See Also:
- Constant Field Values
-
DTD_FILENAME
public static final java.lang.String DTD_FILENAME
The name of the DTD for this import version.- See Also:
- Constant Field Values
-
DTD_LOCATION
public static final java.lang.String DTD_LOCATION
The location of the OpenCms configuration DTD if the default prefix is the system ID.- See Also:
- Constant Field Values
-
IMPORT_VERSION10
public static final int IMPORT_VERSION10
The version number of this import implementation.- See Also:
- Constant Field Values
-
N_ACCESSCONTROL_ALLOWEDPERMISSIONS
public static final java.lang.String N_ACCESSCONTROL_ALLOWEDPERMISSIONS
Tag for the "allowed" node, to identify allowed user permissions.- See Also:
- Constant Field Values
-
N_ACCESSCONTROL_DENIEDPERMISSIONS
public static final java.lang.String N_ACCESSCONTROL_DENIEDPERMISSIONS
Tag for the "denied" node, to identify denied user permissions.- See Also:
- Constant Field Values
-
N_ACCESSCONTROL_ENTRIES
public static final java.lang.String N_ACCESSCONTROL_ENTRIES
Tag for the "accesscontrol" node, to identify access control entries.- See Also:
- Constant Field Values
-
N_ACCESSCONTROL_ENTRY
public static final java.lang.String N_ACCESSCONTROL_ENTRY
Tag for the "accessentry" node, to identify a single access control entry.- See Also:
- Constant Field Values
-
N_ACCESSCONTROL_PERMISSIONSET
public static final java.lang.String N_ACCESSCONTROL_PERMISSIONSET
Tag for the "permissionset" node, to identify a permission set.- See Also:
- Constant Field Values
-
N_ACCESSCONTROL_PRINCIPAL
public static final java.lang.String N_ACCESSCONTROL_PRINCIPAL
Tag for the "uuidprincipal" node, to identify a principal UUID.- See Also:
- Constant Field Values
-
N_ACCOUNTS
public static final java.lang.String N_ACCOUNTS
Tag for the "accounts" node.- See Also:
- Constant Field Values
-
N_DATECREATED
public static final java.lang.String N_DATECREATED
Tag for the "datecreated" node, contains the date created VFS file attribute.- See Also:
- Constant Field Values
-
N_DATEEXPIRED
public static final java.lang.String N_DATEEXPIRED
Tag for the "dateexpired" node, contains the expiration date VFS file attribute.- See Also:
- Constant Field Values
-
N_DATELASTMODIFIED
public static final java.lang.String N_DATELASTMODIFIED
Tag for the "datelastmodified" node, contains the date last modified VFS file attribute.- See Also:
- Constant Field Values
-
N_DATERELEASED
public static final java.lang.String N_DATERELEASED
Tag for the "datereleased" node, contains the release date VFS file attribute.- See Also:
- Constant Field Values
-
N_DESCRIPTION
public static final java.lang.String N_DESCRIPTION
Tag for the "description" node, contains a users description test.- See Also:
- Constant Field Values
-
N_DESTINATION
public static final java.lang.String N_DESTINATION
Tag for the "destination" node, contains target VFS file name.- See Also:
- Constant Field Values
-
N_EMAIL
public static final java.lang.String N_EMAIL
Tag for the "email" node, contains a users email.- See Also:
- Constant Field Values
-
N_FILE
public static final java.lang.String N_FILE
Tag for the "file" node, container node for all VFS resources.- See Also:
- Constant Field Values
-
N_FILES
public static final java.lang.String N_FILES
Tag for the "files" node, container node for all VFS resources.- See Also:
- Constant Field Values
-
N_FIRSTNAME
public static final java.lang.String N_FIRSTNAME
Tag for the "firstname" node, contains a users first name.- See Also:
- Constant Field Values
-
N_FLAGS
public static final java.lang.String N_FLAGS
Tag for the "flags" node, contains the flags of a VFS resource.- See Also:
- Constant Field Values
-
N_GROUP
public static final java.lang.String N_GROUP
Tag for the "group" node, contains a group name.- See Also:
- Constant Field Values
-
N_GROUPS
public static final java.lang.String N_GROUPS
Tag for the "groups" node, contains a users group data.- See Also:
- Constant Field Values
-
N_ID
public static final java.lang.String N_ID
Tag for the "id" relation attribute, contains the structure id of the target resource of the relation.- See Also:
- Constant Field Values
-
N_LASTNAME
public static final java.lang.String N_LASTNAME
Tag for the "lastname" node, contains a users last name.- See Also:
- Constant Field Values
-
N_MANAGERSGROUP
public static final java.lang.String N_MANAGERSGROUP
Tag for the "managersgroup" node, contains name of the managers group of the project.- See Also:
- Constant Field Values
-
N_NAME
public static final java.lang.String N_NAME
Tag for the "name" node, contains the name of a property.- See Also:
- Constant Field Values
-
N_ORGUNIT
public static final java.lang.String N_ORGUNIT
Tag for the "orgunit" node, starts the organizational unit data.- See Also:
- Constant Field Values
-
N_ORGUNITS
public static final java.lang.String N_ORGUNITS
Tag for the "orgunits" node, starts the organizational unit data.- See Also:
- Constant Field Values
-
N_PARENTGROUP
public static final java.lang.String N_PARENTGROUP
Tag for the "parentgroup" node, contains a groups parent group fqn.- See Also:
- Constant Field Values
-
N_PASSWORD
public static final java.lang.String N_PASSWORD
Tag for the "password" node, contains a users encrypted password.- See Also:
- Constant Field Values
-
N_PATH
public static final java.lang.String N_PATH
Tag for the "path" relation attribute, contains the path to the target resource of the relation.- See Also:
- Constant Field Values
-
N_PROJECT
public static final java.lang.String N_PROJECT
Tag for the "project" node, starts the project data.- See Also:
- Constant Field Values
-
N_PROJECTS
public static final java.lang.String N_PROJECTS
Tag for the "projects" node, starts the project data.- See Also:
- Constant Field Values
-
N_PROPERTIES
public static final java.lang.String N_PROPERTIES
Tag for the "properties" node, starts the list of properties of a VFS resource.- See Also:
- Constant Field Values
-
N_PROPERTY
public static final java.lang.String N_PROPERTY
Tag for the "property" node, starts a property for a VFS resource.- See Also:
- Constant Field Values
-
N_RELATION
public static final java.lang.String N_RELATION
Tag in theCmsImportExportManager.EXPORT_MANIFEST
for the "relation" node, starts a relation for a VFS resource.- See Also:
- Constant Field Values
-
N_RELATIONS
public static final java.lang.String N_RELATIONS
Tag for the "relations" node, starts the list of relations of a VFS resources.- See Also:
- Constant Field Values
-
N_RESOURCE
public static final java.lang.String N_RESOURCE
Tag for the "resource" node, contains the a organizational unit resource name.- See Also:
- Constant Field Values
-
N_RESOURCES
public static final java.lang.String N_RESOURCES
Tag for the "resources" node, contains the list of organizational unit resources.- See Also:
- Constant Field Values
-
N_SOURCE
public static final java.lang.String N_SOURCE
Tag for the "source" node, contains the source path of a VFS resource in the import zip (or folder).- See Also:
- Constant Field Values
-
N_TYPE
public static final java.lang.String N_TYPE
Tag for the "type" node, the resource type name of a VFS resource.- See Also:
- Constant Field Values
-
N_USER
public static final java.lang.String N_USER
Tag for the "user" node, starts the user data.- See Also:
- Constant Field Values
-
N_USERCREATED
public static final java.lang.String N_USERCREATED
Tag for the "usercreated" node, contains the name of the user who created the VFS resource.- See Also:
- Constant Field Values
-
N_USERGROUP
public static final java.lang.String N_USERGROUP
Tag for the "usergroup" node, the name of a users group.- See Also:
- Constant Field Values
-
N_USERGROUPS
public static final java.lang.String N_USERGROUPS
Tag for the "usergroups" node, starts the users group data.- See Also:
- Constant Field Values
-
N_USERINFO
public static final java.lang.String N_USERINFO
Tag for the "userinfo" node, contains the additional user info.- See Also:
- Constant Field Values
-
N_USERINFO_ENTRY
public static final java.lang.String N_USERINFO_ENTRY
Tag for the "userinfo/entry" node, contains the additional user info entry value.- See Also:
- Constant Field Values
-
N_USERLASTMODIFIED
public static final java.lang.String N_USERLASTMODIFIED
Tag for the "userlastmodified" node, contains the name of the user who last modified the VFS resource.- See Also:
- Constant Field Values
-
N_USERROLE
public static final java.lang.String N_USERROLE
Tag for the "userrole" node, contains an users role name.- See Also:
- Constant Field Values
-
N_USERROLES
public static final java.lang.String N_USERROLES
Tag for the "userroles" node, starts the users role data.- See Also:
- Constant Field Values
-
N_USERS
public static final java.lang.String N_USERS
Tag for the "users" node, starts the list of users.- See Also:
- Constant Field Values
-
N_USERSGROUP
public static final java.lang.String N_USERSGROUP
Tag for the "usersgroup" node, contains name of the users group of the project.- See Also:
- Constant Field Values
-
N_UUIDRESOURCE
public static final java.lang.String N_UUIDRESOURCE
Tag for the "uuidresource" node, contains a the resource UUID of a VFS resource.- See Also:
- Constant Field Values
-
N_UUIDSTRUCTURE
public static final java.lang.String N_UUIDSTRUCTURE
Tag for the "uuidstructure" node, only required for backward compatibility with import version 2.- See Also:
- Constant Field Values
-
N_VALUE
public static final java.lang.String N_VALUE
Tag for the "value" node, contains the value of a property.- See Also:
- Constant Field Values
-
PROPERTY_ATTRIB_TYPE_SHARED
public static final java.lang.String PROPERTY_ATTRIB_TYPE_SHARED
Value for the "shared" property type attribute value.- See Also:
- Constant Field Values
-
DATE_CREATED_UNSPECIFIED
protected static final long DATE_CREATED_UNSPECIFIED
Constant for the unspecified creation date.- See Also:
- Constant Field Values
-
DATE_LAST_MODIFICATION_FILETIME
protected static final long DATE_LAST_MODIFICATION_FILETIME
Constant for using file time as last modification date on file import.- See Also:
- Constant Field Values
-
DATE_LAST_MODIFICATION_UNSPECIFIED
protected static final long DATE_LAST_MODIFICATION_UNSPECIFIED
Constant for an unspecified last modification date.- See Also:
- Constant Field Values
-
m_aceFlags
protected int m_aceFlags
The ACE flags value.
-
m_acePermissionsAllowed
protected int m_acePermissionsAllowed
The ACE allowed permissions value.
-
m_acePermissionsDenied
protected int m_acePermissionsDenied
The ACE denied permissions value.
-
m_acePrincipalId
protected CmsUUID m_acePrincipalId
The ACE principal id value.
-
m_aces
protected java.util.List<CmsAccessControlEntry> m_aces
The list of ACEs for the current imported resource.
-
m_contentFiles
protected java.util.Set<CmsUUID> m_contentFiles
The set of resource ids of files which actually are contained in the zip file.
-
m_destination
protected java.lang.String m_destination
The destination value.
-
m_fileCounter
protected int m_fileCounter
The current file counter.
-
m_groupDescription
protected java.lang.String m_groupDescription
The description of the current group to import.
-
m_groupFlags
protected int m_groupFlags
The flags of the current group to import.
-
m_groupName
protected java.lang.String m_groupName
The name of the current group to import.
-
m_groupParent
protected java.lang.String m_groupParent
The parent of the current group to import.
-
m_groupParents
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> m_groupParents
Map of all parent groups that could not be set immediately, because of the import order.
-
m_hasDateLastModified
protected boolean m_hasDateLastModified
True if a modification date has been set.
-
m_hasStructureId
protected boolean m_hasStructureId
True if a structure id has been set.
-
m_helper
protected CmsImportHelper m_helper
The import helper.
-
m_ignoredProperties
protected java.util.List<java.lang.String> m_ignoredProperties
List of ignored properties.
-
m_immutables
protected java.util.List<java.lang.String> m_immutables
List of immutable resources.
-
m_importACEs
protected boolean m_importACEs
The flag to import ACEs.
-
m_membership
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>> m_membership
The membership structure.
-
m_orgUnit
protected CmsOrganizationalUnit m_orgUnit
The current imported organizational unit.
-
m_orgUnitDescription
protected java.lang.String m_orgUnitDescription
The organizational unit description.
-
m_orgUnitFlags
protected int m_orgUnitFlags
The organizational unit flags.
-
m_orgUnitName
protected java.lang.String m_orgUnitName
The organizational unit fqn.
-
m_orgUnitResources
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> m_orgUnitResources
The map of organizational unit resources, this is a global field that will be use at the end of the import.
-
m_parameters
protected CmsImportParameters m_parameters
The import parameters to use.
-
m_parseables
protected java.util.List<CmsResource> m_parseables
The list of resource to be parsed, this is a global list, which will be handled at the end of the import.
-
m_projectDescription
protected java.lang.String m_projectDescription
The project description.
-
m_projectManagers
protected java.lang.String m_projectManagers
The project managers group name.
-
m_projectName
protected java.lang.String m_projectName
The project fqn.
-
m_projectResources
protected java.util.List<java.lang.String> m_projectResources
The current read project resources.
-
m_projectUsers
protected java.lang.String m_projectUsers
The project users group name.
-
m_properties
protected java.util.Map<java.lang.String,CmsProperty> m_properties
The map of properties for current imported resource.
-
m_propertyName
protected java.lang.String m_propertyName
The property name value.
-
m_propertyValue
protected java.lang.String m_propertyValue
The property value value.
-
m_relationId
protected CmsUUID m_relationId
The relation id value.
-
m_relationPath
protected java.lang.String m_relationPath
The relation path value.
-
m_relationsForResource
protected java.util.List<CmsImportVersion10.RelationData> m_relationsForResource
Holds the relation data for the resource to be imported.
-
m_relationType
protected CmsRelationType m_relationType
The relation type value.
-
m_report
protected I_CmsReport m_report
The report.
-
m_resource
protected CmsResource m_resource
The current imported resource.
-
m_resourceBuilder
protected CmsResourceBuilder m_resourceBuilder
Holds the field values for the CmsResource object to be created.
-
m_source
protected java.lang.String m_source
The source value.
-
m_throwable
protected java.lang.Throwable m_throwable
Possible exception during xml parsing.
-
m_totalFiles
protected int m_totalFiles
The total number of files to import.
-
m_typeName
protected java.lang.String m_typeName
The type name.
-
m_userDateCreated
protected long m_userDateCreated
The current user date created.
-
m_userEmail
protected java.lang.String m_userEmail
The current user email.
-
m_userFirstname
protected java.lang.String m_userFirstname
The current user first name.
-
m_userFlags
protected int m_userFlags
The current user flags.
-
m_userInfos
protected java.util.Map<java.lang.String,java.lang.Object> m_userInfos
The additional information for the current imported user.
-
m_userLastname
protected java.lang.String m_userLastname
The current user last name.
-
m_userName
protected java.lang.String m_userName
The current user name.
-
m_userPassword
protected java.lang.String m_userPassword
The current user password.
-
m_version
protected int m_version
The export version.
-
-
Constructor Detail
-
CmsImportVersion10
public CmsImportVersion10()
Public constructor.
-
-
Method Detail
-
parseLinks
public static void parseLinks(CmsObject cms, java.util.List<CmsResource> parseables, I_CmsReport report)
Parses the links.- Parameters:
cms
- the CMS context to useparseables
- the list of resources for which to parse the linksreport
- the report
-
addAccessControlEntry
public void addAccessControlEntry()
Adds an ACE from the current xml data.- See Also:
addResourceAceRules(Digester, String)
-
addContentFile
public void addContentFile(java.lang.String source, java.lang.String resourceId)
Registers a file whose contents are contained in the zip file.- Parameters:
source
- the path in the zip fileresourceId
- the resource id
-
addOrgUnitResource
public void addOrgUnitResource(java.lang.String resourceName)
Adds a new resource to be associated to the current organizational unit.- Parameters:
resourceName
- the resource name to add
-
addProjectResource
public void addProjectResource(java.lang.String resourceName)
Adds a new resource to be associated to the current project.- Parameters:
resourceName
- the resource name to add
-
addProperty
public void addProperty()
Adds a property from the current xml data, in case the type is implicit given.
-
addProperty
public void addProperty(java.lang.String propertyType)
Adds a property from the current xml data, in case the type is explicit given.- Parameters:
propertyType
- the type of the property to be added- See Also:
addResourcePropertyRules(Digester, String)
-
addRelation
public void addRelation()
Adds a relation to be imported from the current xml data.
-
addXmlDigesterRules
public void addXmlDigesterRules(org.apache.commons.digester3.Digester digester)
Adds the XML digester rules for a single import file.- Parameters:
digester
- the digester to add the rules to
-
addXmlPreprocessingDigesterRules
public void addXmlPreprocessingDigesterRules(org.apache.commons.digester3.Digester digester)
Adds the XML digester rules for pre-processing a single import file.- Parameters:
digester
- the digester to add the rules to
-
associateOrgUnitResources
public void associateOrgUnitResources()
Associates the stored resources to the created organizational units.This is a global process that occurs only once at the end of the import, after all resources have been imported, to make sure that the resources of the organizational units are available.
-
getAceFlags
public int getAceFlags()
Returns the ace Flags.- Returns:
- the ace Flags
- See Also:
N_FLAGS
,addResourceAceRules(Digester, String)
-
getAcePermissionsAllowed
public int getAcePermissionsAllowed()
Returns the ace Permissions Allowed.- Returns:
- the ace Permissions Allowed
- See Also:
N_ACCESSCONTROL_ALLOWEDPERMISSIONS
,addResourceAceRules(Digester, String)
-
getAcePermissionsDenied
public int getAcePermissionsDenied()
Returns the acePermissionsDenied.- Returns:
- the acePermissionsDenied
- See Also:
N_ACCESSCONTROL_DENIEDPERMISSIONS
,addResourceAceRules(Digester, String)
-
getAcePrincipalId
public CmsUUID getAcePrincipalId()
Returns the acePrincipalId.- Returns:
- the acePrincipalId
- See Also:
N_ACCESSCONTROL_PRINCIPAL
,addResourceAceRules(Digester, String)
-
getDateCreated
public long getDateCreated()
Returns the dateCreated.- Returns:
- the dateCreated
- See Also:
N_DATECREATED
,addResourceAttributesRules(Digester, String)
-
getDateExpired
public long getDateExpired()
Returns the dateExpired.- Returns:
- the dateExpired
- See Also:
N_DATEEXPIRED
,addResourceAttributesRules(Digester, String)
-
getDateLastModified
public long getDateLastModified()
Returns the dateLastModified.- Returns:
- the dateLastModified
- See Also:
N_DATELASTMODIFIED
,addResourceAttributesRules(Digester, String)
-
getDateReleased
public long getDateReleased()
Returns the dateReleased.- Returns:
- the dateReleased
- See Also:
N_DATERELEASED
,addResourceAttributesRules(Digester, String)
-
getDestination
public java.lang.String getDestination()
Returns the destination.- Returns:
- the destination
- See Also:
N_DESTINATION
,addResourceAttributesRules(Digester, String)
-
getFlags
public int getFlags()
Returns the flags.- Returns:
- the flags
- See Also:
N_FLAGS
,addResourceAttributesRules(Digester, String)
-
getGroupDescription
public java.lang.String getGroupDescription()
Returns the group Description.- Returns:
- the group Description
-
getGroupFlags
public int getGroupFlags()
Returns the group Flags.- Returns:
- the group Flags
-
getGroupName
public java.lang.String getGroupName()
Returns the group Name.- Returns:
- the group Name
-
getGroupParent
public java.lang.String getGroupParent()
Returns the group Parent.- Returns:
- the group Parent
-
getOrgUnitDescription
public java.lang.String getOrgUnitDescription()
Returns the organizational unit description.- Returns:
- the organizational unit description
-
getOrgUnitFlags
public int getOrgUnitFlags()
Returns the organizational unit flags.- Returns:
- the organizational unit flags
-
getOrgUnitName
public java.lang.String getOrgUnitName()
Returns the organizational unit name.- Returns:
- the organizational unit name
-
getProjectDescription
public java.lang.String getProjectDescription()
Returns the project Description.- Returns:
- the project Description
-
getProjectManagers
public java.lang.String getProjectManagers()
Returns the project Managers group name.- Returns:
- the project Managers group name
-
getProjectName
public java.lang.String getProjectName()
Returns the project Name.- Returns:
- the project Name
-
getProjectUsers
public java.lang.String getProjectUsers()
Returns the project Users group name.- Returns:
- the project Users group name
-
getPropertyName
public java.lang.String getPropertyName()
Returns the propertyName.- Returns:
- the propertyName
- See Also:
N_NAME
,addResourcePropertyRules(Digester, String)
-
getPropertyValue
public java.lang.String getPropertyValue()
Returns the propertyValue.- Returns:
- the propertyValue
- See Also:
N_VALUE
,addResourcePropertyRules(Digester, String)
-
getRelationId
public CmsUUID getRelationId()
Returns the relationId.- Returns:
- the relationId
- See Also:
N_ID
,addResourceRelationRules(Digester, String)
-
getRelationPath
public java.lang.String getRelationPath()
Returns the relationPath.- Returns:
- the relationPath
- See Also:
N_PATH
,addResourceRelationRules(Digester, String)
-
getRelationType
public CmsRelationType getRelationType()
Returns the relationType.- Returns:
- the relationType
- See Also:
N_TYPE
,addResourceRelationRules(Digester, String)
-
getReport
public I_CmsReport getReport()
Returns the report.- Returns:
- the report
-
getRequestContext
public CmsRequestContext getRequestContext()
Gets the request context of the currently used CmsObject.- Returns:
- the current request context
-
getResourceId
public CmsUUID getResourceId()
Returns the resourceId.- Returns:
- the resourceId
- See Also:
N_UUIDRESOURCE
,addResourceAttributesRules(Digester, String)
-
getSource
public java.lang.String getSource()
Returns the source.- Returns:
- the source
- See Also:
N_SOURCE
,addResourceAttributesRules(Digester, String)
-
getStructureId
public CmsUUID getStructureId()
Returns the structureId.- Returns:
- the structureId
- See Also:
N_UUIDSTRUCTURE
,addResourceAttributesRules(Digester, String)
-
getThrowable
public java.lang.Throwable getThrowable()
Returns the throwable.- Returns:
- the throwable
-
getType
public I_CmsResourceType getType()
Returns the type.- Returns:
- the type
- See Also:
N_TYPE
,addResourceAttributesRules(Digester, String)
-
getUserCreated
public CmsUUID getUserCreated()
Returns the userCreated.- Returns:
- the userCreated
- See Also:
N_USERCREATED
,addResourceAttributesRules(Digester, String)
-
getUserDateCreated
public long getUserDateCreated()
Returns the user Date Created.- Returns:
- the user Date Created
-
getUserEmail
public java.lang.String getUserEmail()
Returns the user Email address.- Returns:
- the user Email address
-
getUserFirstname
public java.lang.String getUserFirstname()
Returns the user First name.- Returns:
- the user First name
-
getUserFlags
public int getUserFlags()
Returns the user Flags.- Returns:
- the user Flags
-
getUserLastModified
public CmsUUID getUserLastModified()
Returns the userLastModified.- Returns:
- the userLastModified
- See Also:
N_USERLASTMODIFIED
,addResourceAttributesRules(Digester, String)
-
getUserLastname
public java.lang.String getUserLastname()
Returns the user Last name.- Returns:
- the user Last name
-
getUserName
public java.lang.String getUserName()
Returns the user Name.- Returns:
- the user Name
-
getUserPassword
public java.lang.String getUserPassword()
Returns the user Password.- Returns:
- the user Password
-
getVersion
public int getVersion()
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
- Specified by:
getVersion
in interfaceI_CmsImport
- Returns:
- the version of the import implementation
- See Also:
I_CmsImport.getVersion()
-
importAccessControlEntries
public void importAccessControlEntries()
Imports an ACE from the current xml data.- See Also:
addResourceAceRules(Digester, String)
-
importData
public void importData(CmsObject cms, I_CmsReport report, CmsImportParameters parameters)
Description copied from interface:I_CmsImport
Imports the data.- Specified by:
importData
in interfaceI_CmsImport
- Parameters:
cms
- the current users OpenCms contextreport
- a report object to output the progress information toparameters
- the parameters to use during the import- See Also:
I_CmsImport.importData(CmsObject, I_CmsReport, CmsImportParameters)
-
importGroup
public void importGroup()
Import the current group from xml data.
-
importOrgUnit
public void importOrgUnit()
Imports the current organizational unit.
-
importProject
public void importProject()
Imports the current project.
-
importRelations
public void importRelations()
Imports all relations from the current xml data.This is a global process that occurs only once at the end of the import, after all resources have been imported, to make sure that both resources of the relations are available.
-
importResource
public void importResource()
Imports a resource from the current xml data.
-
importResourceAll
public void importResourceAll()
Imports the resource and access control entries.
-
importResources
@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)
Deprecated.Description copied from interface:I_CmsImport
Imports the resources.- Specified by:
importResources
in interfaceI_CmsImport
- 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- See Also:
I_CmsImport.importResources(org.opencms.file.CmsObject, java.lang.String, org.opencms.report.I_CmsReport, java.io.File, java.util.zip.ZipFile, org.dom4j.Document)
-
importUser
public void importUser()
Imports a new user from the current xml data.
-
importUserGroup
public void importUserGroup(java.lang.String groupName)
Sets the current user as member of the given group.It can happen that the organizational unit has not been imported jet, in this case, the data is kept for later.
- Parameters:
groupName
- the name of the group to set- See Also:
setMembership()
-
importUserInfo
public void importUserInfo(java.lang.String infoName, java.lang.String infoType, java.lang.String infoValue)
Creates a new additional information entry for the current user.- Parameters:
infoName
- the name of the additional information entryinfoType
- the type of the additional information entryinfoValue
- the value of the additional information entry
-
importUserRole
public void importUserRole(java.lang.String roleName)
Sets the current user as member of the given role.It can happen that the organizational unit has not been imported jet, in this case, the data is kept for later.
- Parameters:
roleName
- the name of the role to set- See Also:
setMembership()
-
increaseCounter
public void increaseCounter()
Increases the file counter.
-
increaseTotalFiles
public void increaseTotalFiles()
Increases the total number of files.
-
matches
public boolean matches(CmsImportParameters parameters) throws CmsImportExportException
Description copied from interface:I_CmsImport
Checks if the file given as parameter matches this import version implementation.- Specified by:
matches
in interfaceI_CmsImport
- Parameters:
parameters
- the parameters to use during matching- Returns:
true
if the file can be imported by this import version implementation- Throws:
CmsImportExportException
- if something goes wrong- See Also:
I_CmsImport.matches(org.opencms.importexport.CmsImportParameters)
-
rewriteParseables
public void rewriteParseables()
Rewrites all parseable files, to assure link check.This is a global process, that is executed only once at the end of the import to be sure that all link targets are available.
- See Also:
addXmlDigesterRules(Digester)
-
setAceFlags
public void setAceFlags(java.lang.String aceFlags)
Sets the aceFlags.- Parameters:
aceFlags
- the aceFlags to set- See Also:
N_FLAGS
,addResourceAceRules(Digester, String)
-
setAcePermissionsAllowed
public void setAcePermissionsAllowed(java.lang.String acePermissionsAllowed)
Sets the acePermissionsAllowed.- Parameters:
acePermissionsAllowed
- the acePermissionsAllowed to set- See Also:
N_ACCESSCONTROL_ALLOWEDPERMISSIONS
,addResourceAceRules(Digester, String)
-
setAcePermissionsDenied
public void setAcePermissionsDenied(java.lang.String acePermissionsDenied)
Sets the acePermissionsDenied.- Parameters:
acePermissionsDenied
- the acePermissionsDenied to set- See Also:
N_ACCESSCONTROL_DENIEDPERMISSIONS
,addResourceAceRules(Digester, String)
-
setAcePrincipalId
public void setAcePrincipalId(java.lang.String acePrincipalId)
Sets the acePrincipalId.- Parameters:
acePrincipalId
- the acePrincipalId to set- See Also:
N_ACCESSCONTROL_PRINCIPAL
,addResourceAceRules(Digester, String)
-
setDateCreated
public void setDateCreated(java.lang.String dateCreated)
Sets the dateCreated.- Parameters:
dateCreated
- the dateCreated to set- See Also:
N_DATECREATED
,addResourceAttributesRules(Digester, String)
-
setDateExpired
public void setDateExpired(java.lang.String dateExpired)
Sets the dateExpired.- Parameters:
dateExpired
- the dateExpired to set- See Also:
N_DATEEXPIRED
,addResourceAttributesRules(Digester, String)
-
setDateLastModified
public void setDateLastModified(java.lang.String dateLastModified)
Sets the dateLastModified.- Parameters:
dateLastModified
- the dateLastModified to set- See Also:
N_DATELASTMODIFIED
,addResourceAttributesRules(Digester, String)
-
setDateReleased
public void setDateReleased(java.lang.String dateReleased)
Sets the dateReleased.- Parameters:
dateReleased
- the dateReleased to set- See Also:
N_DATERELEASED
,addResourceAttributesRules(Digester, String)
-
setDestination
public void setDestination(java.lang.String destination)
Sets the destination.- Parameters:
destination
- the destination to set- See Also:
N_DESTINATION
,addResourceAttributesRules(Digester, String)
-
setFlags
public void setFlags(java.lang.String flags)
Sets the flags.- Parameters:
flags
- the flags to set- See Also:
N_FLAGS
,addResourceAttributesRules(Digester, String)
-
setGroupDescription
public void setGroupDescription(java.lang.String groupDescription)
Sets the group Description.- Parameters:
groupDescription
- the description to set
-
setGroupFlags
public void setGroupFlags(java.lang.String groupFlags)
Sets the group Flags.- Parameters:
groupFlags
- the flags to set
-
setGroupName
public void setGroupName(java.lang.String groupName)
Sets the group Name.- Parameters:
groupName
- the name to set
-
setGroupParent
public void setGroupParent(java.lang.String groupParent)
Sets the group Parent.- Parameters:
groupParent
- the group Parent to set
-
setMembership
public void setMembership()
Sets the membership information that could not been set immediately, because of import order issues.
-
setOrgUnitDescription
public void setOrgUnitDescription(java.lang.String orgUnitDescription)
Sets the organizational unit description.- Parameters:
orgUnitDescription
- the description to set
-
setOrgUnitFlags
public void setOrgUnitFlags(java.lang.String orgUnitFlags)
Sets the organizational unit flags.- Parameters:
orgUnitFlags
- the flags to set
-
setOrgUnitName
public void setOrgUnitName(java.lang.String orgUnitName)
Sets the organizational unit name.- Parameters:
orgUnitName
- the name to set
-
setProjectDescription
public void setProjectDescription(java.lang.String projectDescription)
Sets the project Description.- Parameters:
projectDescription
- the description to set
-
setProjectManagers
public void setProjectManagers(java.lang.String projectManagers)
Sets the project Managers group name.- Parameters:
projectManagers
- the managers group to set
-
setProjectName
public void setProjectName(java.lang.String projectName)
Sets the project Name.- Parameters:
projectName
- the name to set
-
setProjectUsers
public void setProjectUsers(java.lang.String projectUsers)
Sets the project Users group name.- Parameters:
projectUsers
- the Users group to set
-
setPropertyName
public void setPropertyName(java.lang.String propertyName)
Sets the propertyName.- Parameters:
propertyName
- the propertyName to set- See Also:
N_NAME
,addResourcePropertyRules(Digester, String)
-
setPropertyValue
public void setPropertyValue(java.lang.String propertyValue)
Sets the propertyValue.- Parameters:
propertyValue
- the propertyValue to set- See Also:
N_VALUE
,addResourcePropertyRules(Digester, String)
-
setRelationId
public void setRelationId(java.lang.String relationId)
Sets the relationId.- Parameters:
relationId
- the relationId to set- See Also:
N_ID
,addResourceRelationRules(Digester, String)
-
setRelationPath
public void setRelationPath(java.lang.String relationPath)
Sets the relationPath.- Parameters:
relationPath
- the relationPath to set- See Also:
N_PATH
,addResourceRelationRules(Digester, String)
-
setRelationType
public void setRelationType(java.lang.String relationType)
Sets the relationType.- Parameters:
relationType
- the relationType to set- See Also:
N_TYPE
,addResourceRelationRules(Digester, String)
-
setResourceId
public void setResourceId(java.lang.String resourceId)
Sets the resourceId.- Parameters:
resourceId
- the resourceId to set- See Also:
N_UUIDRESOURCE
,addResourceAttributesRules(Digester, String)
-
setSource
public void setSource(java.lang.String source)
Sets the source.- Parameters:
source
- the source to set- See Also:
N_SOURCE
,addResourceAttributesRules(Digester, String)
-
setStructureId
public void setStructureId(java.lang.String structureId)
Sets the structureId.- Parameters:
structureId
- the structureId to set- See Also:
N_UUIDSTRUCTURE
,addResourceAttributesRules(Digester, String)
-
setThrowable
public void setThrowable(java.lang.Throwable throwable)
Sets the throwable.- Parameters:
throwable
- the throwable to set
-
setType
public void setType(java.lang.String typeName)
Sets the type.- Parameters:
typeName
- the type to set- See Also:
N_TYPE
,addResourceAttributesRules(Digester, String)
-
setUserCreated
public void setUserCreated(CmsUUID userCreated)
Sets the user Created.- Parameters:
userCreated
- the user Created to set
-
setUserCreated
public void setUserCreated(java.lang.String userCreated)
Sets the userCreated.- Parameters:
userCreated
- the userCreated to set- See Also:
N_USERCREATED
,addResourceAttributesRules(Digester, String)
-
setUserDateCreated
public void setUserDateCreated(java.lang.String userDateCreated)
Sets the user Date Created.- Parameters:
userDateCreated
- the date to set
-
setUserEmail
public void setUserEmail(java.lang.String userEmail)
Sets the user email address.- Parameters:
userEmail
- the email address to set
-
setUserFirstname
public void setUserFirstname(java.lang.String userFirstname)
Sets the user First name.- Parameters:
userFirstname
- the first name to set
-
setUserFlags
public void setUserFlags(java.lang.String userFlags)
Sets the user Flags.- Parameters:
userFlags
- the flags to set
-
setUserLastModified
public void setUserLastModified(CmsUUID userLastModified)
Sets the user Last Modified.- Parameters:
userLastModified
- the user Last Modified to set
-
setUserLastModified
public void setUserLastModified(java.lang.String userLastModified)
Sets the userLastModified.- Parameters:
userLastModified
- the userLastModified to set- See Also:
N_USERLASTMODIFIED
,addResourceAttributesRules(Digester, String)
-
setUserLastname
public void setUserLastname(java.lang.String userLastname)
Sets the user Last name.- Parameters:
userLastname
- the last name to set
-
setUserName
public void setUserName(java.lang.String userName)
Sets the user Name.- Parameters:
userName
- the name to set
-
setUserPassword
public void setUserPassword(java.lang.String userPassword)
Sets the user Password.- Parameters:
userPassword
- the password to set
-
setVersion
public void setVersion(java.lang.String version)
Sets the export version from the manifest file.- Parameters:
version
- the export version to set
-
addAccountsGroupRules
protected void addAccountsGroupRules(org.apache.commons.digester3.Digester digester, java.lang.String xpath)
Adds the XML digester rules for groups.- Parameters:
digester
- the digester to add the rules toxpath
- the base xpath for the rules
-
addAccountsOrgunitRules
protected void addAccountsOrgunitRules(org.apache.commons.digester3.Digester digester, java.lang.String xpath)
Adds the XML digester rules for organizational units.- Parameters:
digester
- the digester to add the rules toxpath
- the base xpath for the rules
-
addAccountsUserRules
protected void addAccountsUserRules(org.apache.commons.digester3.Digester digester, java.lang.String xpath)
Adds the XML digester rules for users.- Parameters:
digester
- the digester to add the rules toxpath
- the base xpath for the rules
-
addProjectRules
protected void addProjectRules(org.apache.commons.digester3.Digester digester, java.lang.String xpath)
Adds the XML digester rules for projects.- Parameters:
digester
- the digester to add the rules toxpath
- the base xpath for the rules
-
addResourceAceRules
protected void addResourceAceRules(org.apache.commons.digester3.Digester digester, java.lang.String xpath)
Adds the XML digester rules for resource access control entries.- Parameters:
digester
- the digester to add the rules toxpath
- the base xpath for the rules
-
addResourceAttributesRules
protected void addResourceAttributesRules(org.apache.commons.digester3.Digester digester, java.lang.String xpath)
Adds the XML digester rules for resource attributes.- Parameters:
digester
- the digester to add the rules toxpath
- the base xpath for the rules
-
addResourcePropertyRules
protected void addResourcePropertyRules(org.apache.commons.digester3.Digester digester, java.lang.String xpath)
Adds the XML digester rules for resource properties.- Parameters:
digester
- the digester to add the rules toxpath
- the base xpath for the rules
-
addResourceRelationRules
protected void addResourceRelationRules(org.apache.commons.digester3.Digester digester, java.lang.String xpath)
Adds the XML digester rules for resource relations.- Parameters:
digester
- the digester to add the rules toxpath
- the base xpath for the rules
-
checkImmutable
protected boolean checkImmutable(java.lang.String resourceName)
Checks if the resources is in the list of immutable resources.- Parameters:
resourceName
- the name of the resource- Returns:
true
orfalse
-
convertDigestEncoding
protected java.lang.String convertDigestEncoding(java.lang.String value)
Converts a given digest to base64 encoding.- Parameters:
value
- the digest value in the legacy encoding- Returns:
- the digest in the new encoding
-
convertTimestamp
protected long convertTimestamp(java.lang.String timestamp)
Convert a given time stamp from a String format to a long value.The time stamp is either the string representation of a long value (old export format) or a user-readable string format.
- Parameters:
timestamp
- time stamp to convert- Returns:
- long value of the time stamp
-
createResourceObjectFromFields
protected CmsResource createResourceObjectFromFields(java.lang.String translatedName, int size)
Create a CmsResource object from the currently set field values.- Parameters:
translatedName
- the resource namesize
- the size- Returns:
- the new CmsResource object
-
findContentFiles
protected void findContentFiles() throws CmsImportExportException, java.io.IOException, org.xml.sax.SAXException
This method goes through the manifest, records all files from the manifest for which the content also exists in the zip file, and stores their resource ids in m_contentFiles.- Throws:
CmsImportExportException
- thrown when the manifest.xml can't be opened as stream.java.io.IOException
- thrown if the manifest.xml stream causes problems during parsing and/or closing.org.xml.sax.SAXException
- thrown if parsing the manifest.xml fails
-
getHelper
protected CmsImportHelper getHelper()
Gets the import helper instance.- Returns:
- the import helper
-
getIgnoredProperties
protected java.util.List<java.lang.String> getIgnoredProperties()
Returns the list of properties to ignore during import.- Returns:
- the list of properties to ignore during import
-
getImmutableResources
protected java.util.List<java.lang.String> getImmutableResources()
Returns the list of immutable resources.- Returns:
- the list of immutable resources
-
setDefaultsForEmptyResourceFields
protected void setDefaultsForEmptyResourceFields() throws CmsImportExportException
Fills the unset fields for an imported resource with default values.- Throws:
CmsImportExportException
- if something goes wrong
-
-