com.bea.plateng.gpr.registry
Class RegistryInfoImpl

java.lang.Object
  extended by com.bea.plateng.gpr.registry.RegistryInfoImpl
All Implemented Interfaces:
RegistryInfo

public class RegistryInfoImpl
extends java.lang.Object
implements RegistryInfo

Inspects the registry.xml file of a BEA Home directory for installed products and subcomponents.

Version:
4.0.0 Jan 31, 2005
Author:
Copyright (c) 2004 by BEA Systems, Inc., All Rights Reserved.

Constructor Summary
RegistryInfoImpl(java.lang.String beaHomeDir)
          Creates a RegistryInfoImpl instance describing the registry information for the given BEA Home directory.
 
Method Summary
static java.lang.String[] getBEAHomes()
          Returns a list of all BEA Home directories on the current machine.
 java.lang.String[] getJavaHomes()
          Returns the locations of all Java installations in the current BEA Home directory.
 java.lang.String getJavaVendor(java.lang.String javaHome)
          For a given Java home, returns the vendor of the JVM.
 java.lang.String getJavaVersion(java.lang.String javaHome)
          Given a Java home, returns the JVM version
 ProductInfo getProductInfo(java.lang.String productName, java.lang.String productVersion)
          Returns an object containing information about the installed product that matches the parameters supplied.
 ProductInfo[] getProductInfos()
          Returns information about all the products installed in the current BEA Home directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistryInfoImpl

public RegistryInfoImpl(java.lang.String beaHomeDir)
                 throws java.lang.IllegalArgumentException,
                        RegistryParsingException
Creates a RegistryInfoImpl instance describing registry information for the given BEA Home directory.

Parameters:
beaHomeDir - The absolute path to the BEA Home directory
Throws:
java.lang.IllegalArgumentException - if the parameter is null, or is an empty string, or if the parameter beaHomeDir does not exist in the file system.
RegistryParsingException - if there is an error parsing the registry
Method Detail

getJavaVendor

public java.lang.String getJavaVendor(java.lang.String javaHome)
                               throws java.lang.IllegalArgumentException
For a given Java home, returns the vendor of the JVM.

Specified by:
getJavaVendor in interface RegistryInfo
Parameters:
javaHome - The absolute location to the Java home
Returns:
The vendor of the JVM installed at the given location
Throws:
java.lang.IllegalArgumentException - if the parameter is null or is an empty string

getJavaVersion

public java.lang.String getJavaVersion(java.lang.String javaHome)
                                throws java.lang.IllegalArgumentException
Given a Java home, returns the JVM version

Specified by:
getJavaVersion in interface RegistryInfo
Parameters:
javaHome - The absolute location of the Java home
Returns:
The version of the JVM installed at the given location
Throws:
java.lang.IllegalArgumentException - if the parameter is null or is an empty string

getProductInfo

public ProductInfo getProductInfo(java.lang.String productName,
                                  java.lang.String productVersion)
                           throws java.lang.IllegalArgumentException
Returns an object containing information about the installed product that matches the parameters supplied. If the product is not found, this method returns a null value.

Specified by:
getProductInfo in interface RegistryInfo
Parameters:
productName - The name of the product to return
productVersion - The product version. For example: 7.0, 8.1, or 9.0.
Returns:
The ProductInfo object, which contains the product information, or null if no match is found
Throws:
java.lang.IllegalArgumentException - if the parameter is either null or is an empty string

getProductInfos

public ProductInfo[] getProductInfos()
Returns information about all the products installed in the current BEA Home directory. Each product is identified by a combination of the product name and version. If there are multiple versions of the same product installed, a ProductInfo object is returned for each product version.

Specified by:
getProductInfos in interface RegistryInfo
Returns:
An array of ProductInfo objects, which contains the information for all the products installed.

getJavaHomes

public java.lang.String[] getJavaHomes()
Returns the locations of all Java installations in the current BEA Home directory.

Specified by:
getJavaHomes in interface RegistryInfo
Returns:
An array of String containing the Java homes that are installed in the current BEA Home directory.

getBEAHomes

public static java.lang.String[] getBEAHomes()
Returns a list of all BEA Home directories on the current machine.

Returns:
An array of String objects, each representing a BEA Home directory, or null if no BEA Home directories are found


Copyright © 2004 BEA Systems, Inc. All Rights Reserved.