Class Upgrader
- java.lang.Object
- 
- com.inductiveautomation.ignition.common.upgrader.Upgrader
 
- 
 public class Upgrader extends java.lang.Object
- 
- 
Field SummaryFields Modifier and Type Field Description static java.util.regex.PatternJAVA_SET_CORRECT_PATTERNstatic java.util.regex.PatternJAVA_SET_UPGRADE_PATTERN
 - 
Constructor SummaryConstructors Constructor Description Upgrader()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)The main method is designed to be called from the installer executables.static voidremoveConfigXML(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 voidupdateGatewayXmlParams(java.lang.String path)Update gateway.xml entries with keys that contain "catapult" to "gateway" for 8.0 compatibility.static voidupgradeGatewayXML(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.3static voidupgradeLaunchFile(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 voidupgradeWebXml(java.lang.String installDirPath)Modifies webserver\webapps\main\WEB-INF\web.xml such that items like SRFilter is updated to GatewayFilter
 
- 
- 
- 
Method Detail- 
mainpublic 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.
 - 
updateGatewayXmlParamspublic static void updateGatewayXmlParams(java.lang.String path) throws java.lang.ExceptionUpdate gateway.xml entries with keys that contain "catapult" to "gateway" for 8.0 compatibility.- Throws:
- java.lang.Exception
 
 - 
removeConfigXMLpublic static void removeConfigXML(java.lang.String basePath, java.lang.String dataDirPath) throws java.lang.ExceptionThis 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
 
 - 
upgradeGatewayXMLpublic static void upgradeGatewayXML(java.io.File gatewayXML, java.lang.String portXML, java.lang.String sslPortXML) throws java.lang.ExceptionUpdates 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
 
 - 
upgradeWebXmlpublic static void upgradeWebXml(java.lang.String installDirPath) throws java.lang.ExceptionModifies webserver\webapps\main\WEB-INF\web.xml such that items like SRFilter is updated to GatewayFilter- Throws:
- java.lang.Exception
 
 - 
upgradeLaunchFilepublic static void upgradeLaunchFile(java.lang.String installDirPath, java.lang.String dataDirPath, java.lang.String logsDir, java.lang.String fileToUpgrade) throws java.lang.ExceptionAdds 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
 
 
- 
 
-