com.ibm.websphere.product

Class WASDirectory

  1. java.lang.Object
  2. extended bycom.ibm.websphere.product.WASDirectory

  1. public class WASDirectory
  2. extends java.lang.Object
WASDirectory provides an interface into the product version information. For example, Product Name, Edition, Build Number, Build Date etc. This class contains methods that replaced deprecated methods in WASProduct class.
Version:
8.0

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
ID_BASE
Deprecated. Since V8.0
  1. static
  2. java.lang.String
ID_CLIENT
Deprecated. Since V8.0
  1. static
  2. java.lang.String
ID_EMBEDDED_EXPRESS
Deprecated. Since V8.0
  1. static
  2. java.lang.String
ID_EXPRESS
Deprecated. Since V8.0
  1. static
  2. java.lang.String
ID_IHS
Deprecated. Since V8.0
  1. static
  2. java.lang.String
ID_JDK
Deprecated. Since V8.0
  1. static
  2. java.lang.String
ID_ND
Deprecated. Since V8.0
  1. static
  2. java.lang.String
ID_NDDMZ
Deprecated. Since V8.0
  1. static
  2. java.lang.String
ID_PLUGIN
Deprecated. Since V8.0
  1. static
  2. java.lang.String
ID_PME
Deprecated. Since V8.0
  1. static
  2. java.lang.String
ID_WBI
Deprecated. Since V8.0
  1. static
  2. java.lang.String
ID_WXD
Deprecated. Since V8.0
  1. static
  2. java.lang.String
ID_XD
Deprecated. Since V8.0

Constructor Summary

Constructor and Description
WASDirectory()
Constructor for WASDirectory.
WASDirectory(java.lang.String wasLocation)
Constructor for WASDirectory.

Method Summary

Modifier and Type Method and Description
  1. java.lang.String
getArch()
IBM WEBSPHERE INTERNAL USE ONLY.
  1. java.lang.String
getArchFromNativeFile()
Deprecated. As of WAS v8.0. Replaced by getArch().
  1. java.lang.String
getBuildDate(java.lang.String id)
Get the build date of the WAS product with the specific id.
  1. java.lang.String
getBuildLevel(java.lang.String id)
Get the build level of the WAS product with the specific id.
  1. IMEvent[]
getHistoryEventList()
Return a list of history event objects.
  1. com.ibm.websphere.product.metadata.WASMaintenancePackage[]
getHistoryMaintenancePackageList()
Deprecated. As of WAS v8.0
  1. com.ibm.websphere.product.metadata.WASMaintenancePackage[]
getHistoryMaintenancePackageListFromV7Metadata()
Deprecated. As of WAS v8.0
  1. java.lang.String
getIMLogLocation()
Return the log directory path associated with this install location.
  1. com.ibm.websphere.product.metadata.WASComponent
getInstalledComponentByName(java.lang.String componentName)
Deprecated. Since WAS v8.0.
  1. com.ibm.websphere.product.metadata.WASComponent[]
getInstalledComponentList()
Deprecated. Since WAS v8.0.
  1. com.ibm.websphere.product.metadata.WASMaintenancePackage
getInstalledMaintenancePackageByID(java.lang.String mpID)
Deprecated. As of WAS v8.0
  1. com.ibm.websphere.product.metadata.WASMaintenancePackage[]
getInstalledMaintenancePackageList()
Deprecated. As of WAS v8.0.
  1. IMOffering
getInstalledOfferingByID(java.lang.String productID)
Return an installed IMOffering objects based on product ID.
  1. IMOffering[]
getInstalledOfferingList()
Return a list of installed IMOffering objects.
  1. protected
  2. java.lang.String
getLibraryFilePathByPlatform(java.lang.String os,java.lang.String sInstallRootPath)
IBM WEBSPHERE INTERNAL USE ONLY.
  1. java.lang.String
getName(java.lang.String id)
Get the name of the WASProductInfo with the specific id.
  1. java.lang.String
getOfficialArchName()
IBM WEBSPHERE INTERNAL USE ONLY.
  1. java.lang.String
getOfficialArchNameFromNativeFile()
Deprecated. As of WAS v8.0. Replaced by getOfficialArchName()
  1. com.ibm.websphere.product.WASRegistrarInfo
getRegistrarById(java.lang.String id)
Returns a WASRegistrarInfo for the registrar with the specified id, or null if no such registrar exists.
  1. java.util.List<java.lang.String>
getRegistrarFileNames()
Get the list of .registrar file names in the WASDirectory.
  1. java.util.List<com.ibm.websphere.product.WASRegistrarInfo>
getRegistrarInstances()
Get the WASRegistrarInfo instances in the WASDirectory.
  1. java.lang.String
getVersion(java.lang.String id)
Get the version of the WAS product with the specific id.
  1. java.lang.String
getWasLocation()
Get the installation location of the WAS product.
  1. WASProductInfo
getWASProductInfo(java.lang.String id)
Get the WASProductInfo with the specific id in the WASDirectory.
  1. WASProductInfo[]
getWASProductInfoInstances()
Get the WASProductInfo instances in the WASDirectory.
  1. protected
  2. void
init(java.lang.String wasLocation)
IBM WEBSPHERE INTERNAL USE ONLY.
  1. protected
  2. void
init(java.lang.String wasLocation,boolean initMetadatInstance)
IBM WEBSPHERE INTERNAL USE ONLY.
  1. protected
  2. boolean
initMetadataInstance()
IBM WEBSPHERE INTERNAL USE ONLY.
  1. boolean
isComponentInstalled(java.lang.String componentName)
Deprecated. As of WAS v8.0.
  1. boolean
isInstallMetadataExist()
IBM WEBSPHERE INTERNAL USE ONLY.
  1. boolean
isMaintenancePackageInstalled(java.lang.String ID)
Deprecated. As of WAS v8.0.
  1. boolean
isRegistrarPresent(java.lang.String id)
Determines if a registrar with the specified id exists.
  1. boolean
isThisProductInstalled(java.lang.String id)
Checks if a specific product exists.
  1. static
  2. boolean
refreshCache()
IBM WEBSPHERE INTERNAL USE ONLY.
  1. static
  2. boolean
refreshProductInfoCache()
IBM WEBSPHERE INTERNAL USE ONLY.
  1. protected
  2. void
setLogger(com.ibm.websphere.product.logger.WASDirectoryLogger logger)
IBM WEBSPHERE INTERNAL USE ONLY.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

ID_BASE

  1. public static final java.lang.String ID_BASE
Deprecated. Since V8.0
Product ID: BASE edition
See Also:

ID_EXPRESS

  1. public static final java.lang.String ID_EXPRESS
Deprecated. Since V8.0
Product ID: EXPRESS edition
See Also:

ID_ND

  1. public static final java.lang.String ID_ND
Deprecated. Since V8.0
Product ID: ND edition
See Also:

ID_NDDMZ

  1. public static final java.lang.String ID_NDDMZ
Deprecated. Since V8.0
Product ID: NDDMZ edition
See Also:

ID_PME

  1. public static final java.lang.String ID_PME
Deprecated. Since V8.0
Product ID: PME
See Also:

ID_WBI

  1. public static final java.lang.String ID_WBI
Deprecated. Since V8.0
Product ID: WBI
See Also:

ID_JDK

  1. public static final java.lang.String ID_JDK
Deprecated. Since V8.0
Product ID: JDK
See Also:

ID_EMBEDDED_EXPRESS

  1. public static final java.lang.String ID_EMBEDDED_EXPRESS
Deprecated. Since V8.0
Product ID: embeddedEXPRESS edition
See Also:

ID_XD

  1. public static final java.lang.String ID_XD
Deprecated. Since V8.0
Product ID: XD edition
See Also:

ID_CLIENT

  1. public static final java.lang.String ID_CLIENT
Deprecated. Since V8.0
Product ID: CLIENT installer
See Also:

ID_PLUGIN

  1. public static final java.lang.String ID_PLUGIN
Deprecated. Since V8.0
Product ID: PLUGIN installer
See Also:

ID_IHS

  1. public static final java.lang.String ID_IHS
Deprecated. Since V8.0
Product ID: IHS installer
See Also:

ID_WXD

  1. public static final java.lang.String ID_WXD
Deprecated. Since V8.0
Product ID: WXD edition
See Also:

Constructor Detail

WASDirectory

  1. public WASDirectory()
  2. throws java.io.FileNotFoundException
  3. java.io.IOException
  4. javax.xml.parsers.ParserConfigurationException
  5. org.xml.sax.SAXException
  6. WASDirectoryException
Constructor for WASDirectory. The product instances retrieved are from cache.

Throws:
java.io.FileNotFoundException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

WASDirectory

  1. public WASDirectory(java.lang.String wasLocation)
Constructor for WASDirectory. The product instances retrieved are from cache.

Parameters:
wasLocation - the installation location of the WAS product.

Method Detail

getRegistrarInstances

  1. public java.util.List<com.ibm.websphere.product.WASRegistrarInfo> getRegistrarInstances( )
Get the WASRegistrarInfo instances in the WASDirectory. The WASRegistrarInfo instances retrieved are from a cache.
Returns:
List of registrar instances.

getRegistrarFileNames

  1. public java.util.List<java.lang.String> getRegistrarFileNames( )
Get the list of .registrar file names in the WASDirectory. The List of file names is returned from a cache.
Returns:
List of .registrar file names.

getRegistrarById

  1. public com.ibm.websphere.product.WASRegistrarInfo getRegistrarById( java.lang.String id)
Returns a WASRegistrarInfo for the registrar with the specified id, or null if no such registrar exists.
Parameters:
id - The registrar ID to return a WASRegistrarInfo for.
Returns:
A WASRegistrarInfo object that represents the registrar specified by the id, or null if no such registrar exists.

isRegistrarPresent

  1. public boolean isRegistrarPresent( java.lang.String id)
Determines if a registrar with the specified id exists.
Parameters:
id - The registrar id to look for.
Returns:
true if the registrar exists, or false otherwise.

getWASProductInfoInstances

  1. public WASProductInfo[] getWASProductInfoInstances( )
Get the WASProductInfo instances in the WASDirectory. The product info instances retrieved are from cache.
Returns:
Array of WASProductInfo instances

getWASProductInfo

  1. public WASProductInfo getWASProductInfo( java.lang.String id)
Get the WASProductInfo with the specific id in the WASDirectory. The product info retrieved is from cache.
Parameters:
id - the id of the WAS product.
Returns:
The WASProductInfo instance.

isThisProductInstalled

  1. public boolean isThisProductInstalled( java.lang.String id)
Checks if a specific product exists. The product info retrieved is from cache.
Parameters:
id - The product ID to be checked.
Returns:
true if the specific product is found to be exists; otherwise, return false.

getName

  1. public java.lang.String getName( java.lang.String id)
Get the name of the WASProductInfo with the specific id. The name retrieved is from cache.
Parameters:
id - the id of the WAS product.
Returns:
The name of the WAS product with the specific id.

getVersion

  1. public java.lang.String getVersion( java.lang.String id)
Get the version of the WAS product with the specific id. The version retrieved is from cache.
Parameters:
id - the id of the WAS product.
Returns:
The version of the WAS product with the specific id.

getBuildDate

  1. public java.lang.String getBuildDate( java.lang.String id)
Get the build date of the WAS product with the specific id. The build date retrieved is from cache.
Parameters:
id - the id of the WAS product.
Returns:
The date of the WAS product with the specific id.

getBuildLevel

  1. public java.lang.String getBuildLevel( java.lang.String id)
Get the build level of the WAS product with the specific id. The build level retrieved is from cache.
Parameters:
id - the id of the WAS product.
Returns:
The build level of the WAS product with the specific id.

getWasLocation

  1. public java.lang.String getWasLocation( )
Get the installation location of the WAS product.
Returns:
The installation location of the WAS product.

getIMLogLocation

  1. public java.lang.String getIMLogLocation( )
Return the log directory path associated with this install location.

Returns:
The log directory path associated with this install location. If there is problem in getting IMMetadata, empty string is returned.

refreshProductInfoCache

  1. public static boolean refreshProductInfoCache( )
IBM WEBSPHERE INTERNAL USE ONLY. Refresh ProductInfo cache.

Returns:
true or false

refreshCache

  1. public static boolean refreshCache( )
IBM WEBSPHERE INTERNAL USE ONLY. Refresh WASMetadata and IMMetadata cache. Existing WASDirectory instances in the current JVM are not usable.

Returns:
true or false

getOfficialArchNameFromNativeFile

  1. public java.lang.String getOfficialArchNameFromNativeFile( )
Deprecated. As of WAS v8.0. Replaced by getOfficialArchName()
IBM WEBSPHERE INTERNAL USE ONLY. Return the official architecture name from OS name and architecture keyword.

Returns:
The official architecture name from OS name and architecture keyword. If the official architecture name is not found, then the architecture keyword is returned. Null is returned if exceptions are caught.

getArchFromNativeFile

  1. public java.lang.String getArchFromNativeFile( )
  2. throws java.io.IOException
Deprecated. As of WAS v8.0. Replaced by getArch().
IBM WEBSPHERE INTERNAL USE ONLY. Get the architecture of product from native file. This method is not applicable to UPDI because UPDI does not carry any native library file.

Returns:
The architecture of product from native file. Return null if unsupported platform or architecture is detected.

Throws:
java.io.IOException

getOfficialArchName

  1. public java.lang.String getOfficialArchName( )
IBM WEBSPHERE INTERNAL USE ONLY. Return the official architecture name from OS name and architecture keyword.

Returns:
The official architecture name from OS name and architecture keyword. If the official architecture name is not found, then the architecture keyword is returned. Null is returned if exceptions are caught.

getArch

  1. public java.lang.String getArch( )
  2. throws java.io.IOException
IBM WEBSPHERE INTERNAL USE ONLY. Get the architecture of product based on JRE architecture.

Returns:
The architecture of installed product. Return null if unsupported platform or architecture is detected.

Throws:
java.io.IOException

getInstalledOfferingList

  1. public IMOffering[] getInstalledOfferingList( )
  2. throws java.io.FileNotFoundException
  3. java.io.IOException
  4. javax.xml.parsers.ParserConfigurationException
  5. org.xml.sax.SAXException
Return a list of installed IMOffering objects.

Returns:
A a list of installed IMOffering objects.

Throws:
java.io.FileNotFoundException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

isInstallMetadataExist

  1. public boolean isInstallMetadataExist( )
IBM WEBSPHERE INTERNAL USE ONLY.

getInstalledOfferingByID

  1. public IMOffering getInstalledOfferingByID( java.lang.String productID)
  2. throws java.io.FileNotFoundException
  3. java.io.IOException
  4. javax.xml.parsers.ParserConfigurationException
  5. org.xml.sax.SAXException
Return an installed IMOffering objects based on product ID.

Parameters:
productID - The product ID of interest.

Returns:
An installed IMOffering objects based on product ID.

Throws:
java.io.FileNotFoundException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

getHistoryEventList

  1. public IMEvent[] getHistoryEventList( )
  2. throws java.io.FileNotFoundException
  3. java.io.IOException
  4. javax.xml.parsers.ParserConfigurationException
  5. org.xml.sax.SAXException
Return a list of history event objects.

Returns:
A a list of history event objects.

Throws:
java.io.FileNotFoundException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

getInstalledComponentByName

  1. public com.ibm.websphere.product.metadata.WASComponent getInstalledComponentByName( java.lang.String componentName)
  2. throws java.io.FileNotFoundException
  3. java.io.IOException
  4. javax.xml.parsers.ParserConfigurationException
  5. org.xml.sax.SAXException
Deprecated. Since WAS v8.0.
Return installed component by component name.

Parameters:
componentName - The name of the component to be retrieved.

Returns:
Installed component by component name. Return null if error occurs or install root location is not valid.

Throws:
java.io.FileNotFoundException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

getInstalledComponentList

  1. public com.ibm.websphere.product.metadata.WASComponent[] getInstalledComponentList( )
  2. throws java.io.FileNotFoundException
  3. java.io.IOException
  4. javax.xml.parsers.ParserConfigurationException
  5. org.xml.sax.SAXException
Deprecated. Since WAS v8.0.
Return installed component objects list.

Returns:
Installed component objects list. Return empty array if error occurs or install root location is not valid.

Throws:
java.io.FileNotFoundException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

getHistoryMaintenancePackageList

  1. public com.ibm.websphere.product.metadata.WASMaintenancePackage[] getHistoryMaintenancePackageList( )
  2. throws java.io.FileNotFoundException
  3. java.io.IOException
  4. javax.xml.parsers.ParserConfigurationException
  5. org.xml.sax.SAXException
Deprecated. As of WAS v8.0
Return the maintenace packages objects list in the history xml file.

Returns:
The maintenace packages objects list in the history xml file. Return empty array if error occurs or install root location is not valid.

Throws:
java.io.FileNotFoundException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

getInstalledMaintenancePackageByID

  1. public com.ibm.websphere.product.metadata.WASMaintenancePackage getInstalledMaintenancePackageByID( java.lang.String mpID)
  2. throws java.io.FileNotFoundException
  3. java.io.IOException
  4. javax.xml.parsers.ParserConfigurationException
  5. org.xml.sax.SAXException
Deprecated. As of WAS v8.0
Return installed maintenance package by maintenance package ID.

Parameters:
mpID - The maintenance package ID of the maintenance package to be retrieved.

Returns:
Installed maintenance package by maintenance package ID. Return null if error occurs or install root location is not valid.

Throws:
java.io.FileNotFoundException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

getInstalledMaintenancePackageList

  1. public com.ibm.websphere.product.metadata.WASMaintenancePackage[] getInstalledMaintenancePackageList( )
  2. throws java.io.FileNotFoundException
  3. java.io.IOException
  4. javax.xml.parsers.ParserConfigurationException
  5. org.xml.sax.SAXException
Deprecated. As of WAS v8.0.
Return installed maintenance package objects list.

Returns:
Installed maintenance package objects list. Return null if error occurs or install root location is not valid.

Throws:
java.io.FileNotFoundException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

isComponentInstalled

  1. public boolean isComponentInstalled( java.lang.String componentName)
  2. throws java.io.FileNotFoundException
  3. java.io.IOException
  4. javax.xml.parsers.ParserConfigurationException
  5. org.xml.sax.SAXException
Deprecated. As of WAS v8.0.
Return true if the named component is installed. Else return false.

Parameters:
componentName - The component name.

Returns:
true if the named component is installed. Else return false.
Throws:
java.io.FileNotFoundException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

isMaintenancePackageInstalled

  1. public boolean isMaintenancePackageInstalled( java.lang.String ID)
  2. throws java.io.FileNotFoundException
  3. java.io.IOException
  4. javax.xml.parsers.ParserConfigurationException
  5. org.xml.sax.SAXException
Deprecated. As of WAS v8.0.
Return true if the named maintenance package is installed. Else return false.

Parameters:
ID - The maintenance package ID.

Returns:
true if the named maintenance package is installed. Else return false.
Throws:
java.io.FileNotFoundException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

getHistoryMaintenancePackageListFromV7Metadata

  1. public com.ibm.websphere.product.metadata.WASMaintenancePackage[] getHistoryMaintenancePackageListFromV7Metadata( )
  2. throws java.io.FileNotFoundException
  3. java.io.IOException
  4. javax.xml.parsers.ParserConfigurationException
  5. org.xml.sax.SAXException
Deprecated. As of WAS v8.0
IBM WEBSPHERE INTERNAL USE ONLY.
Throws:
java.io.FileNotFoundException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

getLibraryFilePathByPlatform

  1. protected java.lang.String getLibraryFilePathByPlatform( java.lang.String os,
  2. java.lang.String sInstallRootPath)
IBM WEBSPHERE INTERNAL USE ONLY. Return the library path used for checking architecture.

Parameters:
os - The OS/platform keyword.
Returns:
The library path used for checking architecture.

init

  1. protected void init(java.lang.String wasLocation)
IBM WEBSPHERE INTERNAL USE ONLY. Initialized the WASDirectory instance and init the logger object.

Parameters:
wasLocation - The install location.

init

  1. protected void init(java.lang.String wasLocation,
  2. boolean initMetadatInstance)
IBM WEBSPHERE INTERNAL USE ONLY. Initialized the WASDirectory instance and init the logger object.

Parameters:
wasLocation - The install location.

initMetadataInstance

  1. protected boolean initMetadataInstance( )
  2. throws java.io.FileNotFoundException
  3. java.io.IOException
  4. javax.xml.parsers.ParserConfigurationException
  5. org.xml.sax.SAXException
IBM WEBSPHERE INTERNAL USE ONLY. Init the WASMetadata instance if it's not initialized yet. Return true if the instance is initialized properly. Else return false.

Throws:
java.io.FileNotFoundException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

setLogger

  1. protected void setLogger(com.ibm.websphere.product.logger.WASDirectoryLogger logger)
IBM WEBSPHERE INTERNAL USE ONLY. Set the logger object for this WASMetadata instance.

Parameters:
logger - The logger object for this WASMetadata instance.