com.ibm.websphere.management.metadata

Class ManagedObjectMetadataHelper

  1. java.lang.Object
  2. extended bycom.ibm.websphere.management.metadata.ManagedObjectMetadataHelper

  1. public class ManagedObjectMetadataHelper
  2. extends java.lang.Object
This class contains convenience constants and methods to perform queries on base managed object metadata properties.

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
BASE_WAS_APP_ACTIVATION_PLANS
Constant for the property name for the base application activation plans.
  1. static
  2. java.lang.String
BASE_WAS_PRODUCT_SHORT_NAME
Constant for the property name for the base product's short name.
  1. static
  2. java.lang.String
BASE_WAS_PRODUCT_VERSION
Constant for the property name for the base product version.
  1. static
  2. java.lang.String
NODE_DEPLOYED_FEATURES
Constant for the property name for the node deployed features.
  1. static
  2. java.lang.String
NODE_OS
Constant for the property name for the operating system of the node associated with a set of metadata.
  1. static
  2. java.lang.String
NODE_OS_AIX
Constant for the node operating system property value for AIX.
  1. static
  2. java.lang.String
NODE_OS_AS400
Constant for the node operating system property value for OS/400.
  1. static
  2. java.lang.String
NODE_OS_HPUX
Constant for the node operating system property value for HP-UX.
  1. static
  2. java.lang.String
NODE_OS_LINUX
Constant for the node operating system property value for Linux.
  1. static
  2. java.lang.String
NODE_OS_SOLARIS
Constant for the node operating system property value for Solaris.
  1. static
  2. java.lang.String
NODE_OS_WINDOWS
Constant for the node operating system property value for Windows.
  1. static
  2. java.lang.String
NODE_OS_ZOS
Constant for the node operating system property value for z/OS.
  1. static
  2. java.lang.String
NODE_SYSPLEX_NAME
Constant for the property name for the node sysplex name.
  1. static
  2. java.lang.String
PLUGGABLE_SDK_ATTR_BITS
  1. static
  2. java.lang.String
PLUGGABLE_SDK_ATTR_LOCATION
  1. static
  2. java.lang.String
PLUGGABLE_SDK_ATTR_PLATFORM
  1. static
  2. java.lang.String
PLUGGABLE_SDK_ATTR_VERSION
  1. static
  2. java.lang.String
PLUGGABLE_SDK_PREFIX
Constants for the property name for the pluggable SDK support.

Constructor Summary

Constructor and Description
ManagedObjectMetadataHelper(ManagedObjectMetadataAccessor metadataAccessor)
Constructs a ManagedObjectMetadataHelper instance.

Method Summary

Modifier and Type Method and Description
  1. int
compareNodeVersion(java.lang.String nodeName,java.lang.String version)
Compares the WebSphere version for a node with the input version.
  1. ManagedObjectMetadataAccessor
getAccessor()
This method returns the ManagedObjectMetadataAccessor instance used to construct this helper.
  1. java.lang.String[]
getAvailableSDKsOnNode(java.lang.String nodeName)
This method lists names for all available SDKs.
  1. java.lang.String
getNodeBaseProductShortName(java.lang.String nodeName)
Returns the version of WebSphere Base product installation for a given node.
  1. java.lang.String
getNodeBaseProductVersion(java.lang.String nodeName)
Returns the version of WebSphere Base product installation for a given node.
  1. java.util.ArrayList
getNodeDeployedFeatures(java.lang.String nodeName)
Returns the list of features for the given node.
  1. java.lang.String
getNodeMajorVersion(java.lang.String nodeName)
Returns the major version of WebSphere Base product installation for a given node.
  1. java.lang.String
getNodeMinorVersion(java.lang.String nodeName)
Returns the minor version of WebSphere installation for a given node.
  1. java.lang.String
getNodePlatformOS(java.lang.String nodeName)
Returns the operating system name for a given node.
  1. java.util.Properties
getNodeProductsAndVersions(java.lang.String nodeName)
Obtains all products and versions for installed products on the specified node (which can be a dmgr or a node).
  1. java.util.SortedMap
getNodeProductVersions(java.lang.String nodeName)
This method combines all product name and product versions contained the set of metadata properties for the specified node and stores them in the form of a map from product name to product version such that the mapping is sorted by product name.
  1. java.lang.String
getNodeServiceVersion(java.lang.String nodeName)
Returns the service version of WebSphere installation for a given node.
  1. java.lang.String
getNodeSysplexName(java.lang.String nodeName)
Returns the sysplex name for a given node.
  1. java.lang.String
getNodeUpdateVersion(java.lang.String nodeName)
Returns the update version of WebSphere installation for a given node.
  1. java.lang.String
getSDKBits(java.lang.String nodeName,java.lang.String sdkName)
This method obtains the location of a given SDK for a given node The method throws MetadataNotAvailableException for a Pre-V8 node not on ZOS as there is no SDK property available for such a node.
  1. java.lang.String
getSDKLocation(java.lang.String nodeName,java.lang.String sdkName)
This method obtains the location of a given SDK for a given node The method throws MetadataNotAvailableException for a Pre-V8 node on OS400 as there is no SDK property available for such a node.
  1. java.util.Properties
getSDKPropertiesOnNode(java.lang.String nodeName,java.lang.String sdkName,java.lang.String[] sdkAttributes)
This method lists the properties for all available SDKs.
  1. java.lang.String
getSDKVersion(java.lang.String nodeName,java.lang.String sdkName)
This method obtains the location of a given SDK for a given node The method throws MetadataNotAvailableException for a Pre-V8 node on OS400 as there is no SDK property available for such a node.
  1. boolean
isNodeOS400(java.lang.String nodeName)
Tests whether a given node is running on the OS/400 platform.
  1. boolean
isNodeZOS(java.lang.String nodeName)
Tests whether a given node is running on the z/OS platform.
  1. java.util.ArrayList
listRuntimeComponents(java.lang.String nodeName)
This method lists all runtime components of a set of node metadata properties for all WebSphere Application Server Base and stack products for the specified node and stores them in the form of ArrayList.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

BASE_WAS_PRODUCT_VERSION

  1. public static final java.lang.String BASE_WAS_PRODUCT_VERSION
Constant for the property name for the base product version. Product version values are simple integers delimited by periods which include the major, minor, update, and service versions. For example, in version "6.1.2.3", the major version is "6", the minor version is "1", the update version is "2", and the service version is "3".

The base product version should always contain at least the major version, but lesser versions may not be included if they are not known. A base product version which is not fully qualified is most likely to occur on version 5 nodes which are members of a cell which has been migrated to version 6.

The value for this constant is "com.ibm.websphere.baseProductVersion".

See Also:

BASE_WAS_PRODUCT_SHORT_NAME

  1. public static final java.lang.String BASE_WAS_PRODUCT_SHORT_NAME
Constant for the property name for the base product's short name. The short name is more convenient in space-limited applications than the product's full name.

The value for this constant is "com.ibm.websphere.baseProductShortName".

See Also:

BASE_WAS_APP_ACTIVATION_PLANS

  1. public static final java.lang.String BASE_WAS_APP_ACTIVATION_PLANS
Constant for the property name for the base application activation plans.

The value for this constant is "com.ibm.websphere.baseRuntimeComponents".

See Also:

NODE_OS

  1. public static final java.lang.String NODE_OS
Constant for the property name for the operating system of the node associated with a set of metadata.

The value for this constant is "com.ibm.websphere.nodeOperatingSystem".

See Also:

NODE_OS_AS400

  1. public static final java.lang.String NODE_OS_AS400
Constant for the node operating system property value for OS/400.

The value for this constant is "os400".

See Also:

NODE_OS_AIX

  1. public static final java.lang.String NODE_OS_AIX
Constant for the node operating system property value for AIX.

The value for this constant is "aix".

See Also:

NODE_OS_HPUX

  1. public static final java.lang.String NODE_OS_HPUX
Constant for the node operating system property value for HP-UX.

The value for this constant is "hpux".

See Also:

NODE_OS_LINUX

  1. public static final java.lang.String NODE_OS_LINUX
Constant for the node operating system property value for Linux.

The value for this constant is "linux".

See Also:

NODE_OS_SOLARIS

  1. public static final java.lang.String NODE_OS_SOLARIS
Constant for the node operating system property value for Solaris.

The value for this constant is "solaris".

See Also:

NODE_OS_WINDOWS

  1. public static final java.lang.String NODE_OS_WINDOWS
Constant for the node operating system property value for Windows.

The value for this constant is "windows".

See Also:

NODE_OS_ZOS

  1. public static final java.lang.String NODE_OS_ZOS
Constant for the node operating system property value for z/OS.

The value for this constant is "os390".

See Also:

NODE_SYSPLEX_NAME

  1. public static final java.lang.String NODE_SYSPLEX_NAME
Constant for the property name for the node sysplex name. This value applies only to nodes which are running on the z/OS operating system platform. This property is not defined if the node operating system is anything other than z/OS.

The value for this constant is "com.ibm.websphere.nodeSysplexName".

See Also:

NODE_DEPLOYED_FEATURES

  1. public static final java.lang.String NODE_DEPLOYED_FEATURES
Constant for the property name for the node deployed features. The value for this property is a comma-separated list of features that have been deployed on the corresponding node.

The value for this constant is "com.ibm.websphere.deployed.features".

See Also:

PLUGGABLE_SDK_PREFIX

  1. public static final java.lang.String PLUGGABLE_SDK_PREFIX
Constants for the property name for the pluggable SDK support.

The value for this constant is "com.ibm.websphere.sdk.*".

See Also:

PLUGGABLE_SDK_ATTR_VERSION

  1. public static final java.lang.String PLUGGABLE_SDK_ATTR_VERSION
See Also:

PLUGGABLE_SDK_ATTR_BITS

  1. public static final java.lang.String PLUGGABLE_SDK_ATTR_BITS
See Also:

PLUGGABLE_SDK_ATTR_LOCATION

  1. public static final java.lang.String PLUGGABLE_SDK_ATTR_LOCATION
See Also:

PLUGGABLE_SDK_ATTR_PLATFORM

  1. public static final java.lang.String PLUGGABLE_SDK_ATTR_PLATFORM
See Also:

Constructor Detail

ManagedObjectMetadataHelper

  1. public ManagedObjectMetadataHelper( ManagedObjectMetadataAccessor metadataAccessor)
  2. throws AdminException
Constructs a ManagedObjectMetadataHelper instance. The instance uses the specified ManagedObjectMetadataAccessor reference to obtain the required metadata properties.
Parameters:
metadataAccessor - Managed object metadata accessor.
Throws:
AdminException - Could not create a ManagedObjectMetadataHelper, most likely due to an invalid argument.

Method Detail

getAccessor

  1. public ManagedObjectMetadataAccessor getAccessor( )
  2. throws AdminException
This method returns the ManagedObjectMetadataAccessor instance used to construct this helper.
Returns:
metadataAccessor Managed object metadata accessor used by this helper.
Throws:
AdminException - Could not complete requested operation.

getNodeMajorVersion

  1. public java.lang.String getNodeMajorVersion( java.lang.String nodeName)
  2. throws AdminException
Returns the major version of WebSphere Base product installation for a given node.
Parameters:
nodeName - The name of the node for the metadata returned by this method.
Returns:
WebSphere major version for the node.
Throws:
com.ibm.websphere.management.exception.MetadataNotAvailableException - Either the base node version metadata does not exist in the set of metadata properties for the specified node, or the major version is not specified in the base node version metadata.
AdminException - Metadata for the specified node could not be obtained or an input value was invalid.

getNodeMinorVersion

  1. public java.lang.String getNodeMinorVersion( java.lang.String nodeName)
  2. throws AdminException
Returns the minor version of WebSphere installation for a given node.
Parameters:
nodeName - The name of the node for the metadata returned by this method.
Returns:
WebSphere minor version for the node.
Throws:
com.ibm.websphere.management.exception.MetadataNotAvailableException - Either the base node version metadata does not exist in the set of metadata properties for the specified node, or the minor version is not specified in the base node version metadata.
AdminException - Metadata for the specified node could not be obtained or an input value was invalid.

getNodeUpdateVersion

  1. public java.lang.String getNodeUpdateVersion( java.lang.String nodeName)
  2. throws AdminException
Returns the update version of WebSphere installation for a given node. For example, in a base product version of 6.1.2.3, the update version is "2".
Parameters:
nodeName - The name of the node for the metadata returned by this method.
Returns:
WebSphere update version for the node.
Throws:
com.ibm.websphere.management.exception.MetadataNotAvailableException - Either the base node version metadata does not exist in the set of metadata properties for the specified node, or the update version is not specified in the base node version metadata.
AdminException - Metadata for the specified node could not be obtained or an input value was invalid.

getNodeServiceVersion

  1. public java.lang.String getNodeServiceVersion( java.lang.String nodeName)
  2. throws AdminException
Returns the service version of WebSphere installation for a given node. For example, in a base product version of 6.1.2.3, the update version is "3".
Parameters:
nodeName - The name of the node for the metadata returned by this method.
Returns:
WebSphere service version for the node.
Throws:
com.ibm.websphere.management.exception.MetadataNotAvailableException - Either the base node version metadata does not exist in the set of metadata properties for the specified node, or the service version is not specified in the base node version metadata.
AdminException - Metadata for the specified node could not be obtained or an input value was invalid.

getNodeBaseProductVersion

  1. public java.lang.String getNodeBaseProductVersion( java.lang.String nodeName)
  2. throws AdminException
Returns the version of WebSphere Base product installation for a given node. This is concatenation of major and minor versions.
Parameters:
nodeName - The name of the node for the metadata returned by this method.
Returns:
WebSphere version for the node.
Throws:
com.ibm.websphere.management.exception.MetadataNotAvailableException - Requested metadata does not exist in the set of metadata properties for the specified node.
AdminException - Metadata for the specified node could not be obtained or an input value was invalid.

getNodeBaseProductShortName

  1. public java.lang.String getNodeBaseProductShortName( java.lang.String nodeName)
  2. throws AdminException
Returns the version of WebSphere Base product installation for a given node. This is concatenation of major and minor versions.
Parameters:
nodeName - The name of the node for the metadata returned by this method.
Returns:
WebSphere version for the node.
Throws:
com.ibm.websphere.management.exception.MetadataNotAvailableException - Requested metadata does not exist in the set of metadata properties for the specified node.
AdminException - Metadata for the specified node could not be obtained or an input value was invalid.

compareNodeVersion

  1. public int compareNodeVersion(java.lang.String nodeName,
  2. java.lang.String version)
  3. throws AdminException
Compares the WebSphere version for a node with the input version.
Parameters:
nodeName - The name of the node for the metadata used by this method.
version - A String value of the WebSphere version to be compared.
Returns:
0 if node version matches the input version,
-1 if node version is smaller than the input version,
+1 is node version is higher than the input version.
Throws:
com.ibm.websphere.management.exception.MetadataNotAvailableException - Metadata required by this method does not exist in the set of metadata properties for the specified node.
AdminException - Metadata for the specified node could not be obtained or an input value was invalid.

isNodeZOS

  1. public boolean isNodeZOS(java.lang.String nodeName)
  2. throws AdminException
Tests whether a given node is running on the z/OS platform.
Parameters:
nodeName - The name of the node for the metadata used by this method.
Returns:
true if node operating system is z/OS, false otherwise.
Throws:
com.ibm.websphere.management.exception.MetadataNotAvailableException - Metadata required by this method does not exist in the set of metadata properties for the specified node.
AdminException - Metadata for the specified node could not be obtained or an input value was invalid.

isNodeOS400

  1. public boolean isNodeOS400(java.lang.String nodeName)
  2. throws AdminException
Tests whether a given node is running on the OS/400 platform.
Parameters:
nodeName - The name of the node for the metadata used by this method.
Returns:
true if node operating system is os400, false otherwise.
Throws:
com.ibm.websphere.management.exception.MetadataNotAvailableException - Metadata required by this method does not exist in the set of metadata properties for the specified node.
AdminException - Metadata for the specified node could not be obtained or an input value was invalid.

getNodePlatformOS

  1. public java.lang.String getNodePlatformOS( java.lang.String nodeName)
  2. throws AdminException
Returns the operating system name for a given node.
Parameters:
nodeName - The name of the node for the metadata returned by this method.
Returns:
The OS name of the given node.
Throws:
com.ibm.websphere.management.exception.MetadataNotAvailableException - Requested metadata does not exist in the set of metadata properties for the specified node.
AdminException - Metadata for the specified node could not be obtained or an input value was invalid.

getNodeSysplexName

  1. public java.lang.String getNodeSysplexName( java.lang.String nodeName)
  2. throws AdminException
Returns the sysplex name for a given node. This property only applies to nodes running on the z/OS operating system platform.
Parameters:
nodeName - The name of the node for the metadata returned by this method.
Returns:
The sysplex name of the given node.
Throws:
com.ibm.websphere.management.exception.MetadataNotAvailableException - Requested metadata does not exist in the set of metadata properties for the specified node.
AdminException - The metadata for the specified node could not be obtained or an input value was invalid.

getNodeProductVersions

  1. public java.util.SortedMap getNodeProductVersions( java.lang.String nodeName)
  2. throws AdminException
This method combines all product name and product versions contained the set of metadata properties for the specified node and stores them in the form of a map from product name to product version such that the mapping is sorted by product name.
Parameters:
nodeName - The name of the node for the version list returned by this method.
Returns:
A sorted map of product name to product version for all product names and versions in the metadata for the specified node.
Throws:
com.ibm.websphere.management.exception.MetadataNotAvailableException - Requested metadata does not exist in the set of metadata properties for the specified node.
AdminException - Metadata for the specified node could not be obtained or an input value was invalid.

getNodeDeployedFeatures

  1. public java.util.ArrayList getNodeDeployedFeatures( java.lang.String nodeName)
  2. throws AdminException
Returns the list of features for the given node.
Parameters:
nodeName - The name of the node for the features list returned by this method.
Returns:
The features list for the specified node. Each feature is a String and is a separate element in the ArrayList.
Throws:
com.ibm.websphere.management.exception.MetadataNotAvailableException - Requested metadata does not exist in the set of metadata properties for the specified node.
AdminException - The metadata for the specified node could not be obtained or an input value was invalid.

getNodeProductsAndVersions

  1. public java.util.Properties getNodeProductsAndVersions( java.lang.String nodeName)
  2. throws AdminException
Obtains all products and versions for installed products on the specified node (which can be a dmgr or a node). A product is the "short name" used in the product version field of node- metadata.properties and it becomes the key for a Properties object. For example, the product key for the field instance com.ibm.websphere.WebServicesFeaturePackProductVersion is "WebServices". The product version has the form "X.X.X.X".
Parameters:
nodeName - The name of the node for which data is to be retrieved.
Returns:
Properties. A Properties object. The key is the product name, and the associated value is the product version. These are the products installed on the node. Both the key and its associated value are String objects. The Properties object may he empty.
Throws:
AdminException - Metadata for specified node could not be obtained

listRuntimeComponents

  1. public java.util.ArrayList listRuntimeComponents( java.lang.String nodeName)
  2. throws AdminException
This method lists all runtime components of a set of node metadata properties for all WebSphere Application Server Base and stack products for the specified node and stores them in the form of ArrayList.
Parameters:
nodeName - The name of the node for the runtime components list returned by this method.
Returns:
The runtime components list for all WebSphere Application Server Base and Stack products in the node metadata properties for the specified node. Each runtime component is a String and is a separate element in the ArrayList. An emptry ArrayList is returned if there is no runtime component found.
Throws:
AdminException - The metadata for the specified node could not be obtained or an input value was invalid.

getAvailableSDKsOnNode

  1. public java.lang.String[] getAvailableSDKsOnNode( java.lang.String nodeName)
  2. throws AdminException
This method lists names for all available SDKs. Only those SDKs whose com.ibm.websphere.sdk.location properties points to a valid SDK installation are considered as a available SDK. The method throws MetadataNotAvailableException for a Pre-V8 node on OS400 as there is no SDK property available for such a node.
Parameters:
nodeName - The name of the node for the available SDKs properties returned by this method.
Returns:
The names for all available SDKs for the specified node:
Throws:
com.ibm.websphere.management.exception.MetadataNotAvailableException - Requested metadata does not exist in the set of metadata properties for the specified node.
AdminException - The metadata for the specified node could not be obtained or an input value was invalid.

getSDKPropertiesOnNode

  1. public java.util.Properties getSDKPropertiesOnNode( java.lang.String nodeName,
  2. java.lang.String sdkName,
  3. java.lang.String[] sdkAttributes)
  4. throws AdminException
This method lists the properties for all available SDKs. Only those SDKs whose com.ibm.websphere.sdk.location properties points to a valid SDK installation are considered as a available SDK. The method throws MetadataNotAvailableException for a Pre-V8 node on OS400 as there is no SDK property available for such a node.
Parameters:
nodeName - The name of the node for the available SDKs properties returned by this method.
Returns:
The properties for all available SDKs for the specified node or null if no such property is found per the given filters.
Throws:
com.ibm.websphere.management.exception.MetadataNotAvailableException - Requested metadata does not exist in the set of metadata properties for the specified node.
AdminException - The metadata for the specified node could not be obtained or an input value was invalid.

getSDKLocation

  1. public java.lang.String getSDKLocation( java.lang.String nodeName,
  2. java.lang.String sdkName)
  3. throws AdminException
This method obtains the location of a given SDK for a given node The method throws MetadataNotAvailableException for a Pre-V8 node on OS400 as there is no SDK property available for such a node.
Parameters:
nodeName - The name of the node for the available SDKs properties returned by this method.
Returns:
returns the location of a given SDK or null if there is no such SDK found for a specified node
Throws:
com.ibm.websphere.management.exception.MetadataNotAvailableException - Requested metadata does not exist in the set of metadata properties for the specified node.
AdminException - The metadata for the specified node could not be obtained or an input value was invalid.

getSDKVersion

  1. public java.lang.String getSDKVersion( java.lang.String nodeName,
  2. java.lang.String sdkName)
  3. throws AdminException
This method obtains the location of a given SDK for a given node The method throws MetadataNotAvailableException for a Pre-V8 node on OS400 as there is no SDK property available for such a node.
Parameters:
nodeName - The version of the node for the available SDKs properties returned by this method.
Returns:
returns the version of a given SDK or null if there is no such SDK found for a specified node
Throws:
com.ibm.websphere.management.exception.MetadataNotAvailableException - Requested metadata does not exist in the set of metadata properties for the specified node.
AdminException - The metadata for the specified node could not be obtained or an input value was invalid.

getSDKBits

  1. public java.lang.String getSDKBits( java.lang.String nodeName,
  2. java.lang.String sdkName)
  3. throws AdminException
This method obtains the location of a given SDK for a given node The method throws MetadataNotAvailableException for a Pre-V8 node not on ZOS as there is no SDK property available for such a node.
Parameters:
nodeName - The version of the node for the available SDKs properties returned by this method.
Returns:
returns the version of a given SDK or null if there is no such SDK found for a specified node
Throws:
com.ibm.websphere.management.exception.MetadataNotAvailableException - Requested metadata does not exist in the set of metadata properties for the specified node.
AdminException - The metadata for the specified node could not be obtained or an input value was invalid.