com.ibm.di.UpdateInstaller
Class Registry

java.lang.Object
  extended by com.ibm.di.UpdateInstaller.Registry

public class Registry
extends Object

Represents the current TDI installation including installed components and fixes that have been applied.


Constructor Summary
Registry(String installDir)
          Class constructor that takes an installation directory
 
Method Summary
 void dump()
          Outputs information about this TDI installation to standard out.
 boolean getClobber()
          Gets the clobber variable
 InstalledComponent getComponent(String name)
          Gets the object representing the specified name if this TDI installation has it installed.
 String getEdition()
          Gets the edition
 Object[] getFixes()
          Gets the fixes applied to this TDI installation
static String getFixName(String fix)
           
 String getInstallDir()
          Gets the install directory location
 Object[] getInstalledComponents()
          Gets the components installed for this TDI installation
 String getLevel()
          Gets the TDI level
 String getLicenseType()
          Gets the license type
 boolean isInstalled(String component)
          Tells if a certain component is installed
 void restore()
          Updates the .registry file during a rollback operation
 void setClobber(boolean c)
          Sets the clobber variable
 void setLevel(String l)
          Sets the level variable
 void setLicenseType(String ltype)
          Sets the license type
 int update(Fix fix, boolean clean)
          Updates the .registry file after a rollback or update.
 int updateCommon()
          performs actual writing of the .registry during an update.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Registry

public Registry(String installDir)
         throws Exception
Class constructor that takes an installation directory

Parameters:
installDir - The TDI installation directory
Throws:
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(String l)
Sets the level variable

Parameters:
l - The TDI level

getLevel

public String getLevel()
Gets the TDI level

Returns:
The TDI level

getInstallDir

public String getInstallDir()
Gets the install directory location

Returns:
TDI install directory

getEdition

public String getEdition()
Gets the edition

Returns:
The edition of this install as indicated in FixUtils
See Also:
FixUtils

getLicenseType

public String getLicenseType()
Gets the license type

Returns:
The license type of this install as indicated in FixUtils
See Also:
FixUtils

setLicenseType

public void setLicenseType(String ltype)
Sets the license type

See Also:
FixUtils

getFixes

public Object[] getFixes()
Gets the fixes applied to this TDI installation

Returns:
An array with a list of fixes applied

getInstalledComponents

public Object[] getInstalledComponents()
Gets the components installed for this TDI installation

Returns:
An array representation of the installed TDI components

getComponent

public InstalledComponent getComponent(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(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 back
clean - 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 String getFixName(String fix)