com.ibm.jsdt.support.deploymenthelper.installedproduct
Class ConsoleMgmtExtInstalledProduct

java.lang.Object
  extended by com.ibm.jsdt.support.deploymenthelper.installedproduct.InstalledProduct
      extended by com.ibm.jsdt.support.deploymenthelper.installedproduct.ConsoleMgmtExtInstalledProduct

public class ConsoleMgmtExtInstalledProduct
extends InstalledProduct

Handles pre-installation and post-installation activities for the console management extension.


Field Summary
static java.lang.String DB2_PPC_SUPPORTED_VERSION_UPPERLIMIT
           
static java.lang.String DB2_SUPPORTED_VERSION_LOWERLIMIT
           
static java.lang.String DB2_SUPPORTED_VERSION_UPPERLIMIT
           
static java.lang.String IDS_SUPPORTED_VERSION_LOWERLIMIT
           
static java.lang.String IDS_SUPPORTED_VERSION_UPPERLIMIT
           
static java.lang.String IHS_SUPPORTED_VERSION_LOWERLIMIT
           
static java.lang.String IHS_SUPPORTED_VERSION_UPPERLIMIT
           
static java.lang.String WAS_SUPPORTED_VERSION_LOWERLIMIT
           
static java.lang.String WAS_SUPPORTED_VERSION_UPPERLIMIT
           
 
Fields inherited from class com.ibm.jsdt.support.deploymenthelper.installedproduct.InstalledProduct
helper
 
Constructor Summary
protected ConsoleMgmtExtInstalledProduct(java.lang.String version, java.lang.String location)
          Constructs a new ConsoleMgmtExtInstalledProduct containing the version and the location of the installed product.
 
Method Summary
 int discoverDB2(java.lang.String lowerLimit, java.lang.String upperLimit)
          Discovers DB2 UDB Express installed on the system and updates the console agent properties file with the entries.
 int discoverDB2(java.lang.String lowerLimit, java.lang.String upperLimit, boolean updatePropertiesFile)
          Discovers DB2 UDB Express installed on the system and updates the console agent properties file with the entries.
 int discoverIDS(java.lang.String lowerLimit, java.lang.String upperLimit)
          Discovers Informix database installed on the system and updates console agent properties file with the entries.
 int discoverIDS(java.lang.String lowerLimit, java.lang.String upperLimit, boolean updatePropertiesFile)
          Discovers Informix database installed on the system and updates console agent properties file with the entries.
 int discoverIHS(java.lang.String lowerLimit, java.lang.String upperLimit)
          Discovers IBM HTTP Server installed on the system and updates console agent properties file with the entries.
 int discoverIHS(java.lang.String lowerLimit, java.lang.String upperLimit, boolean updatePropertiesFile)
          Discovers IBM HTTP Server installed on the system and updates console agent properties file with the entries.
 int discoverWAS(java.lang.String lowerLimit, java.lang.String upperLimit)
          Discovers WebSphere Application Server - Express installed on the system and updates the console agent properties file with the entries.
 int discoverWAS(java.lang.String lowerLimit, java.lang.String upperLimit, boolean updatePropertiesFile)
          Discovers WebSphere Application Server - Express installed on the system and updates the console agent properties file with the entries.
 boolean doesMiddlewareNeedUpdateInPropFile()
          Determines if there are middleware on the system that needs to be updated in the console agent properties file in order to manage it.
 void fileSearchAndAppendLine(java.lang.String filename, java.lang.String find, java.lang.String lineToAppend)
          Searches for a string, if that particular string is found, then appends a given line on the next line after the string is found.
 void fileSearchAndDeleteLineWithText(java.lang.String filename, java.lang.String find)
          Searches a file for a given string, if that particular string is found this method will delete the entire line on which the string resides.
 ConsoleAgentInstalledProduct getConsoleAgentInstalledProduct()
          Returns Console agent installed product on the system.
static ConsoleMgmtExtInstalledProduct getInstalledProduct(java.lang.String location)
          Gets the console management extension installed product at the given location.
static ConsoleMgmtExtInstalledProduct[] getInstalledProducts()
          Gets the console management extension installed product from the target computer.
 java.lang.String getMgmtExtLogLocation()
          Retrieves the console management extension log.
 void makeMiddlewareUpdatesToPropFile()
          Update the console agent properties file with any middleware that are not updated.
 boolean restartConsoleAgent()
          Restarts the console agent
 boolean restartConsoleAgent(boolean fromConsoleMachine)
          Restarts the console agent
 boolean restartConsoleAgentUsingServicesFile()
          Restarts the console agent service using a script file.
 void updateConsoleAgentServiceFile()
          Updates the console agent service file.
 
Methods inherited from class com.ibm.jsdt.support.deploymenthelper.installedproduct.InstalledProduct
compareVersion, getDeploymentHelper, getInstalledLocation, getInstalledProduct, getInstalledProducts, getInstalledVersion, getOSDeploymentHelper, grepRPM, setDeploymentHelper, setInstalledLocation, setInstalledVersion, trimVersionToNVersionPlaces
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WAS_SUPPORTED_VERSION_LOWERLIMIT

public static final java.lang.String WAS_SUPPORTED_VERSION_LOWERLIMIT
See Also:
Constant Field Values

WAS_SUPPORTED_VERSION_UPPERLIMIT

public static final java.lang.String WAS_SUPPORTED_VERSION_UPPERLIMIT
See Also:
Constant Field Values

DB2_SUPPORTED_VERSION_LOWERLIMIT

public static final java.lang.String DB2_SUPPORTED_VERSION_LOWERLIMIT
See Also:
Constant Field Values

DB2_SUPPORTED_VERSION_UPPERLIMIT

public static final java.lang.String DB2_SUPPORTED_VERSION_UPPERLIMIT
See Also:
Constant Field Values

DB2_PPC_SUPPORTED_VERSION_UPPERLIMIT

public static final java.lang.String DB2_PPC_SUPPORTED_VERSION_UPPERLIMIT
See Also:
Constant Field Values

IDS_SUPPORTED_VERSION_LOWERLIMIT

public static final java.lang.String IDS_SUPPORTED_VERSION_LOWERLIMIT
See Also:
Constant Field Values

IDS_SUPPORTED_VERSION_UPPERLIMIT

public static final java.lang.String IDS_SUPPORTED_VERSION_UPPERLIMIT
See Also:
Constant Field Values

IHS_SUPPORTED_VERSION_LOWERLIMIT

public static final java.lang.String IHS_SUPPORTED_VERSION_LOWERLIMIT
See Also:
Constant Field Values

IHS_SUPPORTED_VERSION_UPPERLIMIT

public static final java.lang.String IHS_SUPPORTED_VERSION_UPPERLIMIT
See Also:
Constant Field Values
Constructor Detail

ConsoleMgmtExtInstalledProduct

protected ConsoleMgmtExtInstalledProduct(java.lang.String version,
                                         java.lang.String location)
Constructs a new ConsoleMgmtExtInstalledProduct containing the version and the location of the installed product.

Parameters:
version - The version of the installed product.
location - The location of the installed product.
Method Detail

getInstalledProduct

public static ConsoleMgmtExtInstalledProduct getInstalledProduct(java.lang.String location)
Gets the console management extension installed product at the given location. This method calls InstalledProduct object and passes the location and the created object of policy class implementor with the DeploymentHelper object.

Parameters:
location - The location of the installed product.
Returns:
An instance of the management extension installed product.

getInstalledProducts

public static ConsoleMgmtExtInstalledProduct[] getInstalledProducts()
Gets the console management extension installed product from the target computer.

Returns:
An array of management extension installed products found. The array size is 1, because you cannot have multiple instances of the product.

getMgmtExtLogLocation

public java.lang.String getMgmtExtLogLocation()
Retrieves the console management extension log.

Returns:
Location of the log file.

discoverWAS

public int discoverWAS(java.lang.String lowerLimit,
                       java.lang.String upperLimit)
Discovers WebSphere Application Server - Express installed on the system and updates the console agent properties file with the entries.

Parameters:
lowerLimit - Lowest supported version
upperLimit - Highest supported version
Returns:
AUTOMATIC_UPDATE, UPDATE_NECESSARY, UPDATE_UNNECESSARY

discoverWAS

public int discoverWAS(java.lang.String lowerLimit,
                       java.lang.String upperLimit,
                       boolean updatePropertiesFile)
Discovers WebSphere Application Server - Express installed on the system and updates the console agent properties file with the entries.

Parameters:
lowerLimit - Lowest supported version
upperLimit - Highest supported version
updatePropertiesFile - True if the console agent properties file should be updated.
Returns:
AUTOMATIC_UPDATE, UPDATE_NECESSARY, UPDATE_UNNECESSARY

discoverDB2

public int discoverDB2(java.lang.String lowerLimit,
                       java.lang.String upperLimit)
Discovers DB2 UDB Express installed on the system and updates the console agent properties file with the entries. Note: For iSeries, the entry is added to the products that depend on that property, and an installation location is not needed.

Parameters:
lowerLimit - Lowest supported version.
upperLimit - Highest supported version.
Returns:
AUTOMATIC_UPDATE, UPDATE_NECESSARY, UPDATE_UNNECESSARY

discoverDB2

public int discoverDB2(java.lang.String lowerLimit,
                       java.lang.String upperLimit,
                       boolean updatePropertiesFile)
Discovers DB2 UDB Express installed on the system and updates the console agent properties file with the entries. Note: For iSeries, the entry is added to the products that depend on that property, and an installation location is not needed.

Parameters:
lowerLimit - Lowest supported version.
upperLimit - Highest supported version.
updatePropertiesFile - True if the console agent properties file should be updated.
Returns:
AUTOMATIC_UPDATE, UPDATE_NECESSARY, UPDATE_UNNECESSARY

updateConsoleAgentServiceFile

public void updateConsoleAgentServiceFile()
Updates the console agent service file.


discoverIDS

public int discoverIDS(java.lang.String lowerLimit,
                       java.lang.String upperLimit)
Discovers Informix database installed on the system and updates console agent properties file with the entries.

Parameters:
lowerLimit - Lowest supported version
upperLimit - Highest supported version
Returns:
AUTOMATIC_UPDATE, UPDATE_NECESSARY, UPDATE_UNNECESSARY

discoverIDS

public int discoverIDS(java.lang.String lowerLimit,
                       java.lang.String upperLimit,
                       boolean updatePropertiesFile)
Discovers Informix database installed on the system and updates console agent properties file with the entries.

Parameters:
lowerLimit - Lowest supported version
upperLimit - Highest supported version
updatePropertiesFile - True if the console agent properties file should be updated.
Returns:
AUTOMATIC_UPDATE, UPDATE_NECESSARY, UPDATE_UNNECESSARY

discoverIHS

public int discoverIHS(java.lang.String lowerLimit,
                       java.lang.String upperLimit)
Discovers IBM HTTP Server installed on the system and updates console agent properties file with the entries.

Parameters:
lowerLimit - lowest supported version
upperLimit - highest supported version
Returns:
AUTOMATIC_UPDATE, UPDATE_NECESSARY, UPDATE_UNNECESSARY

discoverIHS

public int discoverIHS(java.lang.String lowerLimit,
                       java.lang.String upperLimit,
                       boolean updatePropertiesFile)
Discovers IBM HTTP Server installed on the system and updates console agent properties file with the entries.

Parameters:
lowerLimit - lowest supported version
upperLimit - highest supported version
updatePropertiesFile - True if the console agent properties file should be updated.
Returns:
AUTOMATIC_UPDATE, UPDATE_NECESSARY, UPDATE_UNNECESSARY

getConsoleAgentInstalledProduct

public ConsoleAgentInstalledProduct getConsoleAgentInstalledProduct()
Returns Console agent installed product on the system.

Returns:
ConsoleAgentInstalledProduct instance found on the system.

fileSearchAndDeleteLineWithText

public void fileSearchAndDeleteLineWithText(java.lang.String filename,
                                            java.lang.String find)
Searches a file for a given string, if that particular string is found this method will delete the entire line on which the string resides.

Parameters:
filename - The name of the file to be searched.
find - The string to search for.

fileSearchAndAppendLine

public void fileSearchAndAppendLine(java.lang.String filename,
                                    java.lang.String find,
                                    java.lang.String lineToAppend)
Searches for a string, if that particular string is found, then appends a given line on the next line after the string is found.

Parameters:
filename - The name of the file to search.
find - The string that is being searched for.
lineToAppend - The line which you wish to append.

restartConsoleAgent

public boolean restartConsoleAgent()
Restarts the console agent

Returns:
true If console agent is successfully restarted false If console agent could not be successfully restarted

restartConsoleAgent

public boolean restartConsoleAgent(boolean fromConsoleMachine)
Restarts the console agent

Parameters:
fromConsoleMachine - true - If issuing call from the console machine. On Windows operating system, the command will not be run from a new command window. false - The call is made outside the console machine.
Returns:
true If console agent is successfully restarted false If console agent could not be successfully restarted

restartConsoleAgentUsingServicesFile

public boolean restartConsoleAgentUsingServicesFile()
Restarts the console agent service using a script file.

Returns:
true If console agent is successfully restarted false If console agent could not be successfully restarted

doesMiddlewareNeedUpdateInPropFile

public boolean doesMiddlewareNeedUpdateInPropFile()
Determines if there are middleware on the system that needs to be updated in the console agent properties file in order to manage it.

Returns:
true One or more middleware needs to be updated. false Middleware updates are not needed.

makeMiddlewareUpdatesToPropFile

public void makeMiddlewareUpdatesToPropFile()
Update the console agent properties file with any middleware that are not updated.