|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.are.platform.Platform
com.ibm.are.platform.impl.IBMi
public class IBMi
The IBMi
class implements platform specific operations that are required by
the ARE Core. This class also implements many useful IBM i specific utility methods, such
as determining determining the current OS release, determining if a specified product is
installed, as well as providing a fully initialized, ready to use IBM Toolbox for Java
AS400
object.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
Copyright for class bytecode |
static int |
POLICY_SHARE_GLOBAL_AS400
The getAS400() method will share a global AS400 object |
static int |
POLICY_SHARE_THREAD_AS400
The getAS400() method always return an AS400 object which has the same user id as the current thread user |
Fields inherited from class com.ibm.are.platform.Platform |
---|
fileSystem, logger, productInfo, shell, user |
Constructor Summary | |
---|---|
IBMi()
Constructs an IBMi object |
Method Summary | |
---|---|
protected static com.ibm.as400.access.AS400 |
buildAndValidateAS400()
Builds and validates an AS400 object for the current user |
UserInfo |
currentUser()
Retrieves an object that contains various pieces of information about the user profile that is running ARE. |
static void |
destroyThreadUserAS400()
Destroys the AS400 object associated with the current thread |
static IBMi |
get()
Retrieves a reference to the singleton IBMi object |
static com.ibm.as400.access.AS400 |
getAS400()
Get the shared AS400 object based on the sharing policy |
static java.lang.String |
getCurrentThreadUserID()
Retrieves the ID of the user running in the current thread |
java.lang.String |
getJavaProductId()
Retrieves the full seven digit Java product ID for the IBM i OS version where ARE is currently running. |
java.lang.String |
getJavaReleaseLevel()
Retrieves the release level for the Java product for the IBM i OS where ARE is currently running. |
java.lang.String |
getOsVersion()
Retrieves the IBM i OS version |
java.lang.String |
getProductIdPrefix()
Retrieves the OS-specific product ID prefix. |
java.lang.String |
getProductIdPrefix(java.lang.String forVersion)
Retrieves the IBM i product ID prefix for the specified OS version. |
boolean |
isIBMi()
Determines if the OS where ARE is currently running is an IBM i OS |
boolean |
isIBMp()
Determines if the OS where ARE is currently running is an IBM p OS |
boolean |
isIBMx()
Determines if the OS where ARE is currently running is an IBM x OS |
boolean |
isLanguageInstalled(java.lang.String productId,
java.lang.String language)
Determines if the specified language for the specified product is installed |
boolean |
isLanguageInstalled(java.lang.String productId,
java.lang.String productOption,
java.lang.String language)
Determines if the specified language for the specified product is installed |
boolean |
isLinux()
Determines if the OS where ARE is currently running is a Linux OS |
boolean |
isOsPrimaryLanguage(java.lang.String language)
Determines if the specified language is the IBM i OS primary language |
boolean |
isPriorToV6R1()
Determines if the IBM i OS where ARE is running is older than IBM i 6.1 |
boolean |
isPriorToV7R1()
Determines if the IBM i OS where ARE is running is older than IBM i 7.1 |
boolean |
isProductInstalled(java.lang.String productId,
java.lang.String productOption)
Determines if the specified IBM i product and option are installed |
boolean |
isProductInstalled(java.lang.String productId,
java.lang.String productOption,
java.lang.String osVersion)
Determines if the specified IBM i product and option are installed |
boolean |
isProductInstalled(java.lang.String productId,
java.lang.String productOption,
java.lang.String osVersion,
java.lang.String loadType,
java.lang.String langId)
Determines if the specified IBM i product and option are installed |
boolean |
isProductPrimaryLanguage(java.lang.String productId,
java.lang.String language)
Determines if the specified language for the specified product is the product's primary language |
boolean |
isPtfInstalled(java.lang.String ptfName)
Determines if the specified PTF is installed |
boolean |
isV5R4()
Determines if the IBM i OS where ARE is running is IBM 5.4 |
boolean |
isV6R1()
Determines if the IBM i OS where ARE is running is IBM 6.1 |
boolean |
isV6R1OrEarlier()
Determines if the IBM i OS where ARE is running is IBM 6.1 or older |
boolean |
isV6R1OrHigher()
Determines if the IBM i OS where ARE is running is IBM 6.1 or newer |
boolean |
isV7R1()
Determines if the IBM i OS where ARE is running is IBM 7.1 |
boolean |
isV7R1OrHigher()
Determines if the IBM i OS where ARE is running is IBM 7.1 or newer |
void |
onShutdown()
Platform specific hook for ARE shutdown. |
void |
onStartup()
Platform specific hook for ARE startup. |
boolean |
runtimeUserAuthorityChecks()
Checks if the IBM i user profile running ARE has *ALLOBJ authority. |
static void |
setAS400(com.ibm.as400.access.AS400 newi5)
Set the globally shared AS400 object |
static void |
setAS400SharePolicy(int policy)
Sets the share policy for the AS400 object managed by the IBMi object |
Methods inherited from class com.ibm.are.platform.Platform |
---|
current, fileSystem, getOsName, productInfo, shell |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final int POLICY_SHARE_GLOBAL_AS400
AS400
object
public static final int POLICY_SHARE_THREAD_AS400
AS400
object which has the same user id as the current thread user
Constructor Detail |
---|
public IBMi()
IBMi
object
Method Detail |
---|
public static IBMi get()
public static void setAS400SharePolicy(int policy)
AS400
object managed by the IBMi object
policy
- The share policy. Must be either POLICY_SHARE_GLOBAL_AS400
or POLICY_SHARE_THREAD_AS400
public static com.ibm.as400.access.AS400 getAS400()
AS400
object based on the sharing policy
AS400
objectpublic static void setAS400(com.ibm.as400.access.AS400 newi5)
AS400
object
newi5
- The new globally shared AS400
objectpublic static java.lang.String getCurrentThreadUserID()
public static void destroyThreadUserAS400()
AS400
object associated with the current thread
public boolean isIBMi()
isIBMi
in class Platform
true
if the OS is an IBM i OS, false
if it is notpublic boolean isIBMp()
isIBMp
in class Platform
true
if the OS is an IBM p OS, false
if it is notpublic boolean isLinux()
isLinux
in class Platform
true
if the OS is a Linux OS, false
if it is notpublic boolean isIBMx()
isIBMx
in class Platform
true
if the OS is an IBM x OS, false
if it is notpublic void onStartup()
onStartup
in class Platform
public void onShutdown()
AS400
object cached in this class.
onShutdown
in class Platform
public boolean isV5R4()
true
if the IBM i OS is 5.4, false
if it is notpublic boolean isV6R1()
true
if the IBM i OS is 6.1, false
if it is notpublic boolean isV7R1()
true
if the IBM i OS is 7.1, false
if it is notpublic boolean isV7R1OrHigher()
true
if the IBM i OS is 7.1 or newer, false
if it is notpublic boolean isPriorToV7R1()
true
if the IBM i OS is older than IBM i 7.1, false
if it is notpublic boolean isV6R1OrEarlier()
true
if the IBM i OS is 6.1 or older, false
if it is notpublic boolean isV6R1OrHigher()
true
if the IBM i OS is 6.1 or newer, false
if it is notpublic boolean isPriorToV6R1()
true
if the IBM i OS is older than IBM i 6.1, false
if it is notpublic java.lang.String getProductIdPrefix()
public java.lang.String getProductIdPrefix(java.lang.String forVersion)
forVersion
- The IBM i OS version. Valid values for this parameter are:
getProductIdPrefix()
public java.lang.String getJavaProductId()
public java.lang.String getJavaReleaseLevel()
public java.lang.String getOsVersion()
getOsVersion
in class Platform
public UserInfo currentUser()
currentUser
in class Platform
public boolean isProductInstalled(java.lang.String productId, java.lang.String productOption)
productId
- The IBM i product ID. This parameter can be either the full seven
character product ID (such as 5761SS1), or it can be only the last
three characters (such as SS1). If only three characters are provided,
the first four characters will be automatically added based on the
product ID prefix (5722, 5761, 5770) of the IBM i OS where ARE is
currently running.productOption
- The product option number, or *BASE for the base product option
true
if the product is installed, false
if it is notpublic boolean isProductInstalled(java.lang.String productId, java.lang.String productOption, java.lang.String osVersion)
productId
- The IBM i product ID. This parameter can be either the full seven
character product ID (such as 5761SS1), or it can be only the last
three characters (such as SS1). If only three characters are provided,
the first four characters will be automatically added based on the
product ID prefix (5722, 5761, 5770) of the IBM i OS where ARE is
currently running.productOption
- The product option number, or *BASE for the base product optionosVersion
- The release level of the product
true
if the product is installed, false
if it is notpublic boolean isProductInstalled(java.lang.String productId, java.lang.String productOption, java.lang.String osVersion, java.lang.String loadType, java.lang.String langId)
productId
- The IBM i product ID. This parameter can be either the full seven
character product ID (such as 5761SS1), or it can be only the last
three characters (such as SS1). If only three characters are provided,
the first four characters will be automatically added based on the
product ID prefix (5722, 5761, 5770) of the IBM i OS where ARE is
currently running.productOption
- The product option number, or *BASE for the base product optionosVersion
- The release level of the productloadType
- The load type of the product. Must be either *CODE or *LNGlangId
- The IBM i language ID of the product.
true
if the product is installed, false
if it is notpublic boolean isPtfInstalled(java.lang.String ptfName)
ptfName
- The PTF to check
true
if the PTF is installed, false
if it is notpublic boolean isLanguageInstalled(java.lang.String productId, java.lang.String language)
productId
- The seven character IBM i product IDlanguage
- The IBM i language identifier
true
if the language is installed, false
if it is notpublic boolean isLanguageInstalled(java.lang.String productId, java.lang.String productOption, java.lang.String language)
productId
- The seven character IBM i product IDproductOption
- The product option number, or *BASE for the base product optionlanguage
- The IBM i language identifier
true
if the language is installed, false
if it is notpublic boolean isProductPrimaryLanguage(java.lang.String productId, java.lang.String language)
productId
- The seven character IBM i product IDlanguage
- The IBM i language identifier
true
if the specified language is the product's primary language,
false
if it is notpublic boolean isOsPrimaryLanguage(java.lang.String language)
language
- The IBM i language identifier
true
if the specified language is the OS primary language,
false
if it is notpublic boolean runtimeUserAuthorityChecks()
true
is unconditionally returned.
runtimeUserAuthorityChecks
in class Platform
true
is always returnedprotected static com.ibm.as400.access.AS400 buildAndValidateAS400()
AS400
object for the current user
AS400
object for the current user
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |