Package com.ibm.di.UpdateInstaller
Class LWIInstalledComponent
- java.lang.Object
-
- com.ibm.di.UpdateInstaller.InstalledComponent
-
- com.ibm.di.UpdateInstaller.LWIInstalledComponent
-
public class LWIInstalledComponent extends InstalledComponent
Represents an LWI (Embedded Web Platform) component. Different from a regular InstalledComponent in that it also must remember a config ID to be used when rolling back.
-
-
Field Summary
-
Fields inherited from class com.ibm.di.UpdateInstaller.InstalledComponent
fixes
-
-
Constructor Summary
Constructors Constructor Description LWIInstalledComponent(java.lang.String name)Class constructor specifying the name of this component.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFix(int pos, java.lang.String fixName)Adds the name of a fix to the specified position in the list of fixes that have been applied to this component.voidaddFix(java.lang.String fixName)Adds the name of a fix to the end of the list of fixes that have been applied to this component.booleanequals(java.lang.Object obj)Tells if two InstalledComponents are equal by comparing their names.booleanequals(java.lang.String name)Tells if two LWIInstalledComponents are equal by comparing their names.java.lang.Object[]getConfigIDs()Gets the list of config IDs.java.lang.StringgetServiceName()Gets the Windows LWI service name.inthashCode()Computes this InstalledComponent's hash code.intremove(java.lang.String fixName)Removes a fix from this component's list.voidremoveAll()Clears the list of applied fixes for this component.java.lang.StringtoString()Converts the current object to a String for printing.voidwriteFixes(java.io.PrintWriter outfile)Write this component's information in the appropriate format to specified open file.-
Methods inherited from class com.ibm.di.UpdateInstaller.InstalledComponent
getFixes, getName, isFirstFix, isFixInstalled, posOfFixInstalled, setName
-
-
-
-
Method Detail
-
getConfigIDs
public java.lang.Object[] getConfigIDs()
Gets the list of config IDs.- Returns:
- An array representing the config IDs from this and previously applied LWI fixes in the correct order
-
getServiceName
public java.lang.String getServiceName()
Gets the Windows LWI service name.- Returns:
- The Windows LWI service name if present
-
addFix
public void addFix(int pos, java.lang.String fixName)Adds the name of a fix to the specified position in the list of fixes that have been applied to this component.- Overrides:
addFixin classInstalledComponent- Parameters:
pos- Position to add this fix in the listfixName- Name of the fix
-
addFix
public void addFix(java.lang.String fixName)
Adds the name of a fix to the end of the list of fixes that have been applied to this component.- Overrides:
addFixin classInstalledComponent- Parameters:
fixName- Name of the fix
-
remove
public int remove(java.lang.String fixName)
Removes a fix from this component's list.- Overrides:
removein classInstalledComponent- Parameters:
fixName- The name of the fix to remove- Returns:
- The position at which the fix was located before removal, -1 if not found
-
removeAll
public void removeAll()
Clears the list of applied fixes for this component.- Overrides:
removeAllin classInstalledComponent
-
writeFixes
public void writeFixes(java.io.PrintWriter outfile)
Write this component's information in the appropriate format to specified open file.- Overrides:
writeFixesin classInstalledComponent- Parameters:
outfile- The file that is being created
-
equals
public boolean equals(java.lang.Object obj)
Tells if two InstalledComponents are equal by comparing their names.- Overrides:
equalsin classInstalledComponent- Parameters:
obj- An InstalledComponent to compare- Returns:
- true if the objects have the same name, false otherwise
-
equals
public boolean equals(java.lang.String name)
Tells if two LWIInstalledComponents are equal by comparing their names.- Overrides:
equalsin classInstalledComponent- Parameters:
name- A String with the name of the component to compare- Returns:
- true if the names are equal, false otherwise
-
hashCode
public int hashCode()
Computes this InstalledComponent's hash code.- Overrides:
hashCodein classInstalledComponent- Returns:
- the hashcode of the component's name
-
toString
public java.lang.String toString()
Converts the current object to a String for printing.- Overrides:
toStringin classInstalledComponent- Returns:
- A string representation of this object
-
-