com.ibm.as400.access
Class Product
- java.lang.Object
-
- com.ibm.as400.access.Product
-
public class Product extends java.lang.Object
Represents a licensed product on the system. TheisInstalled()
method should be called to verify that the product is installed on the system. If the product is not installed, other information returned by getters in this class might not be valid.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
LOAD_STATE_CHECK_ERROR
Constant indicating that the Check Product Option (CHKPRDOPT) command was used for this product load, but the postoperation exit program failed or indicated that an error was found.static java.lang.String
LOAD_STATE_DEFINED_NO_OBJECT
Constant indicating that the product load is defined but the product load object for this load does not exist.static java.lang.String
LOAD_STATE_DEFINED_OBJECT_EXISTS
Constant indicating that the product load object exists, but before it can be saved using the Save Licensed Program (SAVLICPGM) command, it must be packaged with either the Package Product Option (PKGPRDOPT) command or the Package Product Option (QSZPKGPO) API.static java.lang.String
LOAD_STATE_IBM_SUPPLIED_NOT_COMPATIBLE
Constant indicating that this product is an IBM-supplied product and it is not compatible with the currently installed release level of the System i operating system.static java.lang.String
LOAD_STATE_INSTALLED
Constant indicating that the product load was installed successfully.static java.lang.String
LOAD_STATE_INSTALLED_DELETE_IN_PROGRESS
Constant indicating that a Delete Licensed Program (DLTLICPGM) command is in progress.static java.lang.String
LOAD_STATE_INSTALLED_RESTORE_FAILED
Constant indicating that a Restore Licensed Program (RSTLICPGM) command failed.static java.lang.String
LOAD_STATE_INSTALLED_RESTORE_FAILED_EXIT_PROGRAM_FAILED
Constant indicating that a Restore Licensed Program (RSTLICPGM) command did not complete successfully.static java.lang.String
LOAD_STATE_INSTALLED_RESTORE_IN_PROGRESS
Constant indicating that a Restore Licensed Program (RSTLICPGM) command is in progress.static java.lang.String
LOAD_STATE_PACKAGED
Constant indicating that the product load object for this load has been packaged with the Package Product Option (PKGPRDOPT) command or the Package Product Option (QSZPKGPO) API.static java.lang.String
LOAD_STATE_PACKAGED_DAMAGED
Constant indicating that the product load object for this load has been packaged with the Package Product Option (PKGPRDOPT) command or the Package Product Option (QSZPKGPO) API, but an object was found to be damaged the last time that the Check Product Option (CHKPRDOPT) command or Save Licensed Program (SAVLICPGM) command was used for this load.static java.lang.String
LOAD_STATE_PACKAGED_DELETE_IN_PROGRESS
Constant indicating that a Delete Licensed Program (DLTLICPGM) command is in progress.static java.lang.String
LOAD_STATE_PACKAGED_DELETED
Constant indicating that the product load object for this load has been packaged with the Package Product Option (PKGPRDOPT) command or the Package Product Option (QSZPKGPO) API, but either an attempt was made to delete the product load using the Delete Licensed Program (DLTLICPGM) command and the attempt failed, or a packaged object was missing the last time the Check Product Option (CHKPRDOPT) command or Save Licensed Program (SAVLICPGM) command was used for this load.static java.lang.String
LOAD_STATE_PACKAGED_RENAMED
Constant indicating that the product load object for this load has been packaged with the Package Product Option (PKGPRDOPT) command or the Package Product Option (QSZPKGPO) API, but either a development library or folder was renamed when the product does not allow dynamic naming, or the product definition or product load for a packaged load was renamed or moved to another library.static java.lang.String
LOAD_STATE_PACKAGED_RESTORE_FAILED
Constant indicating that a Restore Licensed Program (RSTLICPGM) command failed.static java.lang.String
LOAD_STATE_PACKAGED_RESTORE_FAILED_EXIT_PROGRAM_FAILED
Constant indicating that a Restore Licensed Program (RSTLICPGM) command did not complete successfully.static java.lang.String
LOAD_STATE_PACKAGED_RESTORE_IN_PROGRESS
Constant indicating that a Restore Licensed Program (RSTLICPGM) command is in progress.static java.lang.String
LOAD_STATE_RESTORED
Constant indicating that the product load object for this load was loaded on to the system by the Restore Licensed Program (RSTLICPGM) command.static java.lang.String
LOAD_STATE_RESTORED_DAMAGED
Constant indicating that the product load object for this load was installed by the Restore Licensed Program (RSTLICPGM) command, but an object is damaged.static java.lang.String
LOAD_STATE_RESTORED_DELETED
Constant indicating that the product load object for this load was installed by the Restore Licensed Program (RSTLICPGM) command, but either an object was found to be missing when the Check Product Option (CHKPRDOPT) command or the Save Licensed Program (SAVLICPGM) command was used, or an error occurred while the Delete Licensed Program (DLTLICPGM) command was being used.static java.lang.String
LOAD_STATE_RESTORED_EXIT_PROGRAM_FAILED
Constant indicating that the product load object for this load was loaded on to the system by the Restore Licensed Program (RSTLICPGM) command but a postoperation exit program failed.static java.lang.String
LOAD_STATE_RESTORED_RENAMED
Constant indicating that an installed library or folder was renamed, but the product does not allow dynamic naming.static java.lang.String
LOAD_TYPE_CODE
Constant indicating a product load type of *CODE.static java.lang.String
LOAD_TYPE_LANGUAGE
Constant indicating a product load type of *LNG.static java.lang.String
PRODUCT_FEATURE_CODE
Constant indicating a feature ID of *CODE.static java.lang.String
PRODUCT_ID_OPERATING_SYSTEM
Constant indicating a product ID of *OPSYS.static java.lang.String
PRODUCT_OPTION_BASE
Constant indicating a product option of *BASE.static java.lang.String
PRODUCT_RELEASE_ANY
Constant indicating that the release level of the product should be determined at runtime by the system.static java.lang.String
PRODUCT_RELEASE_CURRENT
Constant indicating a release level of *CUR.static java.lang.String
PRODUCT_RELEASE_ONLY
Constant indicating a release level of *ONLY.static java.lang.String
PRODUCT_RELEASE_PREVIOUS
Constant indicating a release level of *PRV.static java.lang.String
REGISTRATION_TYPE_CUSTOMER
Constant indicating that the registration type *CUSTOMER was specified when the product load or product definition was created.static java.lang.String
REGISTRATION_TYPE_PHONE
Constant indicating that the registration type *PHONE was specified when the product load or product definition was created.static java.lang.String
REGISTRATION_TYPE_SYSTEM
Constant indicating that the registration type is the same as the registration type for the operating system.static int
REQUIREMENTS_BASE_TOO_OLD
Constant indicating that the release of the *BASE is too old compared to the option.static int
REQUIREMENTS_MET
Constant indicating that the releases of the *BASE and option meet all requirements.static int
REQUIREMENTS_OPTION_TOO_OLD
Constant indicating that the release of the option is too old compared to the *BASE.static int
REQUIREMENTS_UNKNOWN
Constant indicating that there is not enough information available to determine if the release requirements have been met.static java.lang.String
SYMBOLIC_LOAD_STATE_CREATED
Constant indicating that the product load object for this load exists.static java.lang.String
SYMBOLIC_LOAD_STATE_DAMAGED
Constant indicating that either the product load object has been damaged (if this option is something other than the base option or the load type is a language load), or the product definition for this product ID and release level has been damaged or the product load object has been damaged (if this option is for the base option and code load type).static java.lang.String
SYMBOLIC_LOAD_STATE_DEFINED
Constant indicating that the load is defined but the product load object for this load does not exist.static java.lang.String
SYMBOLIC_LOAD_STATE_INSTALLED
Constant indicating that the product load object for this load was loaded on to the system by the Restore Licensed Program (RSTLICPGM) command.static java.lang.String
SYMBOLIC_LOAD_STATE_LOADED
Constant indicating that either a Restore Licensed Program (RSTLICPGM) function is in progress, a Delete Licensed Program (DLTLICPGM) function is in progress, or the product was created previous to V2R2M0 and there was an error during the process of converting product information.static java.lang.String
SYMBOLIC_LOAD_STATE_PACKAGED
Constant indicating that the product load object for this load has been packaged with the Package Product Option (PKGPRDOPT) command.
-
Constructor Summary
Constructors Constructor and Description Product(AS400 system, java.lang.String productID)
Constructs a Product object.Product(AS400 system, java.lang.String productID, java.lang.String productOption)
Constructs a Product object.Product(AS400 system, java.lang.String productID, java.lang.String productOption, java.lang.String releaseLevel, java.lang.String featureID)
Constructs a Product object.Product(AS400 system, java.lang.String productID, java.lang.String productOption, java.lang.String releaseLevel, java.lang.String loadType, java.lang.String languageID)
Constructs a Product object.
-
Method Summary
Methods Modifier and Type Method and Description boolean
allowsDynamicNaming()
Indicates if the names of product libraries and root folders for this product option can be dynamically changed without causing a product error.boolean
allowsMixedReleases()
Indicates if this product allows mixed releases between its *BASE and options.boolean
allowsMultipleReleases()
Indicates if this product can be installed at a release level different from the current release level without installing over a current release.java.lang.String
getCurrentCopyright()
Returns the value specified for the copyright current year when the product definition for this product load was created.java.lang.String
getDescriptionID()
Returns the message ID associated with this product option.java.lang.String
getDescriptionMessageFile()
Returns the full pathname of the message file that contains the messages describing the product and its options.java.lang.String
getDescriptionText()
Retrieves the description text for this product's message ID out of this product's message file.ProductDirectoryInformation[]
getDirectoryInformation()
Returns the list of product directories for this product.java.lang.String
getFeatureID()
Returns the feature ID for this product.java.lang.String
getFirstCopyright()
Returns the value specified for the copyright first year when the product definition for this product load was created.java.lang.String
getLevel()
Returns the release level of this product.ProductLicense
getLicense()
Returns a ProductLicense object representing license information for this product.java.lang.String
getLoadState()
Returns the state of the product load for which information was retrieved.java.lang.String
getLoadType()
Returns the type of product load for which information was retrieved.java.lang.String
getMinimumRequiredRelease()
Returns the minimum release level that is allowed for the option that will run with the current level of the *BASE option for the product.java.lang.String
getMinimumRequiredReleaseForBase()
Returns the minimum release level that is allowed for the *BASE option that will run with the current level of the option for the product.java.lang.String
getMinimumTargetRelease()
Returns the minimum operating system release to which the Save Licensed Program (SAVLICPGM) command will allow the product to be saved.java.lang.String
getPrimaryLanguageFeatureID()
Returns the primary language feature ID for this product.java.lang.String
getProductID()
Returns the product ID for this product.java.lang.String
getProductOption()
Returns the product option for this product.Product[]
getProductOptions()
Returns the list of product options for this product ID.PTF[]
getPTFs(boolean includeSupersededPTFs)
Returns the list of Program Temporary Fixes (PTFs) on the system for this product.java.lang.String
getRegistrationType()
Returns the registration type associated with this product.java.lang.String
getRegistrationValue()
Returns the registration value associated with this product.java.util.Date
getReleaseDate()
Returns the value specified for the release date when the product definition for this product load was created.java.lang.String
getReleaseLevel()
Returns the release level for this product.int
getRequirementsMet()
Returns the reason why the release requirements between the base and option may or may not be in error.java.lang.String
getSymbolicLoadState()
Returns the symbolic load state for which information was retrieved.AS400
getSystem()
Returns the system.boolean
isInstalled()
Indicates whether or not this product is installed on the system.boolean
isLoadInError()
Indicates if there is a known error for this product load.boolean
isSupported()
Indicates whether this product feature is currently supported.boolean
refresh()
Refreshes the current values and settings for this Product by retrieving all of them from the system.java.lang.String
toString()
Returns a String representation of this product in the format "product ID/product option/release level".
-
-
-
Field Detail
-
LOAD_STATE_DEFINED_NO_OBJECT
public static final java.lang.String LOAD_STATE_DEFINED_NO_OBJECT
Constant indicating that the product load is defined but the product load object for this load does not exist. When a product definition is created, a code load is defined for each product option, and language loads can be defined.- See Also:
- Constant Field Values
-
LOAD_STATE_DEFINED_OBJECT_EXISTS
public static final java.lang.String LOAD_STATE_DEFINED_OBJECT_EXISTS
Constant indicating that the product load object exists, but before it can be saved using the Save Licensed Program (SAVLICPGM) command, it must be packaged with either the Package Product Option (PKGPRDOPT) command or the Package Product Option (QSZPKGPO) API.- See Also:
- Constant Field Values
-
LOAD_STATE_PACKAGED_RESTORE_FAILED_EXIT_PROGRAM_FAILED
public static final java.lang.String LOAD_STATE_PACKAGED_RESTORE_FAILED_EXIT_PROGRAM_FAILED
Constant indicating that a Restore Licensed Program (RSTLICPGM) command did not complete successfully. A preoperation exit program failed. The product being replaced had been packaged, but not installed.- See Also:
- Constant Field Values
-
LOAD_STATE_PACKAGED_RESTORE_FAILED
public static final java.lang.String LOAD_STATE_PACKAGED_RESTORE_FAILED
Constant indicating that a Restore Licensed Program (RSTLICPGM) command failed. A preoperation exit program did not fail. The product being replaced had been packaged, but not installed.- See Also:
- Constant Field Values
-
LOAD_STATE_PACKAGED
public static final java.lang.String LOAD_STATE_PACKAGED
Constant indicating that the product load object for this load has been packaged with the Package Product Option (PKGPRDOPT) command or the Package Product Option (QSZPKGPO) API.- See Also:
- Constant Field Values
-
LOAD_STATE_PACKAGED_RENAMED
public static final java.lang.String LOAD_STATE_PACKAGED_RENAMED
Constant indicating that the product load object for this load has been packaged with the Package Product Option (PKGPRDOPT) command or the Package Product Option (QSZPKGPO) API, but either a development library or folder was renamed when the product does not allow dynamic naming, or the product definition or product load for a packaged load was renamed or moved to another library.- See Also:
- Constant Field Values
-
LOAD_STATE_PACKAGED_DAMAGED
public static final java.lang.String LOAD_STATE_PACKAGED_DAMAGED
Constant indicating that the product load object for this load has been packaged with the Package Product Option (PKGPRDOPT) command or the Package Product Option (QSZPKGPO) API, but an object was found to be damaged the last time that the Check Product Option (CHKPRDOPT) command or Save Licensed Program (SAVLICPGM) command was used for this load.- See Also:
- Constant Field Values
-
LOAD_STATE_PACKAGED_DELETED
public static final java.lang.String LOAD_STATE_PACKAGED_DELETED
Constant indicating that the product load object for this load has been packaged with the Package Product Option (PKGPRDOPT) command or the Package Product Option (QSZPKGPO) API, but either an attempt was made to delete the product load using the Delete Licensed Program (DLTLICPGM) command and the attempt failed, or a packaged object was missing the last time the Check Product Option (CHKPRDOPT) command or Save Licensed Program (SAVLICPGM) command was used for this load.- See Also:
- Constant Field Values
-
LOAD_STATE_PACKAGED_RESTORE_IN_PROGRESS
public static final java.lang.String LOAD_STATE_PACKAGED_RESTORE_IN_PROGRESS
Constant indicating that a Restore Licensed Program (RSTLICPGM) command is in progress. The product being replaced had been packaged, but not installed.- See Also:
- Constant Field Values
-
LOAD_STATE_PACKAGED_DELETE_IN_PROGRESS
public static final java.lang.String LOAD_STATE_PACKAGED_DELETE_IN_PROGRESS
Constant indicating that a Delete Licensed Program (DLTLICPGM) command is in progress. The product being deleted had been packaged, but not installed.- See Also:
- Constant Field Values
-
LOAD_STATE_INSTALLED_RESTORE_IN_PROGRESS
public static final java.lang.String LOAD_STATE_INSTALLED_RESTORE_IN_PROGRESS
Constant indicating that a Restore Licensed Program (RSTLICPGM) command is in progress. The product being replaced had been installed.- See Also:
- Constant Field Values
-
LOAD_STATE_INSTALLED_DELETE_IN_PROGRESS
public static final java.lang.String LOAD_STATE_INSTALLED_DELETE_IN_PROGRESS
Constant indicating that a Delete Licensed Program (DLTLICPGM) command is in progress. The product being deleted had been installed.- See Also:
- Constant Field Values
-
LOAD_STATE_IBM_SUPPLIED_NOT_COMPATIBLE
public static final java.lang.String LOAD_STATE_IBM_SUPPLIED_NOT_COMPATIBLE
Constant indicating that this product is an IBM-supplied product and it is not compatible with the currently installed release level of the System i operating system. An error occurred when the product was restored or when the operating system was installed. The IBM-supplied product is at a release level earlier than V2R2M0, which is not supported by the Save Licensed Program (SAVLICPGM) command.- See Also:
- Constant Field Values
-
LOAD_STATE_INSTALLED_RESTORE_FAILED_EXIT_PROGRAM_FAILED
public static final java.lang.String LOAD_STATE_INSTALLED_RESTORE_FAILED_EXIT_PROGRAM_FAILED
Constant indicating that a Restore Licensed Program (RSTLICPGM) command did not complete successfully. A preoperation exit program failed. The product being replaced had been installed.- See Also:
- Constant Field Values
-
LOAD_STATE_INSTALLED_RESTORE_FAILED
public static final java.lang.String LOAD_STATE_INSTALLED_RESTORE_FAILED
Constant indicating that a Restore Licensed Program (RSTLICPGM) command failed. The failure was not a preoperation exit program or postoperation exit program. The product being replaced had been installed.- See Also:
- Constant Field Values
-
LOAD_STATE_RESTORED
public static final java.lang.String LOAD_STATE_RESTORED
Constant indicating that the product load object for this load was loaded on to the system by the Restore Licensed Program (RSTLICPGM) command.- See Also:
- Constant Field Values
-
LOAD_STATE_RESTORED_EXIT_PROGRAM_FAILED
public static final java.lang.String LOAD_STATE_RESTORED_EXIT_PROGRAM_FAILED
Constant indicating that the product load object for this load was loaded on to the system by the Restore Licensed Program (RSTLICPGM) command but a postoperation exit program failed.- See Also:
- Constant Field Values
-
LOAD_STATE_RESTORED_RENAMED
public static final java.lang.String LOAD_STATE_RESTORED_RENAMED
Constant indicating that an installed library or folder was renamed, but the product does not allow dynamic naming.- See Also:
- Constant Field Values
-
LOAD_STATE_RESTORED_DAMAGED
public static final java.lang.String LOAD_STATE_RESTORED_DAMAGED
Constant indicating that the product load object for this load was installed by the Restore Licensed Program (RSTLICPGM) command, but an object is damaged.- See Also:
- Constant Field Values
-
LOAD_STATE_RESTORED_DELETED
public static final java.lang.String LOAD_STATE_RESTORED_DELETED
Constant indicating that the product load object for this load was installed by the Restore Licensed Program (RSTLICPGM) command, but either an object was found to be missing when the Check Product Option (CHKPRDOPT) command or the Save Licensed Program (SAVLICPGM) command was used, or an error occurred while the Delete Licensed Program (DLTLICPGM) command was being used.- See Also:
- Constant Field Values
-
LOAD_STATE_CHECK_ERROR
public static final java.lang.String LOAD_STATE_CHECK_ERROR
Constant indicating that the Check Product Option (CHKPRDOPT) command was used for this product load, but the postoperation exit program failed or indicated that an error was found.- See Also:
- Constant Field Values
-
LOAD_STATE_INSTALLED
public static final java.lang.String LOAD_STATE_INSTALLED
Constant indicating that the product load was installed successfully. If an object was missing or was damaged, but the problem was corrected, using the Check Product Option (CHKPRDOPT) command sets the state back to this.- See Also:
- Constant Field Values
-
LOAD_TYPE_CODE
public static final java.lang.String LOAD_TYPE_CODE
Constant indicating a product load type of *CODE.- See Also:
- Constant Field Values
-
LOAD_TYPE_LANGUAGE
public static final java.lang.String LOAD_TYPE_LANGUAGE
Constant indicating a product load type of *LNG.- See Also:
- Constant Field Values
-
PRODUCT_OPTION_BASE
public static final java.lang.String PRODUCT_OPTION_BASE
Constant indicating a product option of *BASE.- See Also:
- Constant Field Values
-
PRODUCT_FEATURE_CODE
public static final java.lang.String PRODUCT_FEATURE_CODE
Constant indicating a feature ID of *CODE.- See Also:
- Constant Field Values
-
PRODUCT_ID_OPERATING_SYSTEM
public static final java.lang.String PRODUCT_ID_OPERATING_SYSTEM
Constant indicating a product ID of *OPSYS.- See Also:
- Constant Field Values
-
PRODUCT_RELEASE_CURRENT
public static final java.lang.String PRODUCT_RELEASE_CURRENT
Constant indicating a release level of *CUR.- See Also:
- Constant Field Values
-
PRODUCT_RELEASE_ONLY
public static final java.lang.String PRODUCT_RELEASE_ONLY
Constant indicating a release level of *ONLY.- See Also:
- Constant Field Values
-
PRODUCT_RELEASE_PREVIOUS
public static final java.lang.String PRODUCT_RELEASE_PREVIOUS
Constant indicating a release level of *PRV.- See Also:
- Constant Field Values
-
PRODUCT_RELEASE_ANY
public static final java.lang.String PRODUCT_RELEASE_ANY
Constant indicating that the release level of the product should be determined at runtime by the system.- See Also:
- Constant Field Values
-
REGISTRATION_TYPE_PHONE
public static final java.lang.String REGISTRATION_TYPE_PHONE
Constant indicating that the registration type *PHONE was specified when the product load or product definition was created.- See Also:
- Constant Field Values
-
REGISTRATION_TYPE_SYSTEM
public static final java.lang.String REGISTRATION_TYPE_SYSTEM
Constant indicating that the registration type is the same as the registration type for the operating system.- See Also:
- Constant Field Values
-
REGISTRATION_TYPE_CUSTOMER
public static final java.lang.String REGISTRATION_TYPE_CUSTOMER
Constant indicating that the registration type *CUSTOMER was specified when the product load or product definition was created.- See Also:
- Constant Field Values
-
REQUIREMENTS_UNKNOWN
public static final int REQUIREMENTS_UNKNOWN
Constant indicating that there is not enough information available to determine if the release requirements have been met. This will be the value if the load type is LOAD_TYPE_LANGUAGE.- See Also:
- Constant Field Values
-
REQUIREMENTS_MET
public static final int REQUIREMENTS_MET
Constant indicating that the releases of the *BASE and option meet all requirements.- See Also:
- Constant Field Values
-
REQUIREMENTS_OPTION_TOO_OLD
public static final int REQUIREMENTS_OPTION_TOO_OLD
Constant indicating that the release of the option is too old compared to the *BASE.- See Also:
- Constant Field Values
-
REQUIREMENTS_BASE_TOO_OLD
public static final int REQUIREMENTS_BASE_TOO_OLD
Constant indicating that the release of the *BASE is too old compared to the option.- See Also:
- Constant Field Values
-
SYMBOLIC_LOAD_STATE_DEFINED
public static final java.lang.String SYMBOLIC_LOAD_STATE_DEFINED
Constant indicating that the load is defined but the product load object for this load does not exist.- See Also:
- Constant Field Values
-
SYMBOLIC_LOAD_STATE_CREATED
public static final java.lang.String SYMBOLIC_LOAD_STATE_CREATED
Constant indicating that the product load object for this load exists. It must be packaged with the Package Product Option (PKGPRDOPT) command before it can be saved using the Save Licensed Program (SAVLICPGM) command.- See Also:
- Constant Field Values
-
SYMBOLIC_LOAD_STATE_PACKAGED
public static final java.lang.String SYMBOLIC_LOAD_STATE_PACKAGED
Constant indicating that the product load object for this load has been packaged with the Package Product Option (PKGPRDOPT) command.- See Also:
- Constant Field Values
-
SYMBOLIC_LOAD_STATE_DAMAGED
public static final java.lang.String SYMBOLIC_LOAD_STATE_DAMAGED
Constant indicating that either the product load object has been damaged (if this option is something other than the base option or the load type is a language load), or the product definition for this product ID and release level has been damaged or the product load object has been damaged (if this option is for the base option and code load type).- See Also:
- Constant Field Values
-
SYMBOLIC_LOAD_STATE_LOADED
public static final java.lang.String SYMBOLIC_LOAD_STATE_LOADED
Constant indicating that either a Restore Licensed Program (RSTLICPGM) function is in progress, a Delete Licensed Program (DLTLICPGM) function is in progress, or the product was created previous to V2R2M0 and there was an error during the process of converting product information.- See Also:
- Constant Field Values
-
SYMBOLIC_LOAD_STATE_INSTALLED
public static final java.lang.String SYMBOLIC_LOAD_STATE_INSTALLED
Constant indicating that the product load object for this load was loaded on to the system by the Restore Licensed Program (RSTLICPGM) command.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Product
public Product(AS400 system, java.lang.String productID)
Constructs a Product object. The following default values are used:- productOption - PRODUCT_OPTION_BASE
- releaseLevel - PRODUCT_RELEASE_ANY
- featureID - PRODUCT_FEATURE_CODE
- Parameters:
system
- The system.productID
- The product identifier.
-
Product
public Product(AS400 system, java.lang.String productID, java.lang.String productOption)
Constructs a Product object. The following default values are used:- releaseLevel - PRODUCT_RELEASE_ANY
- featureID - PRODUCT_FEATURE_CODE
- Parameters:
system
- The system.productID
- The product identifier.productOption
- The product option.
-
Product
public Product(AS400 system, java.lang.String productID, java.lang.String productOption, java.lang.String releaseLevel, java.lang.String featureID)
Constructs a Product object.- Parameters:
system
- The system.productID
- The product identifier.productOption
- The product option.releaseLevel
- The release level of the product.featureID
- The product feature identifier.
-
Product
public Product(AS400 system, java.lang.String productID, java.lang.String productOption, java.lang.String releaseLevel, java.lang.String loadType, java.lang.String languageID)
Constructs a Product object. Sets featureID to PRODUCT_FEATURE_CODE.- Parameters:
system
- The system.productID
- The product identifier.productOption
- The product option.releaseLevel
- The release level of the product.loadType
- The type of product load.languageID
- The language feature ID for the product.
-
-
Method Detail
-
allowsDynamicNaming
public boolean allowsDynamicNaming() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Indicates if the names of product libraries and root folders for this product option can be dynamically changed without causing a product error.- Returns:
- true if the product can by dynamically named, false if it cannot.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
-
allowsMixedReleases
public boolean allowsMixedReleases() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Indicates if this product allows mixed releases between its *BASE and options.- Returns:
- true if the *BASE option and other options of this product can be at different release levels, false if they must all be at the same release level.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
-
allowsMultipleReleases
public boolean allowsMultipleReleases() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Indicates if this product can be installed at a release level different from the current release level without installing over a current release.- Returns:
- true if the product can be installed at a different release level, false if it cannot be installed at a different release level without installing over the current release.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
-
getCurrentCopyright
public java.lang.String getCurrentCopyright() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the value specified for the copyright current year when the product definition for this product load was created. If no copyright year was specified, then this method returns "".- Returns:
- The copyright current year.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
- See Also:
getFirstCopyright()
-
getDescriptionID
public java.lang.String getDescriptionID() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the message ID associated with this product option. The message ID was specified when the product definition was created.- Returns:
- The message ID representing the product option description.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
- See Also:
getDescriptionMessageFile()
,getDescriptionText()
-
getDescriptionMessageFile
public java.lang.String getDescriptionMessageFile() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the full pathname of the message file that contains the messages describing the product and its options.- Returns:
- The message file.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
- See Also:
getDescriptionID()
,getDescriptionText()
-
getDescriptionText
public java.lang.String getDescriptionText() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Retrieves the description text for this product's message ID out of this product's message file.- Returns:
- The description text, or null if an underlying error occurred while trying to load the description text from the message file.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
- See Also:
getDescriptionID()
,getDescriptionMessageFile()
-
getDirectoryInformation
public ProductDirectoryInformation[] getDirectoryInformation() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the list of product directories for this product.- Returns:
- The array of product directories and associated information.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
-
getFeatureID
public java.lang.String getFeatureID() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the feature ID for this product.- Returns:
- The feature ID.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
-
getFirstCopyright
public java.lang.String getFirstCopyright() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the value specified for the copyright first year when the product definition for this product load was created. If no copyright year was specified, then this method returns "".- Returns:
- The copyright first year.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
- See Also:
getCurrentCopyright()
-
getLevel
public java.lang.String getLevel() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the release level of this product.- Returns:
- The release level.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
-
getLicense
public ProductLicense getLicense() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns a ProductLicense object representing license information for this product.- Returns:
- The ProductLicense object.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
-
getLoadState
public java.lang.String getLoadState() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the state of the product load for which information was retrieved. Possible values are:LOAD_STATE_DEFINED_NO_OBJECT
LOAD_STATE_DEFINED_OBJECT_EXISTS
LOAD_STATE_PACKAGED_RESTORE_FAILED_EXIT_PROGRAM_FAILED
LOAD_STATE_PACKAGED_RESTORE_FAILED
LOAD_STATE_PACKAGED
LOAD_STATE_PACKAGED_RENAMED
LOAD_STATE_PACKAGED_DAMAGED
LOAD_STATE_PACKAGED_DELETED
LOAD_STATE_PACKAGED_RESTORE_IN_PROGRESS
LOAD_STATE_PACKAGED_DELETE_IN_PROGRESS
LOAD_STATE_INSTALLED_RESTORE_IN_PROGRESS
LOAD_STATE_INSTALLED_DELETE_IN_PROGRESS
LOAD_STATE_IBM_SUPPLIED_NOT_COMPATIBLE
LOAD_STATE_INSTALLED_RESTORE_FAILED_EXIT_PROGRAM_FAILED
LOAD_STATE_INSTALLED_RESTORE_FAILED
LOAD_STATE_RESTORED
LOAD_STATE_RESTORED_EXIT_PROGRAM_FAILED
LOAD_STATE_RESTORED_RENAMED
LOAD_STATE_RESTORED_DAMAGED
LOAD_STATE_RESTORED_DELETED
LOAD_STATE_CHECK_ERROR
LOAD_STATE_INSTALLED
- Returns:
- The load state.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
- See Also:
getSymbolicLoadState()
-
getLoadType
public java.lang.String getLoadType() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the type of product load for which information was retrieved. Possible values are:- Returns:
- The load type.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
-
getMinimumRequiredRelease
public java.lang.String getMinimumRequiredRelease() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the minimum release level that is allowed for the option that will run with the current level of the *BASE option for the product. This method is only applicable if mixed releases are allowed. Possible values are a release level (e.g. "V5R1M0") or "*MATCH" which indicates the release of the option matches that of *BASE.- Returns:
- The minimum required release level of this product option.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
- See Also:
allowsMixedReleases()
,getMinimumRequiredReleaseForBase()
-
getMinimumRequiredReleaseForBase
public java.lang.String getMinimumRequiredReleaseForBase() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the minimum release level that is allowed for the *BASE option that will run with the current level of the option for the product. This method is only applicable if mixed releases are allowed and if the load type is *CODE. Possible values are a release level (e.g. "V5R1M0") or "*MATCH" which indicates the release of the option matches that of *BASE.- Returns:
- The minimum required release level of the base product option.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
- See Also:
allowsMixedReleases()
,getMinimumRequiredRelease()
-
getMinimumTargetRelease
public java.lang.String getMinimumTargetRelease() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the minimum operating system release to which the Save Licensed Program (SAVLICPGM) command will allow the product to be saved.- Returns:
- The minimum target release (e.g. "V5R1M0").
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
-
getPrimaryLanguageFeatureID
public java.lang.String getPrimaryLanguageFeatureID() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the primary language feature ID for this product.For code loads, this is the primary language of the product option; that is, it is the National Language Version (NLV) of the language that is installed in the libraries. It is "" if no language is installed in the libraries for the code load.
For language loads (e.g. "2938"), it is "".
- Returns:
- The primary language feature ID, or "" if no language is installed or this product is a language load.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
- See Also:
getLoadType()
-
getProductID
public java.lang.String getProductID()
Returns the product ID for this product.- Returns:
- The product ID (e.g. "5722JC1").
-
getProductOption
public java.lang.String getProductOption()
Returns the product option for this product.- Returns:
- The product option (e.g. "*BASE" or "0012").
-
getProductOptions
public Product[] getProductOptions() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the list of product options for this product ID.- Returns:
- The array of products.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
-
getPTFs
public PTF[] getPTFs(boolean includeSupersededPTFs) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the list of Program Temporary Fixes (PTFs) on the system for this product.- Parameters:
includeSupersededPTFs
- Specify true to include any superseded PTFs in the list; false otherwise.- Returns:
- The array of PTFs. If there are no PTFs for the product, this method returns an array of size 0.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
-
getRegistrationType
public java.lang.String getRegistrationType() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the registration type associated with this product. The registration type and registration value together make up the registration ID for the product. Possible values are:- Returns:
- The registration type.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
- See Also:
getRegistrationValue()
-
getRegistrationValue
public java.lang.String getRegistrationValue() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the registration value associated with this product. The registration type and registration value together make up the registration ID for the product.- Returns:
- The registration value.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
- See Also:
getRegistrationType()
-
getReleaseDate
public java.util.Date getReleaseDate() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the value specified for the release date when the product definition for this product load was created. If no release date was specified for the product, then null is returned.- Returns:
- The release date, or null if there is no release date.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
-
getReleaseLevel
public java.lang.String getReleaseLevel() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the release level for this product. For example: "V5R1M0". If any of the special values were specified when this object was constructed, the real release level will be retrieved from the system.- Returns:
- The release level.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
-
getRequirementsMet
public int getRequirementsMet() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the reason why the release requirements between the base and option may or may not be in error. (When a product allows mixed releases between its base and option, certain requirements must be met). If the load type is LOAD_TYPE_LANGUAGE, then this method returns REQUIREMENTS_UNKNOWN. Possible values are:- Returns:
- The reason why requirements are met or not.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
- See Also:
getLoadType()
-
getSymbolicLoadState
public java.lang.String getSymbolicLoadState() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the symbolic load state for which information was retrieved. This value, in conjunction with the load error, can be used to determine if the load is installed correctly. Possible values are:- Returns:
- The symbolic load state.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
- See Also:
getLoadState()
,isLoadInError()
-
getSystem
public AS400 getSystem()
Returns the system.- Returns:
- The system.
-
isInstalled
public boolean isInstalled() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Indicates whether or not this product is installed on the system.- Returns:
- true if the product is installed, false if it is not.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
-
isLoadInError
public boolean isLoadInError() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Indicates if there is a known error for this product load. This does not mean that product is necessarily installed. Check the symbolic load state to determine if the product load is installed or not.- Returns:
- true if an error was found the last time that the state of this load was checked or updated, false if no error was found.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
- See Also:
getSymbolicLoadState()
-
isSupported
public boolean isSupported() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Indicates whether this product feature is currently supported. A feature can be supported by using the Work with Supported Products (WRKSPTPRD) command in the System Manager.- Returns:
- true if the feature is supported, false if it is not.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
-
refresh
public boolean refresh() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Refreshes the current values and settings for this Product by retrieving all of them from the system. The getter methods implicitly refresh the necessary value if the value being sought has not been retrieved yet.- Returns:
- true if some or all of the values were successfully refreshed; false if the system found no information for this product.
- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException
-
toString
public java.lang.String toString()
Returns a String representation of this product in the format "product ID/product option/release level".- Overrides:
toString
in classjava.lang.Object
- Returns:
- The product String.
-
-