com.ibm.as400.resource
Class RSoftwareResource

java.lang.Object
  |
  +--com.ibm.as400.resource.Resource
        |
        +--com.ibm.as400.resource.ChangeableResource
              |
              +--com.ibm.as400.resource.RSoftwareResource
All Implemented Interfaces:
java.io.Serializable

public class RSoftwareResource
extends ChangeableResource

The RSoftwareResource class represents an AS/400 software product.

The following attribute IDs are supported:

Use any of these attribute IDs with getAttributeValue() to access the attribute values for an RSoftwareResource.

// Create an RSoftwareResource object to refer to a specific software product.
AS400 system = new AS400("MYSYSTEM", "MYUSERID", "MYPASSWORD");
RSoftwareResource product = new RSoftwareResource(system, "5722JC1");

// Get the load error indicator. String loadErrorIndicator = (String)product.getAttributeValue(RSoftwareResource.LOAD_ERROR_INDICATOR);

See Also:
Serialized Form

Field Summary
static java.lang.String LEVEL
          Attribute ID for level.
static java.lang.String LOAD_ERROR_INDICATOR
          Attribute ID for load error indicator.
static java.lang.String LOAD_ERROR_INDICATOR_ERROR
          Attribute value indicating that an error was found the last time that the state of this load was checked or updated.
static java.lang.String LOAD_ERROR_INDICATOR_NONE
          Attribute value indicating that no error was found the last time that the state of this load was checked or updated.
static java.lang.String LOAD_ID
          Attribute ID for load ID.
static java.lang.String LOAD_ID_CODE
          Attribute value indicating the code load.
static java.lang.String LOAD_STATE
          Attribute ID for load state.
static java.lang.String LOAD_TYPE
          Attribute ID for load type.
static java.lang.String LOAD_TYPE_CODE
          Attribute value indicating that the load is a code load.
static java.lang.String LOAD_TYPE_LANGUAGE
          Attribute value indicating that the load is a language load.
static java.lang.String MINIMUM_BASE_VRM
          Attribute ID for minimum base VRM.
static java.lang.String MINIMUM_BASE_VRM_MATCH
          Attribute value indicating the release of the option matches that of the base.
static java.lang.String MINIMUM_TARGET_RELEASE
          Attribute ID for minimum target release.
static java.lang.String PRIMARY_LANGUAGE_LOAD_ID
          Attribute ID for primary language load ID.
static java.lang.String PRODUCT_ID
          Attribute ID for product ID.
static java.lang.String PRODUCT_ID_OPERATING_SYSTEM
          Attribute value indicating the product ID for the operating system.
static java.lang.String PRODUCT_OPTION
          Attribute ID for product option.
static java.lang.String PRODUCT_OPTION_BASE
          Attribute value indicating the base option.
static java.lang.String REGISTRATION_TYPE
          Attribute ID for registration type.
static java.lang.String REGISTRATION_VALUE
          Attribute ID for registration value.
static java.lang.String RELEASE_LEVEL
          Attribute ID for release level.
static java.lang.String RELEASE_LEVEL_CURRENT
          Attribute value indicating the release level of the currently installed operating system.
static java.lang.String RELEASE_LEVEL_ONLY
          Attribute value indicating the only release level for which a product load is found.
static java.lang.String RELEASE_LEVEL_PREVIOUS
          Attribute value indicating the previous release with modification level 0 of the operating system.
static java.lang.String REQUIREMENTS_MET
          Attribute ID for requirements met.
static java.lang.String REQUIREMENTS_MET_ALL
          Attribute value indicating that the releases of the base and option meet all requirements.
static java.lang.String REQUIREMENTS_MET_TOO_OLD_COMPARED_TO_BASE
          Attribute value indicating that the release of the option is too old compared to the base.
static java.lang.String REQUIREMENTS_MET_TOO_OLD_COMPARED_TO_OPTION
          Attribute value indicating that the release of the base is too old compared to the option.
static java.lang.String REQUIREMENTS_MET_UNKNOWN
          Attribute value indicating that not enough information is available to determine if the release requirements have been met.
static java.lang.String SUPPORTED_FLAG
          Attribute ID for requirements met.
static java.lang.String SYMBOLIC_LOAD_STATE
          Attribute ID for symbolic load state.
static java.lang.String SYMBOLIC_LOAD_STATE_CREATED
          Attribute value indicating that the product load object for this load exists.
static java.lang.String SYMBOLIC_LOAD_STATE_DAMAGED
          Attribute value indicating that the product load object has been damaged.
static java.lang.String SYMBOLIC_LOAD_STATE_DEFINED
          Attribute value indicating that the load is defined.
static java.lang.String SYMBOLIC_LOAD_STATE_INSTALLED
          Attribute value indicating that the product load object was loaded.
static java.lang.String SYMBOLIC_LOAD_STATE_LOADED
          Attribute value indicating that the product load object is being loaded or deleted.
static java.lang.String SYMBOLIC_LOAD_STATE_PACKAGED
          Attribute value indicating that the product load object has been packaged.
 
Constructor Summary
RSoftwareResource()
          Constructs an RSoftwareResource object.
RSoftwareResource(AS400 system, java.lang.String productID)
          Constructs an RSoftwareResource object.
RSoftwareResource(AS400 system, java.lang.String productID, java.lang.String releaseLevel, java.lang.String productOption)
          Constructs an RSoftwareResource object.
RSoftwareResource(AS400 system, java.lang.String productID, java.lang.String releaseLevel, java.lang.String productOption, java.lang.String loadID)
          Constructs an RSoftwareResource object.
 
Method Summary
protected  void establishConnection()
          Establishes the connection to the AS/400.
protected  void freezeProperties()
          Freezes any property changes.
 java.lang.Object getAttributeUnchangedValue(java.lang.Object attributeID)
          Returns the unchanged value of an attribute.
 java.lang.String getLoadID()
          Returns the load ID.
 java.lang.String getProductID()
          Returns the product ID.
 java.lang.String getProductOption()
          Returns the product option.
 java.lang.String getReleaseLevel()
          Returns the release level.
 void refreshAttributeValues()
          Refreshes the values for all attributes.
 void setLoadID(java.lang.String loadID)
          Sets the load ID.
 void setProductID(java.lang.String productID)
          Sets the product ID.
 void setProductOption(java.lang.String productOption)
          Sets the product option.
 void setReleaseLevel(java.lang.String releaseLevel)
          Sets the release level.
 
Methods inherited from class com.ibm.as400.resource.ChangeableResource
cancelAttributeChanges, commitAttributeChanges, commitAttributeChanges, commitAttributeChanges, fireAttributeChangesCanceled, fireAttributeChangesCommitted, fireAttributeValueChanged, fireResourceCreated, fireResourceDeleted, getAttributeUnchangedValue, getAttributeValue, getAttributeValue, hasUncommittedAttributeChanges, initializeAttributeValue, setAttributeValue, setAttributeValue
 
Methods inherited from class com.ibm.as400.resource.Resource
addActiveStatusListener, addPropertyChangeListener, addResourceListener, addVetoableChangeListener, arePropertiesFrozen, equals, fireAttributeValuesRefreshed, fireBusy, fireIdle, firePropertyChange, fireVetoableChange, getAttributeMetaData, getAttributeMetaData, getPresentation, getResourceKey, getSystem, isBidiEnabled, isConnectionEstablished, removeActiveStatusListener, removePropertyChangeListener, removeResourceListener, removeVetoableChangeListener, setPresentation, setResourceKey, setSystem, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LEVEL

public static final java.lang.String LEVEL
Attribute ID for level. This identifies a read-only String attribute, which represents the level identifier of the product. The format is Lxx for the operating system and Licensed Internal Code, or "" for all other products.

LOAD_ERROR_INDICATOR

public static final java.lang.String LOAD_ERROR_INDICATOR
Attribute ID for load error indicator. This identifies a read-only String attribute, which indicates if there is a known error for this load. Possible values are:

LOAD_ERROR_INDICATOR_ERROR

public static final java.lang.String LOAD_ERROR_INDICATOR_ERROR
Attribute value indicating that an error was found the last time that the state of this load was checked or updated.
See Also:
LOAD_ERROR_INDICATOR_ERROR

LOAD_ERROR_INDICATOR_NONE

public static final java.lang.String LOAD_ERROR_INDICATOR_NONE
Attribute value indicating that no error was found the last time that the state of this load was checked or updated.
See Also:
LOAD_ERROR_INDICATOR_NONE

LOAD_ID

public static final java.lang.String LOAD_ID
Attribute ID for load ID. This identifies a read-only String attribute, which represents the load ID of the product load for which information was returned. Possible values are:

LOAD_ID_CODE

public static final java.lang.String LOAD_ID_CODE
Attribute value indicating the code load.
See Also:
LOAD_ID

LOAD_STATE

public static final java.lang.String LOAD_STATE
Attribute ID for load state. This identifies a read-only String attribute, which represents the state of the load.

LOAD_TYPE

public static final java.lang.String LOAD_TYPE
Attribute ID for load type. This identifies a read-only String attribute, which represents the type of the load. Possible values are:

LOAD_TYPE_CODE

public static final java.lang.String LOAD_TYPE_CODE
Attribute value indicating that the load is a code load.
See Also:
LOAD_TYPE

LOAD_TYPE_LANGUAGE

public static final java.lang.String LOAD_TYPE_LANGUAGE
Attribute value indicating that the load is a language load.
See Also:
LOAD_TYPE

MINIMUM_BASE_VRM

public static final java.lang.String MINIMUM_BASE_VRM
Attribute ID for minimum base VRM. This identifies a read-only String attribute, which represents the minimum release level that is allowed for the *BASE option that will run with the current level of the option for the product. Possible values are:

MINIMUM_BASE_VRM_MATCH

public static final java.lang.String MINIMUM_BASE_VRM_MATCH
Attribute value indicating the release of the option matches that of the base.
See Also:
MINIMUM_BASE_VRM

MINIMUM_TARGET_RELEASE

public static final java.lang.String MINIMUM_TARGET_RELEASE
Attribute ID for minimum target release. This identifies a read-only String attribute, which represents the minimum release of the operating system to which the Save Licensed Program (SAVLICPGM) command will allow the product to be saved, in the form VxRxMx.

PRIMARY_LANGUAGE_LOAD_ID

public static final java.lang.String PRIMARY_LANGUAGE_LOAD_ID
Attribute ID for primary language load ID. This identifies a read-only String attribute, which represents the primary language of the product option for code loads, or "" if no language is installed, or for language loads.

PRODUCT_ID

public static final java.lang.String PRODUCT_ID
Attribute ID for product ID. This identifies a read-only String attribute, which represents the product ID.

PRODUCT_ID_OPERATING_SYSTEM

public static final java.lang.String PRODUCT_ID_OPERATING_SYSTEM
Attribute value indicating the product ID for the operating system.
See Also:
PRODUCT_ID

PRODUCT_OPTION

public static final java.lang.String PRODUCT_OPTION
Attribute ID for product option. This identifies a read-only String attribute, which represents the product option. Possible values are:

PRODUCT_OPTION_BASE

public static final java.lang.String PRODUCT_OPTION_BASE
Attribute value indicating the base option.
See Also:
PRODUCT_OPTION

REGISTRATION_TYPE

public static final java.lang.String REGISTRATION_TYPE
Attribute ID for registration type. This identifies a read-only String attribute, which represents the registration type, which makes up part of the registration ID of the product.

REGISTRATION_VALUE

public static final java.lang.String REGISTRATION_VALUE
Attribute ID for registration value. This identifies a read-only String attribute, which represents the registration value, which makes up part of the registration ID of the product.

RELEASE_LEVEL

public static final java.lang.String RELEASE_LEVEL
Attribute ID for release level. This identifies a read-only String attribute, which represents the release level.

RELEASE_LEVEL_CURRENT

public static final java.lang.String RELEASE_LEVEL_CURRENT
Attribute value indicating the release level of the currently installed operating system.
See Also:
RELEASE_LEVEL

RELEASE_LEVEL_ONLY

public static final java.lang.String RELEASE_LEVEL_ONLY
Attribute value indicating the only release level for which a product load is found.
See Also:
RELEASE_LEVEL

RELEASE_LEVEL_PREVIOUS

public static final java.lang.String RELEASE_LEVEL_PREVIOUS
Attribute value indicating the previous release with modification level 0 of the operating system.
See Also:
RELEASE_LEVEL

REQUIREMENTS_MET

public static final java.lang.String REQUIREMENTS_MET
Attribute ID for requirements met. This identifies a read-only String attribute, which indicates whether then product requirements are met between a base and option value. Possible values are:

REQUIREMENTS_MET_UNKNOWN

public static final java.lang.String REQUIREMENTS_MET_UNKNOWN
Attribute value indicating that not enough information is available to determine if the release requirements have been met.
See Also:
REQUIREMENTS_MET

REQUIREMENTS_MET_ALL

public static final java.lang.String REQUIREMENTS_MET_ALL
Attribute value indicating that the releases of the base and option meet all requirements.
See Also:
REQUIREMENTS_MET

REQUIREMENTS_MET_TOO_OLD_COMPARED_TO_BASE

public static final java.lang.String REQUIREMENTS_MET_TOO_OLD_COMPARED_TO_BASE
Attribute value indicating that the release of the option is too old compared to the base.
See Also:
REQUIREMENTS_MET

REQUIREMENTS_MET_TOO_OLD_COMPARED_TO_OPTION

public static final java.lang.String REQUIREMENTS_MET_TOO_OLD_COMPARED_TO_OPTION
Attribute value indicating that the release of the base is too old compared to the option.
See Also:
REQUIREMENTS_MET

SUPPORTED_FLAG

public static final java.lang.String SUPPORTED_FLAG
Attribute ID for requirements met. This identifies a read-only Boolean attribute, which indicates whether this load is currently supported.

SYMBOLIC_LOAD_STATE

public static final java.lang.String SYMBOLIC_LOAD_STATE
Attribute ID for symbolic load state. This identifies a read-only String attribute, which represents the symbolic state of the load. Possible values are:

SYMBOLIC_LOAD_STATE_DEFINED

public static final java.lang.String SYMBOLIC_LOAD_STATE_DEFINED
Attribute value indicating that the load is defined. The product load object for this load does not exist.
See Also:
SYMBOLIC_LOAD_STATE

SYMBOLIC_LOAD_STATE_CREATED

public static final java.lang.String SYMBOLIC_LOAD_STATE_CREATED
Attribute value indicating that the product load object for this load exists.
See Also:
SYMBOLIC_LOAD_STATE

SYMBOLIC_LOAD_STATE_PACKAGED

public static final java.lang.String SYMBOLIC_LOAD_STATE_PACKAGED
Attribute value indicating that the product load object has been packaged.
See Also:
SYMBOLIC_LOAD_STATE

SYMBOLIC_LOAD_STATE_DAMAGED

public static final java.lang.String SYMBOLIC_LOAD_STATE_DAMAGED
Attribute value indicating that the product load object has been damaged.
See Also:
SYMBOLIC_LOAD_STATE

SYMBOLIC_LOAD_STATE_LOADED

public static final java.lang.String SYMBOLIC_LOAD_STATE_LOADED
Attribute value indicating that the product load object is being loaded or deleted.
See Also:
SYMBOLIC_LOAD_STATE

SYMBOLIC_LOAD_STATE_INSTALLED

public static final java.lang.String SYMBOLIC_LOAD_STATE_INSTALLED
Attribute value indicating that the product load object was loaded.
See Also:
SYMBOLIC_LOAD_STATE
Constructor Detail

RSoftwareResource

public RSoftwareResource()
Constructs an RSoftwareResource object.

RSoftwareResource

public RSoftwareResource(AS400 system,
                         java.lang.String productID)
Constructs an RSoftwareResource object.
Parameters:
system - The system.
productID - The product ID, or PRODUCT_ID_OPERATING_SYSTEM to refer to the operating system.

RSoftwareResource

public RSoftwareResource(AS400 system,
                         java.lang.String productID,
                         java.lang.String releaseLevel,
                         java.lang.String productOption)
Constructs an RSoftwareResource object.
Parameters:
system - The system.
productID - The product ID, or PRODUCT_ID_OPERATING_SYSTEM to refer to the operating system.
releaseLevel - The release level. Possible values are:
  • RELEASE_LEVEL_CURRENT - Use the release level of the currently installed operating system.
  • RELEASE_LEVEL_ONLY - Use the only release level for which a product load is found.
  • RELEASE_LEVEL_PREVIOUS - Use the previous release with modification level 0 of the operating system.
  • A release level, in the form VxRxMx.
productOption - The option number for which is being requested, or PRODUCT_OPTION_BASE for the base option.

RSoftwareResource

public RSoftwareResource(AS400 system,
                         java.lang.String productID,
                         java.lang.String releaseLevel,
                         java.lang.String productOption,
                         java.lang.String loadID)
Constructs an RSoftwareResource object.
Parameters:
system - The system.
productID - The product ID, or PRODUCT_ID_OPERATING_SYSTEM to refer to the operating system.
releaseLevel - The release level. Possible values are:
  • RELEASE_LEVEL_CURRENT - Use the release level of the currently installed operating system.
  • RELEASE_LEVEL_ONLY - Use the only release level for which a product load is found.
  • RELEASE_LEVEL_PREVIOUS - Use the previous release with modification level 0 of the operating system.
  • A release level, in the form VxRxMx.
productOption - The option number for which is being requested, or PRODUCT_OPTION_BASE for the base option.
loadID - The load ID, or LOAD_ID_CODE for the code load.
Method Detail

establishConnection

protected void establishConnection()
                            throws ResourceException
Establishes the connection to the AS/400.

The method is called by the resource framework automatically when the connection needs to be established.

Overrides:
establishConnection in class Resource
Throws:
ResourceException - If an error occurs.

freezeProperties

protected void freezeProperties()
                         throws ResourceException
Freezes any property changes. After this is called, property changes should not be made. Properties are not the same thing as attributes. Properties are basic pieces of information which must be set to make the object usable, such as the system and path.

The method is called by the resource framework automatically when the properties need to be frozen.

Overrides:
freezeProperties in class Resource
Throws:
ResourceException - If an error occurs.

getAttributeUnchangedValue

public java.lang.Object getAttributeUnchangedValue(java.lang.Object attributeID)
                                            throws ResourceException
Returns the unchanged value of an attribute. If the attribute value has a uncommitted change, this returns the unchanged value. If the attribute value does not have a uncommitted change, this returns the same value as getAttributeValue().
Overrides:
getAttributeUnchangedValue in class ChangeableResource
Parameters:
attributeID - Identifies the attribute.
Returns:
The attribute value, or null if the attribute value is not available.
Throws:
ResourceException - If an error occurs.

getLoadID

public java.lang.String getLoadID()
Returns the load ID.
Returns:
The load ID.

getProductID

public java.lang.String getProductID()
Returns the product ID.
Returns:
The product ID.

getProductOption

public java.lang.String getProductOption()
Returns the product option.
Returns:
The product option.

getReleaseLevel

public java.lang.String getReleaseLevel()
Returns the release level.
Returns:
The release level.

refreshAttributeValues

public void refreshAttributeValues()
                            throws ResourceException
Refreshes the values for all attributes. This does not cancel uncommitted changes. This method fires an attributeValuesRefreshed() ResourceEvent.
Overrides:
refreshAttributeValues in class ChangeableResource
Throws:
ResourceException - If an error occurs.

setLoadID

public void setLoadID(java.lang.String loadID)
Sets the load ID. This does not change the software product on the AS/400. Instead, it changes the software product to which this object references.

The default value is LOAD_ID_CODE.

Parameters:
loadID - The load ID, or LOAD_ID_CODE for the code load.

setProductID

public void setProductID(java.lang.String productID)
Sets the product ID. This does not change the software product on the AS/400. Instead, it changes the software product to which this object references.

The default value is PRODUCT_ID_OPERATING_SYSTEM.

Parameters:
productID - The product ID, or PRODUCT_ID_OPERATING_SYSTEM to refer to the operating system.

setProductOption

public void setProductOption(java.lang.String productOption)
Sets the product option. This does not change the software product on the AS/400. Instead, it changes the software product to which this object references.

The default value is PRODUCT_OPTION_BASE.

Parameters:
productOption - The option number for which is being requested, or PRODUCT_OPTION_BASE for the base option.

setReleaseLevel

public void setReleaseLevel(java.lang.String releaseLevel)
Sets the release level. This does not change the software product on the AS/400. Instead, it changes the software product to which this object references.

The default value is RELEASE_LEVEL_CURRENT.

Parameters:
releaseLevel - The release level. Possible values are:
  • RELEASE_LEVEL_CURRENT - Use the release level of the currently installed operating system.
  • RELEASE_LEVEL_ONLY - Use the only release level for which a product load is found.
  • RELEASE_LEVEL_PREVIOUS - Use the previous release with modification level 0 of the operating system.
  • A release level, in the form VxRxMx.