com.ptc.windchill.instassm
Class InstallationRegistryCodeManager

java.lang.Object
  extended bycom.ptc.windchill.instassm.InstallationRegistryCodeManager

public final class InstallationRegistryCodeManager
extends Object

An internal-use-only class that manages the code installed on the user's system that manages the install registry. It supports updating both the standard installer/instreg install registry directory and the duplicate Windchill codebase/instreg install reqistry directory.

Supported API: false

Extendable: false


Field Summary
private static String BACKUP_EXT
           
private static File cdRootDir_
           
private static File cdsInstregDir_
           
private static int cdsInstregVersion_
           
private static ClassLoader classLoaderContext_
           
private static String COMMON_CORE_JAR
           
private static boolean doneUpdating_
           
private static boolean forceUpdate_
           
private static boolean inAnInstaller_
           
private static String[] INSTALL_REGISTRY_CODE_MGMT_FILES
           
private static String[] INSTALL_REGISTRY_JAR_FILES
           
private static boolean installerCodeIsCurrent_
           
private static int installersInstregVersion_
           
private static String INSTREG_CODEBASE_REL_LOCATION
           
private static String INSTREG_DIR_NAME
           
private static String INSTREG_IS_WINDCHILL_INSTALL_TARGET
           
private static String INSTREG_LOADPOINT_REL_LOCATION
           
private static String INSTREG_PROPERTIES_RESOURCE
           
private static String INSTREG_UPDATE_PROP_FILE
           
private static String INSTREG_UPDATE_TARGET
           
private static String INSTREG_VERSION_PROPERTY
           
private static String INSTREG_XML
           
private static URL instregPropertiesFileURL_
           
private static File loadpointDir_
           
private static File loadpointsInstregDir_
           
private static int loadpointsInstregVersion_
           
private static String NEW_EXT
           
private static String NS
           
private static boolean updateInstalledCode_
           
private static boolean useBackupFiles_
           
private static boolean validationDone_
           
 
Constructor Summary
private InstallationRegistryCodeManager()
           
 
Method Summary
private static void closeInputStream(InputStream input_stream)
           
private static void closeZipFile(ZipFile zip)
           
private static boolean doesInstalledCodeNeedUpdating()
           
private static int getCdsInstregVersion()
           
static int getInstallersInstregVersion()
           
static File getInstallRegXmlName(boolean fail_if_doesnt_exist)
           
static File getInstallRegXmlPropertyFile()
           
static File[] getInstregClassPath()
           
private static int getInstregVersionFromContext()
           
private static int getInstregVersionFromJar(File jar)
           
private static String getProperty(InputStream input_stream, String property)
           
static String getUpdateInstallRegistryTargets()
           
static boolean installedCodeNeedsUpdating()
           
static boolean installersInstallRegistryCodeIsCurrent()
           
static void main(String[] args)
           
private static void setCdRootDir()
           
private static void setCdRootDir(File cd_root)
           
private static void setCdsInstregVersion()
           
private static void setForceUpdate(boolean force_update)
           
private static void setInstallersInstregVersion()
           
private static void setLoadpointDir()
           
private static void setLoadpointDir(File load_point)
           
private static boolean updateInstalledCode()
           
static void updateInstallRegistryCode()
           
private static void updateMessage()
           
private static void validateCdsInstregDirectoryContents()
           
private static void validateCdVersusLoadpoint()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inAnInstaller_

private static final boolean inAnInstaller_

NS

private static final String NS

INSTREG_DIR_NAME

private static final String INSTREG_DIR_NAME
See Also:
Constant Field Values

INSTREG_LOADPOINT_REL_LOCATION

private static final String INSTREG_LOADPOINT_REL_LOCATION

INSTREG_CODEBASE_REL_LOCATION

private static final String INSTREG_CODEBASE_REL_LOCATION

COMMON_CORE_JAR

private static final String COMMON_CORE_JAR
See Also:
Constant Field Values

INSTALL_REGISTRY_JAR_FILES

private static final String[] INSTALL_REGISTRY_JAR_FILES

INSTREG_XML

private static final String INSTREG_XML
See Also:
Constant Field Values

INSTALL_REGISTRY_CODE_MGMT_FILES

private static final String[] INSTALL_REGISTRY_CODE_MGMT_FILES

INSTREG_PROPERTIES_RESOURCE

private static final String INSTREG_PROPERTIES_RESOURCE
See Also:
Constant Field Values

INSTREG_VERSION_PROPERTY

private static final String INSTREG_VERSION_PROPERTY
See Also:
Constant Field Values

BACKUP_EXT

private static final String BACKUP_EXT
See Also:
Constant Field Values

NEW_EXT

private static final String NEW_EXT
See Also:
Constant Field Values

INSTREG_UPDATE_TARGET

private static final String INSTREG_UPDATE_TARGET
See Also:
Constant Field Values

INSTREG_IS_WINDCHILL_INSTALL_TARGET

private static final String INSTREG_IS_WINDCHILL_INSTALL_TARGET
See Also:
Constant Field Values

INSTREG_UPDATE_PROP_FILE

private static final String INSTREG_UPDATE_PROP_FILE
See Also:
Constant Field Values

classLoaderContext_

private static ClassLoader classLoaderContext_

instregPropertiesFileURL_

private static URL instregPropertiesFileURL_

installersInstregVersion_

private static int installersInstregVersion_

cdsInstregVersion_

private static int cdsInstregVersion_

loadpointsInstregVersion_

private static int loadpointsInstregVersion_

cdRootDir_

private static File cdRootDir_

loadpointDir_

private static File loadpointDir_

cdsInstregDir_

private static File cdsInstregDir_

loadpointsInstregDir_

private static File loadpointsInstregDir_

updateInstalledCode_

private static boolean updateInstalledCode_

installerCodeIsCurrent_

private static boolean installerCodeIsCurrent_

useBackupFiles_

private static boolean useBackupFiles_

forceUpdate_

private static boolean forceUpdate_

validationDone_

private static boolean validationDone_

doneUpdating_

private static boolean doneUpdating_
Constructor Detail

InstallationRegistryCodeManager

private InstallationRegistryCodeManager()
Method Detail

getInstregClassPath

public static File[] getInstregClassPath()
                                  throws IAException
Throws:
IAException

getInstallersInstregVersion

public static int getInstallersInstregVersion()
                                       throws IAException
Throws:
IAException

getInstallRegXmlName

public static File getInstallRegXmlName(boolean fail_if_doesnt_exist)
                                 throws IAException
Throws:
IAException

getUpdateInstallRegistryTargets

public static String getUpdateInstallRegistryTargets()

getInstallRegXmlPropertyFile

public static File getInstallRegXmlPropertyFile()
                                         throws IAException
Throws:
IAException

installedCodeNeedsUpdating

public static boolean installedCodeNeedsUpdating()
                                          throws IAException
Throws:
IAException

installersInstallRegistryCodeIsCurrent

public static boolean installersInstallRegistryCodeIsCurrent()
                                                      throws IAException
Throws:
IAException

updateInstallRegistryCode

public static void updateInstallRegistryCode()
                                      throws IAException
Throws:
IAException

validateCdVersusLoadpoint

private static void validateCdVersusLoadpoint()
                                       throws IAException
Throws:
IAException

setCdRootDir

private static void setCdRootDir()
                          throws IAException
Throws:
IAException

setCdRootDir

private static void setCdRootDir(File cd_root)
                          throws IAException
Throws:
IAException

setLoadpointDir

private static void setLoadpointDir()
                             throws IAException
Throws:
IAException

setLoadpointDir

private static void setLoadpointDir(File load_point)
                             throws IAException
Throws:
IAException

updateMessage

private static void updateMessage()
                           throws IAException
Throws:
IAException

setCdsInstregVersion

private static void setCdsInstregVersion()
                                  throws IAException
Throws:
IAException

getCdsInstregVersion

private static int getCdsInstregVersion()
                                 throws IAException
Throws:
IAException

validateCdsInstregDirectoryContents

private static void validateCdsInstregDirectoryContents()
                                                 throws IAException
Throws:
IAException

doesInstalledCodeNeedUpdating

private static boolean doesInstalledCodeNeedUpdating()
                                              throws IAException
Throws:
IAException

updateInstalledCode

private static boolean updateInstalledCode()

setInstallersInstregVersion

private static void setInstallersInstregVersion()
                                         throws IAException
Throws:
IAException

getInstregVersionFromContext

private static int getInstregVersionFromContext()
                                         throws IAException
Throws:
IAException

getInstregVersionFromJar

private static int getInstregVersionFromJar(File jar)
                                     throws IAException
Throws:
IAException

closeZipFile

private static void closeZipFile(ZipFile zip)
                          throws IAException
Throws:
IAException

closeInputStream

private static void closeInputStream(InputStream input_stream)
                              throws IAException
Throws:
IAException

getProperty

private static String getProperty(InputStream input_stream,
                                  String property)
                           throws IAException
Throws:
IAException

setForceUpdate

private static void setForceUpdate(boolean force_update)

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception