com.ibm.jsdt.support
Class SupportOS400Helper

java.lang.Object
  extended by com.ibm.jsdt.support.SupportHelper
      extended by com.ibm.jsdt.support.SupportOS400Helper

Deprecated. Due to new package com.ibm.jsdt.support.deploymenthelper

public class SupportOS400Helper
extends SupportHelper

OS/400 specific helper functionality.


Field Summary
 
Fields inherited from class com.ibm.jsdt.support.SupportHelper
sNEWLN, theSupportBase
 
Constructor Summary
SupportOS400Helper()
          Deprecated. Sole constructor.
 
Method Summary
 boolean arePtfsApplied(SupportOS400Base s)
          Deprecated. Checks to see if each PTF in a specified list has been applied(PERM or TEMP) to the system.
 void chmodDirPermissions(SupportBase s)
          Deprecated. Changes the permissions on a directory.
 void chmodFilePermissions(SupportBase s)
          Deprecated. Changes the permissions on a file.
 boolean createSecOfrUser(SupportBase s)
          Deprecated. Creates an administrative user on the i5/OS machine.
 boolean createUser(SupportBase s)
          Deprecated. Creates a user on the i5/OS machine.
 boolean deleteUser(SupportBase s)
          Deprecated. Deletes a user on the i5/OS machine.
 boolean doesHaveSecOfrAuthority(SupportBase s)
          Deprecated. Determines whether or not the given user has "secofr" administrative authority.
 boolean doesUserExist(SupportBase s)
          Deprecated. Determines whether or not the specified user exists on the system.
 com.ibm.as400.access.AS400Message[] getArePtfsAppliedMessageList(SupportOS400Base s)
          Deprecated. Retrieves an array of messages that are associated with a failed program call in the arePtfsApplied method.
 com.ibm.as400.access.AS400 getAS400()
          Deprecated. Retrieves the AS400 system object.
 java.lang.String getLastCommandOutput(SupportBase s)
          Deprecated. Retrieves the output of the last invoked CL command.
 java.lang.String getLastCommandOutputFromInvoke()
          Deprecated. Retrieves the output of the last invoked command from the invokeCommandLogOutput method.
 java.lang.String getOSLevel(SupportBase s)
          Deprecated. Returns the current level of the i5/OS operating system in the form of "version.release.modification".
 int getOSRelease(SupportBase s)
          Deprecated. Obtains the current i5/OS release.
 int getOSVersion(SupportBase s)
          Deprecated. Obtains the current i5/OS version.
 java.lang.String getSystemCommandOutput(java.lang.String command, java.lang.String commandToLog)
          Deprecated. Run a QSH command.
 int invokeCommandLogOutput(java.lang.String command, java.lang.String logCommand, boolean convertFromEBCDIC, java.lang.String workingDir)
          Deprecated. Run a QSH command.
 boolean isCurrentReleaseEqualOrGreater(SupportOS400Base s)
          Deprecated. Indicates whether or not the versoin and release of the current OS/400 computer is greater than or equal to a specified expected value.
 boolean isProductInstall(java.lang.String productId, java.lang.String release, java.lang.String option)
          Deprecated. Checks the system to see if the product and option are install on the machine for a specific version.
 boolean isProductInstalled(SupportOS400Base s)
          Deprecated. Checks the system to see if a product and option are installed on the machine for a specific os version.
 boolean isProductInstalled(SupportOS400Base s, boolean useProductClass)
          Deprecated. Checks the system to see if a product and option are installed on the machine for a specific OS version.
 boolean isUserPasswordValid(SupportBase s)
          Deprecated. Determines the validity of the given user/password combination.
 void reboot(SupportBase s)
          Deprecated. Reboots the i5/OS machine.
 boolean runCLCommand(SupportBase s)
          Deprecated. Runs a CL command.
 
Methods inherited from class com.ibm.jsdt.support.SupportHelper
arraySearch, buildCommand, checkDeployerVersion, checkFreeSpace, checkFreeSpaceAvailable, checkTargetDir, checkTargetDirectory, compareVersions, copyDirectory, determineLogFileName, directoryGrep, endOfFileGrep, executeCommand, fileCopy, fileCopyAndRename, fileDelete, fileExists, fileGrep, fileGrep, fileLength, fileSearchAndReplace, fileSearchAndReplaceLine, fileSearchAndReturnLinesWithSearch, findAndReplace, getBackLevelLogFileName, getCommandStdError, getCommandStdOut, getDeployerLocale, getDomain, getEntryResponseFilePath, getExitResponseFilePath, getFileValue, getGroupLocale, getHostName, getIbmNsiISMPPropValue, getIbmNsiProperties, getIbmNsiPropValue, getIbmNsiPropValue, getIbmNsiPropValueByKey, getLastCommandReturnCode, getLogsDir, getMainResponseFilePath, getOSType, getPartitionCapacity, getPartitionFileSystemType, getPartitionVolumeLabel, getPasswordValue, getPasswordValueByKey, getPreDeploymentCheckerResponseFilePath, getProductInstallingBundleProperties, getProductInstallingId, getProductInstallingVersion, getQualifiedHostName, getQualifiedHostName, getQualifiedTiedPasswordValue, getQualifiedTiedVariableValue, getResponseFilePath, getResponseFilePath, getResponseFilePaths, getResponseFileProperties, getResponseFileProperty, getResponseFileValue, getSelectedTaskList, getSetupFileRemovalSetting, getStringFromCommandArray, getSystemCommandOutput, getSystemEnvVar, getTaskApplicationList, getTaskHostnameList, getTempDir, getTheSupportBase, getTiedPasswordValue, getTiedPasswordValueForKey, getTiedVariableValue, getTiedVariableValueForKey, getTranslatedMessage, getUnpackedDir, getVariableValueForTaskApplication, getVpdInstallLocationArray, getVpdPropertyList, getVpdVersionArray, invokeCommand, invokeCommand, invokeCommand, invokeCommandLogOutput, invokeCommandLogOutput, invokeCommandLogOutput, invokeCommandLogOutputToFileName, invokeCommandLogOutputToFileName, invokeCommandLogOutputToFileName, isAix, isAixOSType, isApplicationVersionEqual, isEnoughTargetDirSpace, isEnoughTargetDirSpaceAvailable, isHPUX, isHPUXOSType, isIpv6Address, isLinux, isLinuxOSType, isLinuxX86_32, isLinuxX86_64, isOS400, isOS400OSType, isPortOpen, isPortRegistered, isPowerLinuxOSType, isSameDirectoryName, isSunOS, isSunOSType, isVersionSupported, isWindows, isWindowsOSType, launchAndWait, launchLocalInteractiveProgram, log, log, log, logAppendFile, logAppendFile, logAppendFile, logAppendFile, logAppendFile, logNewLine, logStatus, modifyResponseFile, postCompletionMessageToDeployerUI, postErrorMessageToDeployerMainUI, postErrorMessageToDeployerUI, postInformationMessageToDeployerMainUI, postInformationMessageToDeployerUI, postSuccessMessageToDeployerMainUI, postSuccessMessageToDeployerUI, postWarningMessageToDeployerMainUI, postWarningMessageToDeployerUI, readFile, removeAlphaCharsFromString, replaceSubstring, setFileValue, setIbmNsiProperty, setResponseFileProperty, setResponseFileValue, setResponseFileValue, setTheSupportBase, trimDoubleQuotes, unPackJar, valueExists, waitForFile, writeFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SupportOS400Helper

public SupportOS400Helper()
Deprecated. 
Sole constructor.

Method Detail

chmodDirPermissions

public void chmodDirPermissions(SupportBase s)
Deprecated. 
Changes the permissions on a directory.

The SupportBase to be queried must invoke SupportBase.setPath and SupportBase.setChmodValue before calling this method.

Parameters:
s - the SupportBase to be queried
  • a String path SupportBase.getPath
  • a String valid chmod argument SupportBase.getChmodValue

chmodFilePermissions

public void chmodFilePermissions(SupportBase s)
Deprecated. 
Changes the permissions on a file.

The SupportBase to be queried must invoke SupportBase.setFileName and SupportBase.setChmodValue before calling this method.

Parameters:
s - the SupportBase to be queried
  • a String file name SupportBase.getFileName
  • a String valid chmod argument SupportBase.getChmodValue

createSecOfrUser

public boolean createSecOfrUser(SupportBase s)
Deprecated. 
Creates an administrative user on the i5/OS machine. The user will have "secofr" authority.

The SupportBase to be queried must invoke SupportBase.setUserName and SupportBase.setPassword before calling this method.

Parameters:
s - the SupportBase to be queried
  • a String user name SupportBase.getUserName
  • a String password SupportBase.getPassword
Returns:
a boolean
  • true if successfully created
  • false otherwise

createUser

public boolean createUser(SupportBase s)
Deprecated. 
Creates a user on the i5/OS machine.

The SupportBase to be queried must invoke SupportBase.setUserName and SupportBase.setPassword before calling this method.

Parameters:
s - the SupportBase to be queried
  • a String user name SupportBase.getUserName
  • a String password SupportBase.getPassword
Returns:
a boolean
  • true if successfully created
  • false otherwise

deleteUser

public boolean deleteUser(SupportBase s)
Deprecated. 
Deletes a user on the i5/OS machine.

The SupportBase to be queried must invoke SupportBase.setUserName before calling this method.

Parameters:
s - the SupportBase to be queried
  • a String user name SupportBase.getUserName
    Returns:
    a boolean
    • true if successfully deleted
    • false otherwise

reboot

public void reboot(SupportBase s)
Deprecated. 
Reboots the i5/OS machine.


doesHaveSecOfrAuthority

public boolean doesHaveSecOfrAuthority(SupportBase s)
Deprecated. 
Determines whether or not the given user has "secofr" administrative authority.

The SupportBase to be queried must invoke SupportBase.setUserName before calling this method.

Parameters:
s - the SupportBase to be queried
  • a String user name SupportBase.getUserName
    Returns:
    a boolean
    • true if user has authority
    • false otherwise

isUserPasswordValid

public boolean isUserPasswordValid(SupportBase s)
Deprecated. 
Determines the validity of the given user/password combination.

The SupportBase to be queried must invoke SupportBase.setUserName and SupportBase.setPassword before calling this method.

Parameters:
s - the SupportBase to be queried
  • a String user name SupportBase.getUserName
  • a String password SupportBase.getPassword
Returns:
a boolean
  • true if password is valid for user
  • false otherwise

doesUserExist

public boolean doesUserExist(SupportBase s)
Deprecated. 
Determines whether or not the specified user exists on the system.

The SupportBase to be queried must invoke SupportBase.setUserName before calling this method.

Parameters:
s - the SupportBase to be queried
  • a String user name SupportBase.getUserName
    Returns:
    a boolean
    • true if user has authority
    • false otherwise

runCLCommand

public boolean runCLCommand(SupportBase s)
Deprecated. 
Runs a CL command.

The SupportBase to be queried must invoke SupportBase.setCommand before calling this method.

Parameters:
s - the SupportBase to be queried
  • a String CL command line SupportBase.getCommand
    Returns:
    a boolean
    • true if command returns true
    • false otherwise

getLastCommandOutput

public java.lang.String getLastCommandOutput(SupportBase s)
Deprecated. 
Retrieves the output of the last invoked CL command.

Overrides:
getLastCommandOutput in class SupportHelper
Parameters:
s - SupportBase to be queried
Returns:
the output of the command

getOSLevel

public java.lang.String getOSLevel(SupportBase s)
Deprecated. 
Returns the current level of the i5/OS operating system in the form of "version.release.modification".

Returns:
the OS level

getOSVersion

public int getOSVersion(SupportBase s)
Deprecated. 
Obtains the current i5/OS version.

Returns:
the version

getOSRelease

public int getOSRelease(SupportBase s)
Deprecated. 
Obtains the current i5/OS release.

Returns:
the release number

isProductInstalled

public boolean isProductInstalled(SupportOS400Base s,
                                  boolean useProductClass)
Deprecated. 
Checks the system to see if a product and option are installed on the machine for a specific OS version. It uses the "Product" class which replaces the RSoftwareResource class in V5R4.

The SupportOS400Base to be queried must invoke SupportOS400Base.setOs400ProductId and SupportOS400Base.setOs400ProductOption and SupportOS400Base.setOs400Release before calling this method.

SupportOS400Base.setOs400ProductId sets a Product ID to check for. For example 5722DG1. SSupportOS400Base.setOs400ProductOption sets a specific option to check for. SupportOS400Base.setOs400Release sets a i5/OS release to check for..

See Product Javadoc for constant values.

Type Parameters:
code - SupportOS400Base
Returns:
boolean True if the product and option are correctly installed for the release specified. false if the product is not installed, or if it is on the system, but not in a fully installed state.

isProductInstalled

public boolean isProductInstalled(SupportOS400Base s)
Deprecated. 
Checks the system to see if a product and option are installed on the machine for a specific os version. This method uses the deprecated class "RSoftwareResource" and has been left for backward compatiblity.

The SupportOS400Base to be queried must invoke SupportOS400Base.setOs400ProductId and SupportOS400Base.setOs400ProductOption and SupportOS400Base.setOs400Release before calling this method.

SupportOS400Base.setOs400ProductId sets a Product ID to check for. For example 5722DG1. SSupportOS400Base.setOs400ProductOption sets a specific option to check for. SupportOS400Base.setOs400Release sets a i5/OS release to check for..

See RSoftwareResource Javadoc for constant values.

Type Parameters:
code - SupportOS400Base
Returns:
boolean True if the product and option are correctly installed for the release specified. false if the product is not installed, or if it is on the system, but not in a fully installed state.

arePtfsApplied

public boolean arePtfsApplied(SupportOS400Base s)
Deprecated. 
Checks to see if each PTF in a specified list has been applied(PERM or TEMP) to the system.

Applied is defined as temporary applied, permantly applied, or superseded. If a PTF is loaded or has a SAVF it is NOT considered applied.

The ptfList must contain String[3] arrays for each entry. Each entry(String[3]) must contain {, , }. For example one entry would be an String[]{"5722DG1", "V5R2M0", "SI13933"}.

The SupportOS400Base to be queried must invoke SupportOS400Base.setPtfList() prior to invoking this method.

Type Parameters:
code - SupportOS400Base
Returns:
boolean false if one or more PTFs in the list is not applied, true if every PTF in the list has been applied.

getAS400

public com.ibm.as400.access.AS400 getAS400()
Deprecated. 
Retrieves the AS400 system object.

Returns:
AS400

getArePtfsAppliedMessageList

public com.ibm.as400.access.AS400Message[] getArePtfsAppliedMessageList(SupportOS400Base s)
Deprecated. 
Retrieves an array of messages that are associated with a failed program call in the arePtfsApplied method.

The arePtfsApplied method must be invoked prior to calling this method.

Nothing needs to be set into the SupportOS400Base prior to calling this mehtod.

Type Parameters:
code - SupportOS400Base
Returns:
AS400Message[]

isCurrentReleaseEqualOrGreater

public boolean isCurrentReleaseEqualOrGreater(SupportOS400Base s)
Deprecated. 
Indicates whether or not the versoin and release of the current OS/400 computer is greater than or equal to a specified expected value.

For example, if a release of V5R2M0 was passed, and the current machine is V5R1M0, then a false would be returned. If the release of the current machine is V5R2M0 or later, true is returned.

The SupportOS400Base to be queried must invoke SupportOS400Base.setOS400Release() prior to invoking this method.

Type Parameters:
code - SupportOS400Base
Returns:
boolean true if the current machine's release is the same or higher than the specified release, false otherwise.

isProductInstall

public boolean isProductInstall(java.lang.String productId,
                                java.lang.String release,
                                java.lang.String option)
Deprecated. 
Checks the system to see if the product and option are install on the machine for a specific version.

Parameters:
productId - Product ID to check for. For example 5722DG1.
release - i5/OS Release to check for. See RSoftwareResource Javadoc for constant values.
option - Specific option to check for. See RSoftwareResource Javadoc for constant values.
Returns:
True If the product, option is correctly installed for the release specified. False If the product is not installed, or if it is on the system, but not in a fully installed state.

invokeCommandLogOutput

public int invokeCommandLogOutput(java.lang.String command,
                                  java.lang.String logCommand,
                                  boolean convertFromEBCDIC,
                                  java.lang.String workingDir)
Deprecated. 
Run a QSH command. To run a CL command use the invokeCLCommand() method. The command and a success or failure message are logged. The output can also be written to the log. The output from the command can be gotten by calling getCommandOuput();

Parameters:
command - the command to run.
command - to write to the log. Can be used if the original contains secure information such as userid and/or password.
boolean - if the output of the command to should be logged as well.
boolean - if the output needs to be converted from EBCDIC to ASCII.
String - The working directory the command should be invoked from. If null is specified, the current working directory is used.
Returns:
the return code of the command

getLastCommandOutputFromInvoke

public java.lang.String getLastCommandOutputFromInvoke()
Deprecated. 
Retrieves the output of the last invoked command from the invokeCommandLogOutput method.

Returns:
String the output.

getSystemCommandOutput

public java.lang.String getSystemCommandOutput(java.lang.String command,
                                               java.lang.String commandToLog)
Deprecated. 
Run a QSH command. To run a CL command use the invokeCLCommand() method. The command and output are logged.

Overrides:
getSystemCommandOutput in class SupportHelper
Parameters:
command - - the command to run.
commadToLog - - the comamnd to log. If null or empty string is specified, a command will be logged.
Returns:
the command output if command completed successfully null otherwise