Class CmsImportVersion2

  • All Implemented Interfaces:
    I_CmsImport

    @Deprecated
    public class CmsImportVersion2
    extends A_CmsImport
    Deprecated.
    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 2.

    This import format was used in OpenCms 5.0.0 - 5.1.2.

    Since:
    6.0.0
    See Also:
    A_CmsImport
    • Field Detail

      • m_webAppNames

        protected java.util.List<java.lang.String> m_webAppNames
        Deprecated.
        Web application names for conversion support.
      • m_webappUrl

        protected java.lang.String m_webappUrl
        Deprecated.
        Old webapp URL for import conversion.
    • Method Detail

      • setDirectories

        public static java.lang.String setDirectories​(java.lang.String content,
                                                      java.lang.String[] rules)
        Deprecated.
        Translates directory Strings from OpenCms 4.x structure to new 5.0 structure.

        Parameters:
        content - the filecontent
        rules - the translation rules
        Returns:
        String the manipulated file content
      • getVersion

        public int getVersion()
        Deprecated.
        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
        Returns:
        the version number of this import implementation
        See Also:
        I_CmsImport.getVersion()
      • cleanUp

        protected void cleanUp()
        Deprecated.
        Cleans up member variables after the import is finished.

        This is required since there is only one instance for each import version that is kept in memory and reused.

        Overrides:
        cleanUp in class A_CmsImport
      • convertContent

        protected byte[] convertContent​(java.lang.String source,
                                        java.lang.String destination,
                                        byte[] content,
                                        java.lang.String resType)
        Deprecated.
        Performs all required pre-import steps.

        The content is *NOT* changed in the implementation of this class.

        Parameters:
        source - the source path of the resource
        destination - the destination path of the resource
        content - the content of the resource
        resType - the type of the resource
        Returns:
        the (prepared) content of the resource
      • getEncoding

        protected java.lang.String getEncoding​(java.lang.String content)
        Deprecated.
        Gets the encoding from the <?XML ...> tag if present.

        Parameters:
        content - the file content
        Returns:
        String the found encoding
      • initialize

        protected void initialize()
        Deprecated.
        Initializes all member variables before the import is started.

        This is required since there is only one instance for each import version that is kept in memory and reused.

        Overrides:
        initialize in class A_CmsImport
      • setEncoding

        protected java.lang.String setEncoding​(java.lang.String content,
                                               java.lang.String encoding)
        Deprecated.
        Sets the right encoding and returns the result.

        Parameters:
        content - the filecontent
        encoding - the encoding to use
        Returns:
        modified content