Class Upgrader


  • public class Upgrader
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Upgrader()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)
      The main method is designed to be called from the installer executables.
      static void removeConfigXML​(java.lang.String basePath, java.lang.String dataDirPath)
      This method should only be used when upgrading before 7.3 to 7.3 and later.
      static void updateGatewayXmlParams​(java.lang.String path)
      Update gateway.xml entries with keys that contain "catapult" to "gateway" for 8.0 compatibility.
      static void upgradeGatewayXML​(java.io.File gatewayXML, java.lang.String portXML, java.lang.String sslPortXML)
      Updates gateway.xml from a pre-7.3 version either during an upgrade or during a backup restoration from before 7.3
      static void upgradeLaunchFile​(java.lang.String installDirPath, java.lang.String dataDirPath, java.lang.String logsDir, java.lang.String fileToUpgrade)
      Adds lines to or removes lines from ignition.conf to bring it up to date with the latest Ignition version.
      static void upgradeWebXml​(java.lang.String installDirPath)
      Modifies webserver\webapps\main\WEB-INF\web.xml such that items like SRFilter is updated to GatewayFilter
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Upgrader

        public Upgrader()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
        The main method is designed to be called from the installer executables. Usage is as follows:

        args[0]= the path to the base install folder. The installer executable knows what this path is.

        args[1]= the path to the data folder. The installer executable also knows what this path is.

        args[2]= the path to the logs folder. The installer executable also knows what this path is.

        args[3]= the file to process. Passing "file=ignition.conf" will cause the upgrader to add items to ignition.conf until it has all items required at the CURRENT_VERSION variable. Change this to whitelabel.conf as needed for white label builds. Passing "file=config.xml" should only be used when upgrading a pre-7.3 installation to 7.3 or later. It will cause the upgrader to retrieve information from config.xml, such as the http port and ssl port that are used by the current installation. These values are then added to gateway.xml.

      • updateGatewayXmlParams

        public static void updateGatewayXmlParams​(java.lang.String path)
                                           throws java.lang.Exception
        Update gateway.xml entries with keys that contain "catapult" to "gateway" for 8.0 compatibility.
        Throws:
        java.lang.Exception
      • removeConfigXML

        public static void removeConfigXML​(java.lang.String basePath,
                                           java.lang.String dataDirPath)
                                    throws java.lang.Exception
        This method should only be used when upgrading before 7.3 to 7.3 and later. It will take values from config.xml and place them in gateway.xml.
        Parameters:
        basePath - The path to the installation folder.
        dataDirPath - The path to the data folder.
        Throws:
        java.lang.Exception
      • upgradeGatewayXML

        public static void upgradeGatewayXML​(java.io.File gatewayXML,
                                             java.lang.String portXML,
                                             java.lang.String sslPortXML)
                                      throws java.lang.Exception
        Updates gateway.xml from a pre-7.3 version either during an upgrade or during a backup restoration from before 7.3
        Parameters:
        gatewayXML - The File object that represents gateway.xml on the local machine
        portXML - The XML line that contains the "catapult.port" entry. Example: <entry key="catapult.port">8088</entry>
        sslPortXML - The XML line that contains the "catapult.sslport" entry. Example: <entry key="catapult.sslport">8043</entry>
        Throws:
        java.lang.Exception
      • upgradeWebXml

        public static void upgradeWebXml​(java.lang.String installDirPath)
                                  throws java.lang.Exception
        Modifies webserver\webapps\main\WEB-INF\web.xml such that items like SRFilter is updated to GatewayFilter
        Throws:
        java.lang.Exception
      • upgradeLaunchFile

        public static void upgradeLaunchFile​(java.lang.String installDirPath,
                                             java.lang.String dataDirPath,
                                             java.lang.String logsDir,
                                             java.lang.String fileToUpgrade)
                                      throws java.lang.Exception
        Adds lines to or removes lines from ignition.conf to bring it up to date with the latest Ignition version. RestorePanel.java also calls this method during a restoration in case ignition.conf is from an older backup.
        Parameters:
        installDirPath - The path to the main installation dir
        dataDirPath - The path to the data dir. It is expected that when upgrading to 7.3 or later, the ignition.conf would have been moved from /contexts/main to the data dir before calling this method.
        logsDir - The path to the logs dir
        fileToUpgrade - Normally will be ignition.conf, but for a white label build, this file name will vary
        Throws:
        java.lang.Exception