com.ibm.events.install
Interface InstallUtil


public interface InstallUtil

This interface provides methods for obtaining information about the installed Common Event Infrastructure server.

Implementations of the InstallUtil class use the java.util.logging.Logger class for logging messages and trace data. The name of the message logger is com.ibm.events.install.msg and the name of the trace logger is com.ibm.events.install.trc. Applications can control where the message and trace data is logged by providing configuration settings for these loggers in their LogManager. Refer to the Javadoc for the java.util.Logging package for information on how to configure loggers.

Since:
5.1.0
Version:
1.20 1/10/06

Field Summary
static java.lang.String ALL
           
static java.lang.String CELL
           
static java.lang.String CLIENT_TYPE
           
static int CURRENT_VERSION_DETECTED
          The currently installed version of CEI is at the same level.
static int HIGHER_FIXPACK_LEVEL_DETECTED
          The currently installed version of CEI is at a higher fixpack level.
static int HIGHER_MINOR_LEVEL_DETECTED
          The currently installed version of CEI is at a higher minor level.
static int HIGHER_RELEASE_DETECTED
          The currently installed version of CEI is at a higher release level.
static int HIGHER_VERSION_DETECTED
          The currently installed version of CEI is at a higher version level.
static int LOWER_FIXPACK_LEVEL_DETECTED
          The currently installed version of CEI is at a lower fixpack level.
static int LOWER_MINOR_LEVEL_DETECTED
          The currently installed version of CEI is at a lower minor level.
static int LOWER_RELEASE_DETECTED
          The currently installed version of CEI is at a lower release level.
static int LOWER_VERSION_DETECTED
          The currently installed version of CEI is at a lower version level.
static int NO_VERSION_DETECTED
          No version of CEI is currently installed.
static java.lang.String NODE
           
static java.lang.String NONE
           
static java.lang.String SERVER
           
static java.lang.String SERVER_TYPE
           
static int UNKNOWN_VERSION_DETECTED
          The currently installed version is not recognized.
 
Method Summary
 boolean checkCompatibilityForInstallation()
          Determines if the version of CEI in the system is compatible for upgrading the system to current version of CEI.
 int checkInstalledCeiVersion()
          Compares the version of CEI in the system against the version of the CEI installer and returns a value based on whether the installed system version is higher, current or lower.
 void deregisterCeiUser(java.lang.String prodID)
          Removes the product from the list of users of CEI system.
 void deregisterCeiUserForProfile(java.lang.String prodID, java.lang.String profilePath)
          Removes a product from the list of CEI users for a profile.
 java.lang.String getCeiHome()
          Returns the directory where CEI is installed.
 java.lang.String getCeiInstallerVersion()
          Returns the version of CEI installer.
 java.lang.String getCeiProductVersion()
          Returns the version of CEI Product
 java.util.List getCeiUsers()
          Whenever the CEI system is installed by a product, that product is registered in the CEI system as a CEI user.
 java.util.List getCeiUsersForProfile(java.lang.String profilePath)
          Whenever a profile is augmented with CEI, that product is registered in the CEI system as a profile user.
 java.util.List getProfilePathList()
          Returns the profile paths augmented with CEI.
 java.lang.String getWasProductVersion()
          Returns the version of the WAS Server.
 boolean isCeiProductInstalled()
          Determines if the CEI Product is installed.
 boolean isCeiServerPartiallyInstalled(java.lang.String profilePath)
          Determines if the CEI Server is partially installed.
 boolean isInstalledCeiDownlevel()
          Determines if the currently installed CEI product is downlevel compared to the CEI installer version.
 boolean isProfileAugmentedAsClientOnly(java.lang.String profilePath)
          Returns whether the specified WebSphere profile has been augmented as a CEI client only.
 boolean isProfileAugmentedAsServer(java.lang.String profilePath)
          Returns whether the specified WebSphere profile has been augmented as a CEI server.
 boolean isProfileAugmentedWithCei(java.lang.String profilePath)
          Returns true if the specified profile is augmented with CEI.
 boolean isProfileDeploymentManager(java.lang.String profilePath)
          Determines if the specified profile is a deployment manager.
 boolean isProfileInNetwork(java.lang.String profilePath)
          Determines if the specified profile is connected in a network.
 boolean isProfileStandalone(java.lang.String profilePath)
          Determines if the specified profile is a standalone server.
 boolean isWasCompatibleForInstallation()
          Determines if the version of WAS in the system is compatible for installing the current version of CEI.
 boolean isWasProductInstalled()
          Determines if WAS Product is installed.
 void registerCeiUser(java.lang.String prodID)
          Registers the product as a user of CEI system.Whenever CEI system is installed by a product, that product is registered in the CEI system as a CEI user.
 boolean registerCeiUserForProfile(java.lang.String prodID, java.lang.String profilePath, java.lang.String userType)
          Registers a product as a CEI user of a profile.
 

Field Detail

CELL

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

NODE

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

SERVER

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

NONE

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

ALL

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

SERVER_TYPE

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

CLIENT_TYPE

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

UNKNOWN_VERSION_DETECTED

public static final int UNKNOWN_VERSION_DETECTED
The currently installed version is not recognized.

See Also:
Constant Field Values

NO_VERSION_DETECTED

public static final int NO_VERSION_DETECTED
No version of CEI is currently installed.

See Also:
Constant Field Values

CURRENT_VERSION_DETECTED

public static final int CURRENT_VERSION_DETECTED
The currently installed version of CEI is at the same level.

See Also:
Constant Field Values

LOWER_VERSION_DETECTED

public static final int LOWER_VERSION_DETECTED
The currently installed version of CEI is at a lower version level.

See Also:
Constant Field Values

HIGHER_VERSION_DETECTED

public static final int HIGHER_VERSION_DETECTED
The currently installed version of CEI is at a higher version level.

See Also:
Constant Field Values

LOWER_RELEASE_DETECTED

public static final int LOWER_RELEASE_DETECTED
The currently installed version of CEI is at a lower release level.

See Also:
Constant Field Values

HIGHER_RELEASE_DETECTED

public static final int HIGHER_RELEASE_DETECTED
The currently installed version of CEI is at a higher release level.

See Also:
Constant Field Values

LOWER_MINOR_LEVEL_DETECTED

public static final int LOWER_MINOR_LEVEL_DETECTED
The currently installed version of CEI is at a lower minor level.

See Also:
Constant Field Values

HIGHER_MINOR_LEVEL_DETECTED

public static final int HIGHER_MINOR_LEVEL_DETECTED
The currently installed version of CEI is at a higher minor level.

See Also:
Constant Field Values

LOWER_FIXPACK_LEVEL_DETECTED

public static final int LOWER_FIXPACK_LEVEL_DETECTED
The currently installed version of CEI is at a lower fixpack level.

See Also:
Constant Field Values

HIGHER_FIXPACK_LEVEL_DETECTED

public static final int HIGHER_FIXPACK_LEVEL_DETECTED
The currently installed version of CEI is at a higher fixpack level.

See Also:
Constant Field Values
Method Detail

isProfileDeploymentManager

public boolean isProfileDeploymentManager(java.lang.String profilePath)
                                   throws InstallException
Determines if the specified profile is a deployment manager.

Parameters:
profilePath - The fully qualified path of the WebSphere profile to be queried.
Returns:
true, if the specified profile is a deployment manager; false, otherwise.
Throws:
InstallException - error obtaining WAS profile information

isProfileStandalone

public boolean isProfileStandalone(java.lang.String profilePath)
Determines if the specified profile is a standalone server.

Parameters:
profilePath - The fully qualified path of the WebSphere profile to be queried.
Returns:
true, if the specified profile is a standalone server; false, otherwise.

isWasProductInstalled

public boolean isWasProductInstalled()
Determines if WAS Product is installed.

Returns:
true, if WAS Product is installed; false, otherwise.

isProfileInNetwork

public boolean isProfileInNetwork(java.lang.String profilePath)
Determines if the specified profile is connected in a network.

Parameters:
profilePath - The fully qualified path of the WebSphere profile to be queried.
Returns:
true if profile is connected in a network; false, otherwise

getWasProductVersion

public java.lang.String getWasProductVersion()
Returns the version of the WAS Server.

Returns:
The version of the WAS server as a String.

isCeiProductInstalled

public boolean isCeiProductInstalled()
Determines if the CEI Product is installed.

Returns:
true, if the CEI product is detected; false, otherwise.

isCeiServerPartiallyInstalled

public boolean isCeiServerPartiallyInstalled(java.lang.String profilePath)
Determines if the CEI Server is partially installed. The only supported partial installation occurs when CEI was initially installed in a federated node which was later unfederated. This system will not contain CEI administrative panel and configuration files.

Parameters:
profilePath - The fully qualified path of the WebSphere profile to be queried.
Returns:
true, if CEI Server of current version is detected, but administrative panel directory is not found; false, otherwise

getCeiProductVersion

public java.lang.String getCeiProductVersion()
Returns the version of CEI Product

Returns:
The version of CEI product as a String.

getCeiInstallerVersion

public java.lang.String getCeiInstallerVersion()
Returns the version of CEI installer.

Returns:
The version of CEI installer as a String.

isWasCompatibleForInstallation

public boolean isWasCompatibleForInstallation()
Determines if the version of WAS in the system is compatible for installing the current version of CEI. The version v.r.m.f of WAS is compatible if v.r of WAS version is the same as v.r of current CEI version.

Returns:
true if compatability check succeeds, false, otherwise

checkCompatibilityForInstallation

public boolean checkCompatibilityForInstallation()
Determines if the version of CEI in the system is compatible for upgrading the system to current version of CEI. The version v.r.m.f of CEI in the system is compatible for upgrade if v.r of CEI version in the system is the same as v.r of current version of CEI. If CEI is not present in the system, the compatibility check returns true.

Returns:
true if compatability check succeeds, false, otherwise.

getCeiHome

public java.lang.String getCeiHome()
Returns the directory where CEI is installed.

Returns:
The path where CEI is installed or null if CEI is not installed.

checkInstalledCeiVersion

public int checkInstalledCeiVersion()
Compares the version of CEI in the system against the version of the CEI installer and returns a value based on whether the installed system version is higher, current or lower.

Returns:
A value indicating if the version in the system is lower, higher, or the same as the installer version. Possible return values are:
UNKNOWN_VERSION_DETECTED - The version of CEI in the CEI product file is not a recognized value.
NO_VERSION_DETECTED - CEI is not installed on the system.
CURRENT_VERSION_DETECTED - The level of CEI that is installed on the system is the same as the level of the CEI installer.
LOWER_VERSION_DETECTED - The version of CEI that is installed on the system is a lower version than the version of the CEI installer.
HIGHER_VERSION_DETECTED - The version of CEI that is installed on the system is a higher version than the version of the CEI installer.
LOWER_RELEASE_DETECTED - The release of CEI that is installed on the system is a lower release than the release of the CEI installer.
HIGHER_RELEASE_DETECTED - The release of CEI that is installed on the system is a higher release than the release of the CEI installer.
LOWER_MINOR_LEVEL_DETECTED - The minor level of CEI that is installed on the system is a lower minor level than the minor level of the CEI installer.
HIGHER_MINOR_LEVEL_DETECTED - The minor level of CEI that is installed on the system is a higher minor level than the minor level of the CEI installer.
LOWER_FIXPACK_LEVEL_DETECTED - The fixpack level of CEI that is installed on the system is a lower fixpack level than the fixpack level of the CEI installer.
HIGHER_FIXPACK_LEVEL_DETECTED - The fixpack level of CEI that is installed on the system is a higher fixpack level than the fixpack level of the CEI installer.

isInstalledCeiDownlevel

public boolean isInstalledCeiDownlevel()
Determines if the currently installed CEI product is downlevel compared to the CEI installer version. If an application determines that the installed level of CEI is downlevel compared to the CEI installer, it should call checkCompatibilityForInstallation() to determine if an upgrade is possible.

Returns:
true if the currently installed level of CEI is lower than the version of CEI being installed, or if CEI is not installed. False otherwise.

getProfilePathList

public java.util.List getProfilePathList()
Returns the profile paths augmented with CEI.

Returns:
Returns a list of the profile paths augmented with CEI. Each profile path is a String.

isProfileAugmentedWithCei

public boolean isProfileAugmentedWithCei(java.lang.String profilePath)
Returns true if the specified profile is augmented with CEI.

Parameters:
profilePath - The fully qualified path of the WebSphere profile path to be queried.
Returns:
true if the specified profile is augmented with CEI by any product. False if the specified profile does not exist or it is not augmented with CEI.

getCeiUsers

public java.util.List getCeiUsers()
Whenever the CEI system is installed by a product, that product is registered in the CEI system as a CEI user. The installing product provides a Product ID when installing CEI. This method returns the list of Product IDs of the CEI registered users.

Returns:
List of product IDs of the registered users.

registerCeiUser

public void registerCeiUser(java.lang.String prodID)
                     throws InstallException
Registers the product as a user of CEI system.Whenever CEI system is installed by a product, that product is registered in the CEI system as a CEI user. The installing product provides a Product ID when installing CEI. This method can be used if the installing product detects that the correct version of CEI system is already present and does not invoke CEI installation. The product can register itself as a user.

Parameters:
prodID - - An identification for the product using CEI System
Throws:
InstallException - An error occurs reading or writing the CEI product file, or the installed version of CEI does not match the version handling the request.

registerCeiUserForProfile

public boolean registerCeiUserForProfile(java.lang.String prodID,
                                         java.lang.String profilePath,
                                         java.lang.String userType)
                                  throws InstallException
Registers a product as a CEI user of a profile. Whenever a profile is augmented with CEI, that product is registered in the CEI system as a profile user. The installing product provides a Product ID when augmenting the profile with CEI. This method can be invoked if profile augmentation fails because the user could not be registered at that time. This corresponds to return code InstallConstants.AUGMENT_FAIL_PRODUCT_FILE. Check the install log file to ensure that the error was a problem registering the user.
This method can also be used if the installing product detects that the correct version of CEI is already augmented to a profile as the desired user type (client or server) and does not invoke CEI augmentation. The product can register itself as a CEI user for this profile. Care must be taken when doing this, because if a profile was augmented as a server while it was a federated node and then was unfederated (became a standalone server) certain CEI server functionality will be missing from that standalone server. Augmenting the profile using the installer will add that functionality in this case, but simply registering the user will not. The method isCeiServerPariallyInstalled() can be used to test for this condition.

Parameters:
prodID - An identification for the product using CEI. This product must be a registered CEI user.
profilePath - The fully qualified path of the WebSphere profile that the user is to be registered for.
userType - The type of user to be registered. Valid values are InstallUtil.CLIENT_TYPE and InstallUtil.SERVER_TYPE. If SERVER_TYPE is specified and the profile is currently augmented as CLIENT_TYPE, this method will return false. Note that if InstallUtil.CLIENT_TYPE is specified and the profile is currently augmented as a SERVER_TYPE, the user will be registered.
Returns:
true if the specified product is successfully added to the specified profile or is already registered as a user of the specified profile, false otherwise.
Throws:
InstallException - An error occurs reading or writing the CEI product file, CEI is not installed, or the installed version of CEI does not match the version handling the request.

deregisterCeiUser

public void deregisterCeiUser(java.lang.String prodID)
                       throws InstallException
Removes the product from the list of users of CEI system. Whenever CEI system is uninstalled by a product, that product is removed from the list of CEI users. The uninstalling product provides a Product ID when uninstalling CEI.This method can be used if the uninstalling product detects that the CEI system is being used by other products and does not invoke CEI uninstallation. The product can deregister itself as a user.

Parameters:
prodID - - An identification for the product using CEI System
Throws:
InstallException - An error occurs reading or writing the CEI product file, CEI is not installed, or the installed version of CEI does not match the version handling the request.

deregisterCeiUserForProfile

public void deregisterCeiUserForProfile(java.lang.String prodID,
                                        java.lang.String profilePath)
                                 throws InstallException
Removes a product from the list of CEI users for a profile. Whenever a profile is augmented with CEI, that product is registered in the CEI system as a profile user. The installing product provides a Product ID when augmenting the profile with CEI. When the profile is unaugmented, the user is removed from the list of CEI users for that profile. This method can be invoked if profile unaugmentation fails because the user could not be removed at that time. This corresponds to return code InstallConstants.UNAUGMENT_FAIL_PRODUCT_FILE. Check the install log file to ensure that the error was a problem deregistering the user.

Parameters:
prodID - An identification for the product using CEI.
profilePath - The fully qualified path of the WebSphere profile that the user is to be removed from.
Throws:
InstallException - An error occurs reading or writing the CEI product file, or the installed version of CEI does not match the version handling the request.

getCeiUsersForProfile

public java.util.List getCeiUsersForProfile(java.lang.String profilePath)
Whenever a profile is augmented with CEI, that product is registered in the CEI system as a profile user. The installing product provides a Product ID when augmenting the profile with CEI. This method returns the list of Product IDs of the CEI registered users for the specified profile.

Parameters:
profilePath - The fully qualified path of the WebSphere profile whose CEI users are to be returned.
Returns:
List List of product IDs of the CEI users registered for the specified profile. Returns null if CEI is not installed. Returns an empty list if CEI is installed but there are no registered CEI users for the specified profile.

isProfileAugmentedAsServer

public boolean isProfileAugmentedAsServer(java.lang.String profilePath)
Returns whether the specified WebSphere profile has been augmented as a CEI server. When a profile is augmented with CEI, the augmenting product can specify whether CEI is to be installed as a server or as a client only. This is done using the CLIENT_ONLY keyword in the response file. If CLIENT_ONLY is set to false both client and server capabilities will be installed for that profile. If it is set to true, only the client libraries will be installed.

Parameters:
profilePath - The fully qualified path of the WebSphere profile to be queried.
Returns:
true if the specified WebSphere profile is augmented with CEI as a server, false otherwise.

isProfileAugmentedAsClientOnly

public boolean isProfileAugmentedAsClientOnly(java.lang.String profilePath)
Returns whether the specified WebSphere profile has been augmented as a CEI client only. When a profile is augmented with CEI, the augmenting product can specify whether CEI is to be installed as a server or as a client only. This is done using the CLIENT_ONLY keyword in the response file. If CLIENT_ONLY is set to false both client and server capabilities will be installed for that profile. If it is set to true, only the client libraries will be installed.

Parameters:
profilePath - The fully qualified path of the WebSphere profile to be queried.
Returns:
true if the specified WebSphere profile is augmented with CEI as a client only, false otherwise.