public class ManagedObjectMetadataHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BASE_WAS_APP_ACTIVATION_PLANS
Constant for the property name for the base application activation plans.
|
static java.lang.String |
BASE_WAS_PRODUCT_SHORT_NAME
Constant for the property name for the base product's short name.
|
static java.lang.String |
BASE_WAS_PRODUCT_VERSION
Constant for the property name for the base product version.
|
static java.lang.String |
NODE_DEPLOYED_FEATURES
Constant for the property name for the node deployed features.
|
static java.lang.String |
NODE_OS
Constant for the property name for the operating system of the node associated with
a set of metadata.
|
static java.lang.String |
NODE_OS_AIX
Constant for the node operating system property value for AIX.
|
static java.lang.String |
NODE_OS_AS400
Constant for the node operating system property value for OS/400.
|
static java.lang.String |
NODE_OS_HPUX
Constant for the node operating system property value for HP-UX.
|
static java.lang.String |
NODE_OS_LINUX
Constant for the node operating system property value for Linux.
|
static java.lang.String |
NODE_OS_SOLARIS
Constant for the node operating system property value for Solaris.
|
static java.lang.String |
NODE_OS_WINDOWS
Constant for the node operating system property value for Windows.
|
static java.lang.String |
NODE_OS_ZOS
Constant for the node operating system property value for z/OS.
|
static java.lang.String |
NODE_SYSPLEX_NAME
Constant for the property name for the node sysplex name.
|
static java.lang.String |
PASSWORDUTIL_ALGORITHM
Constants for the property name for the AES password encryption support.
|
static java.lang.String |
PASSWORDUTIL_ALGORITHM_ATTR_AES |
static java.lang.String |
PLUGGABLE_SDK_ATTR_BITS
Constants for the SDK bits.
|
static java.lang.String |
PLUGGABLE_SDK_ATTR_LOCATION
Constants for the SDK location.
|
static java.lang.String |
PLUGGABLE_SDK_ATTR_PLATFORM
Constants for the SDK platform.
|
static java.lang.String |
PLUGGABLE_SDK_ATTR_VERSION
Constants for the SDK version.
|
static java.lang.String |
PLUGGABLE_SDK_PREFIX
Constant for the node pluggable SDK property prefix.
|
Constructor and Description |
---|
ManagedObjectMetadataHelper(ManagedObjectMetadataAccessor metadataAccessor)
Constructs a ManagedObjectMetadataHelper instance.
|
Modifier and Type | Method and Description |
---|---|
int |
compareNodeVersion(java.lang.String nodeName,
java.lang.String version)
Compares the WebSphere version for a node with the input version.
|
ManagedObjectMetadataAccessor |
getAccessor()
This method returns the ManagedObjectMetadataAccessor instance used to
construct this helper.
|
java.lang.String[] |
getAvailableSDKsOnNode(java.lang.String nodeName)
This method lists names for all available SDKs.
|
java.lang.String |
getNodeBaseProductShortName(java.lang.String nodeName)
Returns the version of WebSphere Base product installation for a given node.
|
java.lang.String |
getNodeBaseProductVersion(java.lang.String nodeName)
Returns the version of WebSphere Base product installation for a given node.
|
java.util.ArrayList |
getNodeDeployedFeatures(java.lang.String nodeName)
Returns the list of features for the given node.
|
java.lang.String |
getNodeMajorVersion(java.lang.String nodeName)
Returns the major version of WebSphere Base product installation for a given node.
|
java.lang.String |
getNodeMinorVersion(java.lang.String nodeName)
Returns the minor version of WebSphere installation for a given node.
|
java.lang.String |
getNodePlatformOS(java.lang.String nodeName)
Returns the operating system name for a given node.
|
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).
|
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.
|
java.lang.String |
getNodeServiceVersion(java.lang.String nodeName)
Returns the service version of WebSphere installation for a given node.
|
java.lang.String |
getNodeSysplexName(java.lang.String nodeName)
Returns the sysplex name for a given node.
|
java.lang.String |
getNodeUpdateVersion(java.lang.String nodeName)
Returns the update version of WebSphere installation for a given node.
|
java.lang.String |
getSDKBits(java.lang.String nodeName,
java.lang.String sdkName)
This method obtains the bit information 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.
|
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.
|
java.util.Properties |
getSDKPropertiesOnNode(java.lang.String nodeName,
java.lang.String sdkName,
java.lang.String[] sdkAttributes)
This method returns a list of the SDK properties available for the node
specified.
|
java.lang.String |
getSDKVersion(java.lang.String nodeName,
java.lang.String sdkName)
This method obtains the version 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.
|
boolean |
isNodeOS400(java.lang.String nodeName)
Tests whether a given node is running on the OS/400 platform.
|
boolean |
isNodeZOS(java.lang.String nodeName)
Tests whether a given node is running on the z/OS platform.
|
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.
|
public static final java.lang.String BASE_WAS_PRODUCT_VERSION
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".
public static final java.lang.String BASE_WAS_PRODUCT_SHORT_NAME
The value for this constant is "com.ibm.websphere.baseProductShortName".
public static final java.lang.String BASE_WAS_APP_ACTIVATION_PLANS
The value for this constant is "com.ibm.websphere.baseRuntimeComponents".
public static final java.lang.String NODE_OS
The value for this constant is "com.ibm.websphere.nodeOperatingSystem".
public static final java.lang.String NODE_OS_AS400
The value for this constant is "os400".
public static final java.lang.String NODE_OS_AIX
The value for this constant is "aix".
public static final java.lang.String NODE_OS_HPUX
The value for this constant is "hpux".
public static final java.lang.String NODE_OS_LINUX
The value for this constant is "linux".
public static final java.lang.String NODE_OS_SOLARIS
The value for this constant is "solaris".
public static final java.lang.String NODE_OS_WINDOWS
The value for this constant is "windows".
public static final java.lang.String NODE_OS_ZOS
The value for this constant is "os390".
public static final java.lang.String NODE_SYSPLEX_NAME
The value for this constant is "com.ibm.websphere.nodeSysplexName".
public static final java.lang.String NODE_DEPLOYED_FEATURES
The value for this constant is "com.ibm.websphere.deployed.features".
public static final java.lang.String PLUGGABLE_SDK_PREFIX
The value for this constant is "com.ibm.websphere.sdk".
public static final java.lang.String PLUGGABLE_SDK_ATTR_VERSION
The value for this constant is "version".
public static final java.lang.String PLUGGABLE_SDK_ATTR_BITS
The value for this constant is "bits".
public static final java.lang.String PLUGGABLE_SDK_ATTR_LOCATION
The value for this constant is "location".
public static final java.lang.String PLUGGABLE_SDK_ATTR_PLATFORM
The value for this constant is "platform".
public static final java.lang.String PASSWORDUTIL_ALGORITHM
The value for this constant is "aes".
public static final java.lang.String PASSWORDUTIL_ALGORITHM_ATTR_AES
public ManagedObjectMetadataHelper(ManagedObjectMetadataAccessor metadataAccessor) throws AdminException
metadataAccessor
- Managed object metadata accessor.AdminException
- Could not create a ManagedObjectMetadataHelper, most likely
due to an invalid argument.public ManagedObjectMetadataAccessor getAccessor() throws AdminException
AdminException
- Could not complete requested operation.public java.lang.String getNodeMajorVersion(java.lang.String nodeName) throws AdminException
nodeName
- The name of the node for the metadata returned by this method.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.public java.lang.String getNodeMinorVersion(java.lang.String nodeName) throws AdminException
nodeName
- The name of the node for the metadata returned by this method.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.public java.lang.String getNodeUpdateVersion(java.lang.String nodeName) throws AdminException
nodeName
- The name of the node for the metadata returned by this method.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.public java.lang.String getNodeServiceVersion(java.lang.String nodeName) throws AdminException
nodeName
- The name of the node for the metadata returned by this method.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.public java.lang.String getNodeBaseProductVersion(java.lang.String nodeName) throws AdminException
nodeName
- The name of the node for the metadata returned by this method.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.public java.lang.String getNodeBaseProductShortName(java.lang.String nodeName) throws AdminException
nodeName
- The name of the node for the metadata returned by this method.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.public int compareNodeVersion(java.lang.String nodeName, java.lang.String version) throws AdminException
nodeName
- The name of the node for the metadata used by this method.version
- A String value of the WebSphere version to be compared.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.public boolean isNodeZOS(java.lang.String nodeName) throws AdminException
nodeName
- The name of the node for the metadata used by this method.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.public boolean isNodeOS400(java.lang.String nodeName) throws AdminException
nodeName
- The name of the node for the metadata used by this method.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.public java.lang.String getNodePlatformOS(java.lang.String nodeName) throws AdminException
nodeName
- The name of the node for the metadata returned by this method.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.public java.lang.String getNodeSysplexName(java.lang.String nodeName) throws AdminException
nodeName
- The name of the node for the metadata returned by this method.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.public java.util.SortedMap getNodeProductVersions(java.lang.String nodeName) throws AdminException
nodeName
- The name of the node for the version list returned by this method.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.public java.util.ArrayList getNodeDeployedFeatures(java.lang.String nodeName) throws AdminException
nodeName
- The name of the node for the features list returned by this method.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.public java.util.Properties getNodeProductsAndVersions(java.lang.String nodeName) throws AdminException
nodeName
- The name of the node for which data is to be retrieved.AdminException
- Metadata for specified node could not be obtainedpublic java.util.ArrayList listRuntimeComponents(java.lang.String nodeName) throws AdminException
nodeName
- The name of the node for the runtime components list returned
by this method.AdminException
- The metadata for the specified node could not be obtained
or an input value was invalid.public java.lang.String[] getAvailableSDKsOnNode(java.lang.String nodeName) throws AdminException
The method throws MetadataNotAvailableException for a Pre-V8 node on OS400 as there is no SDK property available for such a node.
nodeName
- The name of the node for the available SDKs properties returned
by this method.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.public java.util.Properties getSDKPropertiesOnNode(java.lang.String nodeName, java.lang.String sdkName, java.lang.String[] sdkAttributes) throws AdminException
More than one SDK attributes can be specified and the valid SDK attributes are "version" "location" "bits" "platform"
The method throws MetadataNotAvailableException for a Pre-V8 node on OS400 as there is no SDK property available for such a node.
nodeName
- The name of the node for the available SDKs properties returned
by this method.sdkName
- The name of the SDK whose properties are returned by this method.
For a null or empty string value, the method returns all properties
for all available SDKs for a given node; otherwise, only the properties
for the given SDK are returnedsdkAttributes
- The list of the SDK attributes. With a null or empty string value,
the method returns all properties for all available SDKs for a given node;
otherwise only the properties for the specified sdkAttributes are returned.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.public java.lang.String getSDKLocation(java.lang.String nodeName, java.lang.String sdkName) throws AdminException
The method throws MetadataNotAvailableException for a Pre-V8 node on OS400 as there is no SDK property available for such a node.
nodeName
- The name of the node for the SDK's location returned
by this method.sdkName
- The name of the SDK for the SDK's location returned
by this method.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.public java.lang.String getSDKVersion(java.lang.String nodeName, java.lang.String sdkName) throws AdminException
The method throws MetadataNotAvailableException for a Pre-V8 node on OS400 as there is no SDK property available for such a node.
nodeName
- The name of the node for the SDK's version returned
by this method.sdkName
- The name of the SDK for the SDK's version returned
by this method.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.public java.lang.String getSDKBits(java.lang.String nodeName, java.lang.String sdkName) throws AdminException
The method throws MetadataNotAvailableException for a Pre-V8 node on OS400 as there is no SDK property available for such a node.
nodeName
- The name of the node for the SDK's bits returned
by this method.sdkName
- The name of the SDK for the SDK's bits returned
by this method.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.