Class CmsImportVersion5

  • All Implemented Interfaces:
    Direct Known Subclasses:

    public class CmsImportVersion5
    extends A_CmsImport
    this import class is no longer in use and should only be used to import old export files
    Implementation of the OpenCms Import Interface (I_CmsImport) for the import version 5.

    This import format is used in OpenCms since 6.3.0.

    See Also:
    • Field Detail

      • m_importedRelations

        protected java.util.Map<java.lang.String,​java.util.List<CmsRelation>> m_importedRelations
        Stores all relations defined in the import file to be created after all resources has been imported.
      • m_keepPermissions

        protected boolean m_keepPermissions
        The keep permissions flag.
    • Constructor Detail

      • CmsImportVersion5

        public CmsImportVersion5()
        Creates a new CmsImportVerion7 object.

    • Method Detail

      • 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
        the version of the import implementation
        See Also:
      • 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.

        timestamp - time stamp to convert
        long value of the time stamp
      • importRelations

        protected void importRelations()
        Imports the relations.

      • importRelations

        protected void importRelations​(CmsResource resource,
                                       org.dom4j.Element parentElement)
        Reads all the relations of the resource from the manifest.xml file and adds them to the according resource.

        resource - the resource to import the relations for
        parentElement - the current element
      • importResource

        protected CmsResource importResource​(java.lang.String source,
                                             java.lang.String destination,
                                             I_CmsResourceType type,
                                             java.lang.String uuidstructure,
                                             java.lang.String uuidresource,
                                             long datelastmodified,
                                             java.lang.String userlastmodified,
                                             long datecreated,
                                             java.lang.String usercreated,
                                             long datereleased,
                                             long dateexpired,
                                             java.lang.String flags,
                                             java.util.List<CmsProperty> properties)
        Imports a resource (file or folder) into the cms.

        source - the path to the source-file
        destination - the path to the destination-file in the cms
        type - the resource type name of the file
        uuidstructure - the structure uuid of the resource
        uuidresource - the resource uuid of the resource
        datelastmodified - the last modification date of the resource
        userlastmodified - the user who made the last modifications to the resource
        datecreated - the creation date of the resource
        usercreated - the user who created
        datereleased - the release date of the resource
        dateexpired - the expire date of the resource
        flags - the flags of the resource
        properties - a list with properties for this resource
        imported resource
      • rewriteParseables

        protected void rewriteParseables()
        Rewrites all parseable files, to assure link check.