Package com.ibm.di.UpdateInstaller
Class Registry
- java.lang.Object
-
- com.ibm.di.UpdateInstaller.Registry
-
public class Registry extends java.lang.ObjectRepresents the current TDI installation including installed components and fixes that have been applied.
-
-
Constructor Summary
Constructors Constructor Description Registry(java.lang.String installDir)Class constructor that takes an installation directory
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddump()Outputs information about this TDI installation to standard out.booleangetClobber()Gets the clobber variableInstalledComponentgetComponent(java.lang.String name)Gets the object representing the specified name if this TDI installation has it installed.java.lang.StringgetEdition()Gets the editionjava.lang.Object[]getFixes()Gets the fixes applied to this TDI installationstatic java.lang.StringgetFixName(java.lang.String fix)java.lang.StringgetInstallDir()Gets the install directory locationjava.lang.Object[]getInstalledComponents()Gets the components installed for this TDI installationjava.lang.StringgetLevel()Gets the TDI leveljava.lang.StringgetLicenseType()Gets the license typebooleanisInstalled(java.lang.String component)Tells if a certain component is installedvoidrestore()Updates the .registry file during a rollback operationvoidsetClobber(boolean c)Sets the clobber variablevoidsetLevel(java.lang.String l)Sets the level variablevoidsetLicenseType(java.lang.String ltype)Sets the license typeintupdate(Fix fix, boolean clean)Updates the .registry file after a rollback or update.intupdateCommon()performs actual writing of the .registry during an update.
-
-
-
Constructor Detail
-
Registry
public Registry(java.lang.String installDir) throws java.lang.ExceptionClass constructor that takes an installation directory- Parameters:
installDir- The TDI installation directory- Throws:
java.lang.Exception- If an error occurs while reading the .registry file in the specified location
-
-
Method Detail
-
setClobber
public void setClobber(boolean c)
Sets the clobber variable- Parameters:
c- true or false indicating if we are in a clobber case
-
getClobber
public boolean getClobber()
Gets the clobber variable- Returns:
- true if this is a clobber case, false otherwise
-
setLevel
public void setLevel(java.lang.String l)
Sets the level variable- Parameters:
l- The TDI level
-
getLevel
public java.lang.String getLevel()
Gets the TDI level- Returns:
- The TDI level
-
getInstallDir
public java.lang.String getInstallDir()
Gets the install directory location- Returns:
- TDI install directory
-
getEdition
public java.lang.String getEdition()
Gets the edition- Returns:
- The edition of this install as indicated in FixUtils
- See Also:
FixUtils
-
getLicenseType
public java.lang.String getLicenseType()
Gets the license type- Returns:
- The license type of this install as indicated in FixUtils
- See Also:
FixUtils
-
setLicenseType
public void setLicenseType(java.lang.String ltype)
Sets the license type- See Also:
FixUtils
-
getFixes
public java.lang.Object[] getFixes()
Gets the fixes applied to this TDI installation- Returns:
- An array with a list of fixes applied
-
getInstalledComponents
public java.lang.Object[] getInstalledComponents()
Gets the components installed for this TDI installation- Returns:
- An array representation of the installed TDI components
-
getComponent
public InstalledComponent getComponent(java.lang.String name)
Gets the object representing the specified name if this TDI installation has it installed.- Parameters:
name- The name of the component to look for- Returns:
- The object representing the specified component or null if not found
-
isInstalled
public boolean isInstalled(java.lang.String component)
Tells if a certain component is installed- Parameters:
component- The name of the component to search for- Returns:
- true if the component was found, false otherwise
- See Also:
FixUtils
-
restore
public void restore()
Updates the .registry file during a rollback operation
-
update
public int update(Fix fix, boolean clean)
Updates the .registry file after a rollback or update.- Parameters:
fix- The fix we are adding or null if we are rolling backclean- If true, clear the registry- Returns:
- 0 if the update was successful, nonzero otherwise
-
updateCommon
public int updateCommon()
performs actual writing of the .registry during an update.- Returns:
- 0 if the update was successful, nonzero otherwise
-
dump
public void dump()
Outputs information about this TDI installation to standard out.
-
getFixName
public static java.lang.String getFixName(java.lang.String fix)
-
-