|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.jsdt.support.SupportHelper
public class SupportHelper
Helper for pre-deployment checker, entry, exit, and main programs. The
SupportHeler
provides operating system independent utilities
commonly used in user programs developed for an application wrapper. Many
helper functions require the same parameters so the data is housed in a
SupportBase
. Values must be set in the base class before
calling their corresponding SupportHelper
function.
Field Summary | |
---|---|
static java.lang.String |
copyright
Deprecated. |
static java.lang.String |
sNEWLN
Deprecated. System independent line separator. |
protected SupportBase |
theSupportBase
Deprecated. |
Constructor Summary | |
---|---|
SupportHelper()
Deprecated. Sole constructor. |
Method Summary | |
---|---|
boolean |
arraySearch(java.lang.String[] messageArray,
java.lang.String searchString)
Deprecated. Search for a string in the array. |
java.lang.String |
buildCommand(java.lang.String propFileName,
java.lang.String command,
java.lang.String newFileName)
Deprecated. Build a command that first configures the variables defined in the properties file, then calls a command to run The following variables are always set in the command: - IRU_userProgamsDir - the fully qualified directory where user programs are unpacked - IRU_responseFile - the fully qualified name of the response file |
protected boolean |
checkDeployerVersion(SupportBase s,
java.lang.String minVersion,
java.lang.String methodName)
Deprecated. Verifies that the deployer version is compatible with the specified method and minimum version. |
int |
checkFreeSpace(SupportBase s)
Deprecated. use instead method checkFreeSpaceAvailable(SupportBase) |
long |
checkFreeSpaceAvailable(SupportBase s)
Deprecated. Gets the amount of free disk space in a path. |
int |
checkTargetDir(SupportBase s)
Deprecated. use intead method checkTargetDirectory(SupportBase) |
long |
checkTargetDirectory(SupportBase s)
Deprecated. Determines the validity of a destination directory stored in the ibmnsi.properties file. |
int |
compareVersions(SupportBase s)
Deprecated. Compares two dotted version strings. |
void |
copyDirectory(SupportBase s)
Deprecated. Copies a directory to another location. |
java.lang.String |
determineLogFileName(SupportBase s)
Deprecated. Determines the name of the log file to use. |
java.lang.String[] |
directoryGrep(java.lang.String directoryName,
java.lang.String regularExpression)
Deprecated. Reads the file and directory names and returns a list of names that matches the regular expresion. |
boolean |
endOfFileGrep(SupportBase s)
Deprecated. Scans the end of a file for a string. |
void |
executeCommand(SupportBase s)
Deprecated. Executes the specified command in a separate process via Runtime.exec() with the specified environment and working
directory and waits for it to finish. |
boolean |
fileCopy(SupportBase s)
Deprecated. Copies a file to another location. |
boolean |
fileCopyAndRename(SupportBase s)
Deprecated. Copies a file to another location and renames the file in the new target location. |
boolean |
fileDelete(SupportBase s)
Deprecated. Deletes a file. |
boolean |
fileExists(SupportBase s)
Deprecated. Checks for the existence of a file. |
boolean |
fileGrep(java.lang.String fileName,
long startIndex,
java.lang.String searchString)
Deprecated. Searches the contents of the file for a search string. |
boolean |
fileGrep(SupportBase s)
Deprecated. Scans a file for a string. |
long |
fileLength(java.lang.String fileName)
Deprecated. Returns the length of the file in bytes |
int |
fileSearchAndReplace(SupportBase s)
Deprecated. Performs a find and replace in a given file. |
int |
fileSearchAndReplaceLine(SupportBase s)
Deprecated. Performs a find and replace of a line in the specified file. |
java.lang.String[] |
fileSearchAndReturnLinesWithSearch(java.lang.String filename,
java.lang.String find,
int startSearchPosition)
Deprecated. Searches each line of a file to find a particular string. |
int |
findAndReplace(SupportBase s)
Deprecated. |
protected java.lang.String |
getBackLevelLogFileName(SupportBase s,
java.lang.String dottedClassName)
Deprecated. Retrieves the log file name for a user program on a back level (1.1) agent. |
java.lang.String |
getCommandStdError(SupportBase s)
Deprecated. Retrieves the output of the most recently launched command process captured from stderr stream. |
java.lang.String |
getCommandStdOut(SupportBase s)
Deprecated. Retrieves the standard output of the most recently launched command process captured from stdout stream. |
java.util.Locale |
getDeployerLocale(SupportBase s)
Deprecated. Retrieves the Locale of the deployment wizard so that a
translatable message can be created for display. |
java.lang.String |
getDomain(SupportBase s)
Deprecated. Retreives the domain suffix for the local host. |
java.lang.String |
getEntryResponseFilePath(SupportBase s)
Deprecated. Retrieves the name of the response file specified for the Entry program prepended with the logs directory path. |
java.lang.String |
getExitResponseFilePath(SupportBase s)
Deprecated. Retrieves the name of the response file specified for the Exit program prepended with the logs directory. |
java.lang.String |
getFileValue(SupportBase s)
Deprecated. Scans a file for a key and returns the string value found. |
java.util.Locale |
getGroupLocale(SupportBase s)
Deprecated. Gets the locale of the install group from the server. |
java.lang.String |
getHostName(SupportBase s)
Deprecated. Retrieves the unqualified local host name. |
java.lang.String |
getIbmNsiISMPPropValue(SupportBase s)
Deprecated. Gets a value from the ibmnsi.properties file. |
java.util.Properties |
getIbmNsiProperties(SupportBase s)
Deprecated. Lazy initializes and retrieves the Properties object
associated with the ibmnsi.properties file. |
java.lang.String |
getIbmNsiPropValue(java.lang.String variableName)
Deprecated. Determines the value of a passed variable name from ibmnsi.properties file. |
java.lang.String |
getIbmNsiPropValue(SupportBase s)
Deprecated. Gets a value from the ibmnsi.properties file. |
java.lang.String |
getIbmNsiPropValueByKey(SupportBase s)
Deprecated. Gets a value from the ibmnsi.properties file. |
java.lang.String |
getLastCommandOutput(SupportBase s)
Deprecated. Retrieves the output of the most recently launched command process. |
int |
getLastCommandReturnCode(SupportBase s)
Deprecated. Retrieves the return code from the most recently launched command process. |
java.lang.String |
getLogsDir(SupportBase s)
Deprecated. Gets the logs directory. |
java.lang.String |
getMainResponseFilePath(SupportBase s)
Deprecated. Retrieves the name of the response file specified for the Main program prepended with the logs directory. |
java.lang.String |
getOSType(java.lang.String os)
Deprecated. Determine the operating system type for a operating system |
long |
getPartitionCapacity(SupportBase s)
Deprecated. Gets the capacity of a given drive on Windows or partition on linux. |
java.lang.String |
getPartitionFileSystemType(SupportBase s)
Deprecated. Gets the file system type of a given drive on Windows or mount point on linux. |
java.lang.String |
getPartitionVolumeLabel(SupportBase s)
Deprecated. Gets the volume label of a given drive on Windows or mount point on linux. |
java.lang.String |
getPasswordValue(java.lang.String passwordVariableName)
Deprecated. Retreives a passowrd value for the currently installing application from the ibmnsi.properties file. |
java.lang.String |
getPasswordValueByKey(java.lang.String key)
Deprecated. Retreives a passowrd value from the ibmnsi.properties file. |
java.lang.String |
getPreDeploymentCheckerResponseFilePath(SupportBase s)
Deprecated. Retrieves the name of the response file specified for the PreDeploymentChecker program prepended with the logs directory path. |
java.util.Properties |
getProductInstallingBundleProperties(SupportBase s)
Deprecated. Retrieves the Properties object loaded from the default
properties bundle for the currently installing product. |
java.lang.String |
getProductInstallingId(SupportBase s)
Deprecated. Gets the application ID of the product currently installing on the target. |
java.lang.String |
getProductInstallingVersion(SupportBase s)
Deprecated. Retrieves the version of the currently installing application. |
java.lang.String |
getQualifiedHostName()
Deprecated. Retrieves the qualified local host name. |
java.lang.String |
getQualifiedHostName(SupportBase s)
Deprecated. Retrieves the fully qualified local host name. |
java.util.List |
getQualifiedTiedPasswordValue(java.lang.String task,
java.lang.String applicationId,
java.lang.String variableKeyword)
Deprecated. Returns a List of tied, password attribute values that
correspond to the specified task, application Id and variable keyword. |
java.util.List |
getQualifiedTiedVariableValue(java.lang.String task,
java.lang.String applicationId,
java.lang.String variableKeyword)
Deprecated. Returns a List of tied, host attribute values that
correspond to the specified task, application Id and variable keyword. |
protected java.lang.String |
getResponseFilePath(SupportBase s,
int stage)
Deprecated. Retrieves the name of the response file specified for the program prepended with the logs directory. |
protected java.lang.String |
getResponseFilePath(SupportBase s,
int stage,
java.lang.String srcName)
Deprecated. Gets the qualifed, updated response file path for the specified original response file source name. |
protected java.util.List<java.lang.String> |
getResponseFilePaths(SupportBase s,
int stage)
Deprecated. Retrieves the name of the response file specified for the program prepended with the logs directory. |
java.util.Properties |
getResponseFileProperties(java.lang.String propertiesFilePath)
Deprecated. Gets a Properties object populated by a Java Properties formatted response file. |
java.lang.String |
getResponseFileProperty(java.lang.String propertiesFilePath,
java.lang.String key)
Deprecated. Gets a property value from a Java Properties formatted response file. |
java.lang.String |
getResponseFileValue(SupportBase s)
Deprecated. Scans a response file for a key and returns the string value found. |
java.util.List |
getSelectedTaskList(SupportBase s)
Deprecated. Retrieves a List of the task ids that have been selected
for deployment in the Deployment Wizard. |
boolean |
getSetupFileRemovalSetting()
Deprecated. Gets the setup file removal setting indicating whether or not the setup files will removed a the completion of the install. |
java.lang.String |
getStringFromCommandArray(SupportBase s)
Deprecated. Convienence method to assemble a command String
from a
String[] for logging purposes. |
java.lang.String |
getSystemCommandOutput(java.lang.String command,
java.lang.String commandToLog)
Deprecated. |
java.lang.String |
getSystemCommandOutput(SupportBase s)
Deprecated. Invokes a system command and captures the output in a String . |
java.lang.String |
getSystemEnvVar(SupportBase s)
Deprecated. Retrieves the value of a System environment variable. |
java.util.List |
getTaskApplicationList(SupportBase s)
Deprecated. Retrieves a List of the application ids that were
specified for deployment in the Deployment Wizard for the given task. |
java.util.List |
getTaskHostnameList(SupportBase s)
Deprecated. Retrieves a List of the hostnames that were specified for
deployment in the Deployment Wizard for the given task. |
java.lang.String |
getTempDir()
Deprecated. Determines and returns the temporary directory from the operating system environment. |
SupportBase |
getTheSupportBase()
Deprecated. Get the SupportBase instance of the class |
java.util.List |
getTiedPasswordValue(java.lang.String variableKeyword)
Deprecated. Returns a List of tied, host password values that
correspond to the variable keyword for the currently installing
application. |
java.util.List |
getTiedPasswordValueForKey(java.lang.String key)
Deprecated. Returns a List of tied, host password values that
correspond to the specified key. |
java.util.List |
getTiedVariableValue(java.lang.String variableKeyword)
Deprecated. Returns a List of tied, host attribute values that
correspond to the variable keyword for the currently installing
application. |
java.util.List |
getTiedVariableValueForKey(java.lang.String key)
Deprecated. Returns a List of tied, host attribute values that
correspond to the specified key. |
java.lang.String |
getTranslatedMessage(SupportBase s)
Deprecated. Retrieves a translatable message from a Locale specific
ResourceBundle . |
java.lang.String |
getUnpackedDir(SupportBase s)
Deprecated. Gets the directory where images are unpacked. |
java.lang.String |
getVariableValueForTaskApplication(SupportBase s)
Deprecated. Retrieves the value of a variable. |
java.lang.String[] |
getVpdInstallLocationArray(SupportBase s)
Deprecated. Retrieves String |
java.util.ArrayList |
getVpdPropertyList(SupportBase s)
Deprecated. Retrieves a property from the ISMP vpd.properties file. |
java.lang.String[] |
getVpdVersionArray(SupportBase s)
Deprecated. Retrieves a String array of versions of an installed product with a given UID from the ISMP vpd.properties file. |
int |
invokeCommand(java.lang.String command)
Deprecated. Builds the appropriate command string for the operating system, logs the command to run, executes the command, and waits for it to finish. |
int |
invokeCommand(java.lang.String command,
java.lang.String commandToLog)
Deprecated. Builds the appropriate command string for the operating system, logs the command to run, executes the command, and waits for it to finish. |
int |
invokeCommand(java.lang.String command,
java.lang.String commandToLog,
java.lang.String launchDir)
Deprecated. Builds the appropriate command string for the operating system, logs the command to run, executes the command, and waits for it to finish. |
int |
invokeCommandLogOutput(java.lang.String command)
Deprecated. Builds the appropriate command string for the operating system, logs the command to run, executes the command, and waits for it to finish. |
int |
invokeCommandLogOutput(java.lang.String command,
java.lang.String commandToLog)
Deprecated. Builds the appropriate command string for the operating system, logs the command to run, executes the command, and waits for it to finish. |
int |
invokeCommandLogOutput(java.lang.String command,
java.lang.String commandToLog,
java.lang.String launchDir)
Deprecated. Builds the appropriate command string for the operating system, logs the command to run, executes the command, and waits for it to finish. |
int |
invokeCommandLogOutputToFileName(java.lang.String command,
java.lang.String logFileName)
Deprecated. Builds the appropriate command string for the operating system, logs the command to run, executes the command, and waits for it to finish. |
int |
invokeCommandLogOutputToFileName(java.lang.String command,
java.lang.String commandToLog,
java.lang.String logFileName)
Deprecated. Builds the appropriate command string for the operating system, logs the command to run, executes the command, and waits for it to finish. |
int |
invokeCommandLogOutputToFileName(java.lang.String command,
java.lang.String commandToLog,
java.lang.String logFileName,
java.lang.String launchDir)
Deprecated. Builds the appropriate command string for the operating system, logs the command to run, executes the command, and waits for it to finish. |
boolean |
isAix()
Deprecated. Determine if the computer is running on AIX operating system. |
boolean |
isAixOSType(java.lang.String os)
Deprecated. Determine if the operating system is a type of AIX operating system. |
boolean |
isApplicationVersionEqual(SupportBase s)
Deprecated. Verifies that the specified version is equal to the version of the product currently installing. |
boolean |
isEnoughTargetDirSpace(SupportBase s)
Deprecated. use instead method isEnoughTargetDirSpaceAvailable(SupportBase) |
boolean |
isEnoughTargetDirSpaceAvailable(SupportBase s)
Deprecated. Determines the validity and free space of a destination directory stored in the ibmnsi.properties file. |
boolean |
isHPUX()
Deprecated. Determine if the computer is running on HPUX operating system. |
boolean |
isHPUXOSType(java.lang.String os)
Deprecated. Determine if the operating system is a type of HPUX operating system. |
boolean |
isIpv6Address(java.lang.String computerName)
Deprecated. Indicates whether or not the specified computer name is an IPv6 address. |
boolean |
isLinux()
Deprecated. Determine if the computer is running a Linux operating system. |
boolean |
isLinuxOSType(java.lang.String os)
Deprecated. Determine if the operating system is a type of Linux operating system. |
boolean |
isLinuxX86_32()
Deprecated. Determine if the machine is running 32 bit linux on x86 |
boolean |
isLinuxX86_64()
Deprecated. Determine if the machine is running 64 bit linux on x86 |
boolean |
isOS400()
Deprecated. Deterine if the computer is running on OS/400 or iSeries operating system. |
boolean |
isOS400OSType(java.lang.String os)
Deprecated. Determine if the operating system is a type of OS/400 or iSeries operating system. |
boolean |
isPortOpen(SupportBase s)
Deprecated. Verifies that a TCP/IP port is not in use. |
boolean |
isPortRegistered(int port)
Deprecated. Checks the operating system services file to see if the port is already registered. |
boolean |
isPowerLinuxOSType(java.lang.String os)
Deprecated. Determine if the operating system is a type of power linux operating system |
boolean |
isSameDirectoryName(java.lang.String location1,
java.lang.String location2)
Deprecated. Compares two directories to see if they are the same. |
boolean |
isSunOS()
Deprecated. Determine if the computer is running on Solaris operating system. |
boolean |
isSunOSType(java.lang.String os)
Deprecated. Determine if the operating system is a type of Solaris operating system. |
boolean |
isVersionSupported(java.lang.String version,
java.lang.String lowestSupportedVersion,
java.lang.String highestSupportedVersion)
Deprecated. Determine if the version specified falls within the boundary of the lowest supported version and highest supported version. |
boolean |
isWindows()
Deprecated. Determine if the computer is running on Window operating system. |
boolean |
isWindowsOSType(java.lang.String os)
Deprecated. Determine if the operating system is a type of Window operating system. |
int |
launchAndWait(SupportBase s)
Deprecated. Launches a program and waits for the process to finish. |
void |
launchLocalInteractiveProgram(SupportBase s)
Deprecated. Executes the specified local interative program command in a separate process via Runtime.exec() with the specified environment and working
directory and returns immediately. |
void |
log(java.lang.String message)
Deprecated. Writes the message to a default log file. |
void |
log(java.lang.String message,
java.lang.String logFileName)
Deprecated. Writes the message, the timestamp and separator string to the log file specified in the logFileName |
void |
log(SupportBase s)
Deprecated. Writes a message to a log file. |
int |
logAppendFile(java.lang.String fileName)
Deprecated. Appends the content of the file to the deployment wizard log file. |
int |
logAppendFile(java.lang.String[] fileNames)
Deprecated. Appends the content of each file listed in the array to the deployment wizard log file. |
int |
logAppendFile(java.lang.String[] fileNames,
java.lang.String logFileName)
Deprecated. Appends the contents of the files in the array to the specified log file. |
int |
logAppendFile(java.lang.String fileName,
java.lang.String logFileName)
Deprecated. Appends the contents of the file to the specified log file if a log file is not specified in the application, then it is appended to the Support |
boolean |
logAppendFile(SupportBase s)
Deprecated. This method provides a supported mechanism for adding the contents of a file to the log. |
void |
logNewLine(SupportBase s)
Deprecated. Writes a blank line to a log file. |
void |
logStatus(SupportBase s)
Deprecated. Writes a success or failure message to a log file prepended with a timestamp and "****INSTALLATION STATUS = ". |
void |
modifyResponseFile(SupportBase s)
Deprecated. Changes a value in a response file. |
void |
postCompletionMessageToDeployerUI(SupportBase s)
Deprecated. Overrides the default completion message to the deployment wizard on the "Detailed Messages" panel. |
void |
postErrorMessageToDeployerMainUI(SupportBase s)
Deprecated. Posts a message with an error icon to the deployment wizard on the "Detailed Messages" panel, and also on the "Status" panel. |
void |
postErrorMessageToDeployerUI(SupportBase s)
Deprecated. Posts a message with an error icon to the deployment wizard on the "Detailed Messages" panel. |
void |
postInformationMessageToDeployerMainUI(SupportBase s)
Deprecated. Posts a message with an information icon to the deployment wizard on the "Detailed Messages" panel, and also on the "Status" panel. |
void |
postInformationMessageToDeployerUI(SupportBase s)
Deprecated. Posts a message with an information icon to the deployment wizard on the "Detailed Messages" panel. |
void |
postSuccessMessageToDeployerMainUI(SupportBase s)
Deprecated. Posts a message with a success icon to the deployment wizard on the "Detailed Messages" panel, and also on the "Status" panel. |
void |
postSuccessMessageToDeployerUI(SupportBase s)
Deprecated. Posts a message with a success icon to the deployment wizard on the "Detailed Messages" panel. |
void |
postWarningMessageToDeployerMainUI(SupportBase s)
Deprecated. Posts a message with a warning icon to the deployment wizard on the "Detailed Messages" panel, and also on the "Status" panel. |
void |
postWarningMessageToDeployerUI(SupportBase s)
Deprecated. Posts a message with a warning icon to the deployment wizard on the "Detailed Messages" panel. |
java.lang.String |
readFile(SupportBase s)
Deprecated. Reads in a file. |
java.lang.String |
removeAlphaCharsFromString(java.lang.String inputString)
Deprecated. Removes all characters that are non 0 -9 or '.' from the input string and returns the resulting value. |
java.lang.String |
replaceSubstring(SupportBase s)
Deprecated. Modifies a String by replacing a substring with a new
substring. |
boolean |
setFileValue(SupportBase s)
Deprecated. Scans a file for a key and replaces the key value. |
void |
setIbmNsiProperty(SupportBase s)
Deprecated. Set a property into the currently cached ibmnsi Properties
object and saves the updated properties to disk. |
void |
setResponseFileProperty(java.lang.String propertiesFilePath,
java.lang.String key,
java.lang.String value)
Deprecated. Sets a property value into a Java Properties formatted response file. |
boolean |
setResponseFileValue(SupportBase s)
Deprecated. Scans a response file for a key and sets the corresponding value. |
boolean |
setResponseFileValue(SupportBase s,
boolean createKeyIfDoesNotExist)
Deprecated. Scans a response file for a key and sets the corresponding value. |
void |
setTheSupportBase(SupportBase theSupportBase)
Deprecated. Set the SupportBase instance of the class |
java.lang.String |
trimDoubleQuotes(java.lang.String inputString)
Deprecated. Helper method that removes quotes from values retrieved from the response file |
boolean |
unPackJar(java.lang.String absolutePathName,
java.lang.String destinationDirPath)
Deprecated. Unpacks a jar file. |
boolean |
valueExists(java.lang.String stringToSearch,
java.lang.String[] values)
Deprecated. Determine if any of the given values exist in a given string |
boolean |
waitForFile(SupportBase s)
Deprecated. Polls the system for the existence of a file and, optionally, strings within the file. |
void |
writeFile(SupportBase s)
Deprecated. Writes a String to a file, appends it to the file or
overwrites the file. |
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
protected SupportBase theSupportBase
public static final java.lang.String sNEWLN
Constructor Detail |
---|
public SupportHelper()
Method Detail |
---|
public void copyDirectory(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setSource
and
SupportBase.setTarget
before calling this method.
s
- the SupportBase
to be queried:
String
directory to be copied
SupportBase.getSource()
String
target directory
SupportBase.getTarget()
public boolean fileCopy(SupportBase s)
NOTE: If a file of the same name already exists in the target directory, it will be overwritten. If the target directory does not exist it will be created. The source file, and target directory should not be encapsulated in quotes
The SupportBase
to be queried must invoke
SupportBase.setSource
and
SupportBase.setTarget
before calling this method.
s
- the SupportBase
to be queried:
String
file to be copied
SupportBase.getSource()
String
target directory
SupportBase.getTarget()
boolean
true
if operation was successful
false
if operation failed
public boolean fileCopyAndRename(SupportBase s)
NOTE: If a file of the same name already exists in the target directory, it will be overwritten. If the target directory does not exist it will be created. The source file, target directory and target file name should not be encapsulated in quotes
The SupportBase
to be queried must invoke
SupportBase.setSource
and
SupportBase.setTarget
and
SupportBase.setTargetFileName
before calling this method.
s
- the SupportBase
to be queried:
String
file to be copied
SupportBase.getSource()
String
target directory
SupportBase.getTarget()
String
target file name
SupportBase.getTargetFileName()
boolean
true
if operation was successful
false
if operation failed
public boolean fileDelete(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setFileName
before calling this method.
s
- the SupportBase
to be queried
String
file to be deleted
SupportBase.getFileName()
boolean
true
if operation was successful
false
if operation failed
public boolean fileExists(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setFileName
before calling this method.
s
- the SupportBase
to be queried
SupportBase.getFileName()
for the
String
representing the file to check. Note
that on Linux the filename specified must not contain quotes.
boolean
true
if file exists
false
if file does not exist
public boolean endOfFileGrep(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setGrepFileName
and
SupportBase.setGrepString
before calling this method.
The SupportBase
to be queried must invoke
SupportBase.setFileTextSearchLength
to designate the the
ending number of characters to search in the file, e.g. if 100 is
specified, then only the LAST 100 characters of the file are searched for
the "grep" string. If the character search count is longer than the file
text, the entire file will be searched.
s
- the SupportBase
to be queried
String
file name
SupportBase.getGrepFileName
String
to grep for
SupportBase.getGrepString
boolean
true
if the string was found in the file
false
otherwise
public java.lang.String getResponseFileValue(SupportBase s)
getLogsDir()
which is an absolute path to the logs
directory.
The SupportBase
to be queried must invoke
SupportBase.setResponseFileName
and
SupportBase.setKey
before calling this method.
s
- the SupportBase
to be queried
SupportBase.getResponseFileName
SupportBase.getKey
String
found at the keypublic boolean setResponseFileValue(SupportBase s)
getLogsDir()
which is an
absolute path to the logs directory.
The SupportBase
to be queried must invoke
SupportBase.setResponseFileName
,
SupportBase.setKey
, and
SupportBase.setKeyValue
before calling this method.
s
- the SupportBase
to be queried
SupportBase.getResponseFileName
SupportBase.getKey
SupportBase.getKeyValue
boolean
true
if operation was successful
false
if operation failed
public boolean setResponseFileValue(SupportBase s, boolean createKeyIfDoesNotExist)
getLogsDir()
which is an
absolute path to the logs directory.
The SupportBase
to be queried must invoke
SupportBase.setResponseFileName
,
SupportBase.setKey
, and
SupportBase.setKeyValue
before calling this method.
s
- the SupportBase
to be queried
SupportBase.getResponseFileName
SupportBase.getKey
SupportBase.getKeyValue
createKeyIfDoesNotExist
- set this to true if a key should be created if one does not exist.
boolean
true
if operation was successful
false
if operation failed
public java.lang.String getFileValue(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setFileName
and
SupportBase.setKey
before calling this method.
s
- the SupportBase
to be queried
SupportBase.getFileName
SupportBase.getKey
public boolean setFileValue(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setFileName
, SupportBase.setKey
,
and SupportBase.setKeyValue
before calling this method.
s
- the SupportBase
to be queried
SupportBase.getFileName
SupportBase.getKey
SupportBase.getKeyValue
boolean
true
if operation was successful
false
if operation failed
public java.lang.String getLogsDir(SupportBase s)
s
- the SupportBase
to be queried
public java.lang.String determineLogFileName(SupportBase s)
ibmnsi.properties
.
Otherwise, the log file name that is set via the last
setLogFileName
method is used.
If this wasn't set, then a default name of
The SupportBase
to be queried must invoke
SupportBase.setLogsDir
before calling this method.
s
- the SupportBase
to be queried
protected java.lang.String getBackLevelLogFileName(SupportBase s, java.lang.String dottedClassName)
If the same Java program is used for two or more of the user programs, the log file name may not be accurate because the log name lookup is based on the executing class name.
This code should only run on a back level agent and/or for user programs which do not specifiy a log file name.
The algorithim is as follows: 1) Find a key for which the value is the dotted class name of the currently executing program such as "testsuite.HelloWorldEntry". 2) Determine the stage/prefix from the key 3) Construct the log file name key based on the above steps and retrieve the log file name.
s
- SupportBase
for tracingdottedClassName
- String
the class name
String
public void modifyResponseFile(SupportBase s)
SupportBase
, the name
of the file prepended with the absolute path, the key (leftside of key =
value) and the new value. The "key = value" pair must be on the same line
in the text based response file. The line must start with the key (i.e.,
no preceeding asteriks or blank spaces etc). Typically, you can prepend
the rsp file name with the return value from getLogsDir()
which is an absolute path to the logs directory.
The SupportBase
to be queried must invoke
SupportBase.setResponseFileName
,
SupportBase.setKey
, and
SupportBase.setNewResponseFileValue
before calling this
method.
s
- the SupportBase
to be queried
SupportBase.getResponseFileName
SupportBase.getKey
SupportBase.getNewRespnseFileValue
public java.lang.String readFile(SupportBase s) throws java.io.IOException
The SupportBase
to be queried must invoke
SupportBase.setFileName
before calling this method.
s
- the SupportBase
to be queried
SupportBase.getFileName
java.io.IOException
- the file cannot be readpublic void writeFile(SupportBase s) throws java.io.IOException
String
to a file, appends it to the file or
overwrites the file.
If append is set to true it will append the string. If it is set to
false, it will overwrite the old contents of the file with this new
string. If the file doesn't already exist, it will be created.
The SupportBase
to be queried must invoke
SupportBase.setFileName
,
SupportBase.setMessage
, and
SupportBase.setAppend
before calling this method.
s
- the SupportBase
to be queried
String
file name
SupportBase.getFileName
String
message
SupportBase.getMessage
boolean
indicating if we should append
SupportBase.getAppend
java.io.IOException
- the file cannot be writtenpublic java.lang.String getUnpackedDir(SupportBase s)
unpacked
directory contains all the files exploded from the product's deployment
package, including entry, exit, main, and pre-deployment checkers, as
well as any other files specified in the application wrapper.
s
- the SupportBase
to be queried
unpacked
directory with a slash
appended to itpublic boolean isPortOpen(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setPortNumber
before calling this method.
s
- the SupportBase
to be queried
SupportBase.getPortNumber
boolean
true
if port is not in use
false
if port is in use
public int checkFreeSpace(SupportBase s)
WINDOWS: You must pass a path prepended with a drive letter and a colon (exp: "c:").
LINUX: You must pass a fully qualified path to the mount point or directory (exp: "/usr"). If "/usr" is passed and is itself a mount point the return value will be the amount of free space available in "/usr". If "/usr" is not actually a mount point, the return value will be the amount of free space in the filesystem on which "/usr" resides. In this example, the amount of free space on "/" (root) would be returned. Therefore, you can check the available free space in the target dir without knowing beforehand whether or not the target is a mount point.
The SupportBase
to be queried must invoke
SupportBase.setPath
before calling this method.
s
- the SupportBase
to be queried
SupportBase.getPath
.
int
the amount of free space in KB
0 will be returned if the directory does not exist, or if the drive or mnt point passed is invalid or not in the appropriate format
public long checkFreeSpaceAvailable(SupportBase s)
WINDOWS: You must pass a path prepended with a drive letter and a colon (exp: "c:").
LINUX: You must pass a fully qualified path to the mount point or directory (exp: "/usr"). If "/usr" is passed and is itself a mount point the return value will be the amount of free space available in "/usr". If "/usr" is not actually a mount point, the return value will be the amount of free space in the filesystem on which "/usr" resides. In this example, the amount of free space on "/" (root) would be returned. Therefore, you can check the available free space in the target dir without knowing beforehand whether or not the target is a mount point.
The SupportBase
to be queried must invoke
SupportBase.setPath
before calling this method.
s
- the SupportBase
to be queried
SupportBase.getPath
.
long
the amount of free space in KB
0 will be returned if the directory does not exist, or if the drive or mnt point passed is invalid or not in the appropriate format
public int checkTargetDir(SupportBase s)
ibmnsi.properties
file. If the directory does not already
exist, it will be created. If the directory does not exist and cannot be
created, the drive is invalid and the function will return 0. If the
directory exists, the free space of the drive or mount point that
contains the directory will be returned. The function will return integer
representing the kilobytes of free space available. A return of 0
indicates no space available or an invalid directory.
The SupportBase
to be queried must invoke
SupportBase.setPath
before calling this method.
s
- the SupportBase
to be queried
SupportBase.getPath
int
public long checkTargetDirectory(SupportBase s)
ibmnsi.properties
file. If the directory does not already
exist, it will be created. If the directory does not exist and cannot be
created, the drive is invalid and the function will return 0. If the
directory exists, the free space of the drive or mount point that
contains the directory will be returned. The function will return long
representing the kilobytes of free space available. A return of 0
indicates no space available or an invalid directory.
The SupportBase
to be queried must invoke
SupportBase.setPath
before calling this method.
s
- the SupportBase
to be queried
SupportBase.getPath
long
public boolean isEnoughTargetDirSpace(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setPath
, and
SupportBase.setSizeKiloBytes
before calling this method.
s
- the SupportBase
to be queried
SupportBase.getPath
SupportBase.getKBSize
boolean
true
if there is enough free space to install
to the target directory
false
not enough free space
public boolean isEnoughTargetDirSpaceAvailable(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setPath
, and
SupportBase.setSizeKiloBytes
before calling this method.
s
- the SupportBase
to be queried
SupportBase.getPath
SupportBase.getKBSize
boolean
true
if there is enough free space to install
to the target directory
false
not enough free space
public boolean waitForFile(SupportBase s)
NOTE: In most cases, a check for (old) previous versions of the file should be performed and the (old) file should be deleted BEFORE invoking this function.
The SupportBase
to be queried must invoke
SupportBase.setTimeOut_Sec
,
SupportBase.setInterval_Sec
, and
SupportBase.setPath
before calling this method.
Timeout specifies the total time to wait for the specified conditions.
The function will return false if conditions aren't met in the allotted
time. A negative timeout value indicates an "infinite" timeout. Interval
specifies the number of seconds between checks for file existence and
strings. Optionally, SupportBase.setSuccessString
and
SupportBase.setFailString
may be invoked to narrow the
search.
s
- the SupportBase
to be queried
SupportBase.getTimeOut_Sec
SupportBase.getInterval_Sec
SupportBase.getPath
boolean
true
if the file is found (created)
false
all else
public int launchAndWait(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setCommand
or setCommandArray
before calling this method.
The value set via setCommand
will be replaced by
null
when setCommandArray
is invoked and
vice versa.
The SupportBase
to be queried may optionally invoke
SupportBase.setCommandLaunchDirectory
or
SupportBase.setCommandEnvironmentArray
before calling this
method.
Command logging may be prohibited via the
setCommandLogging
method by passing a value of
false
.
Return code will be within the range of -128 to +127. Out of the range return code will be wrapped into that range for Linux and OS400
s
- the SupportBase
to be queried
SupportBase.getCommand
int
public java.lang.String getSystemCommandOutput(SupportBase s)
String
.
The String
is returned when the process completes/returns.
The "output" will consist of stdout, stderr, and an
Exception
stacktrace as appropriate. The stdout, stderr,
and stacktrace will be concatenated together in that order.
The SupportBase
to be queried must invoke
SupportBase.setCommand
or setCommandArray
before calling this method.
The value set via setCommand
will be replaced by
null
when setCommandArray
is invoked and
vice versa.
The SupportBase
to be queried may optionally invoke
SupportBase.setCommandLaunchDirectory
or
SupportBase.setCommandEnvironmentArray
before calling this
method.
Command logging may be prohibited via the
setCommandLogging
method by passing a value of
false
.
s
- the SupportBase
to be queried
String
the command to be executed
SupportBase.getCommand()
String
the output of the commandpublic java.lang.String getSystemCommandOutput(java.lang.String command, java.lang.String commandToLog)
command
- - the command to run.commadToLog
- - the comamnd to log. If null or empty string is specified, a command will be logged.
String
the output of the commandpublic java.lang.String getSystemEnvVar(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setVariableName
before calling this method.
s
- the SupportBase
to be queried
String
variable name
SupportBase.getVariableName
String
public java.util.Locale getGroupLocale(SupportBase s)
ibmnsi.properties
. It will return
the default locale of the current machine if a value cannot be obtained
from ibmnsi.properties.
s
- the SupportBase
to be queried
String
the locale of the group directorypublic java.lang.String replaceSubstring(SupportBase s)
String
by replacing a substring with a new
substring.
The SupportBase
to be queried must invoke
SupportBase.setTargetString
,
SupportBase.setOldSubstring
, and
SupportBase.setNewSubstring
before calling this method.
s
- the SupportBase
to be queried
String
targetString
SupportBase.getTargetString()
String
oldSubstring
SupportBase..getOldSubstring()
String
newSubstring
SupportBase.getNewSubstring()
String
resulting from replacing ALL occurrences of
the old substring in the old string with the new substringpublic java.lang.String getProductInstallingId(SupportBase s)
s
- the SupportBase
to be queried
public java.lang.String getHostName(SupportBase s)
s
- the SupportBase
to be queried
public java.lang.String getQualifiedHostName(SupportBase s)
s
- the SupportBase
to be queried
public java.lang.String getDomain(SupportBase s)
Example: raleigh.ibm.com
s
- the SupportBase
to be queried
public int fileSearchAndReplace(SupportBase s)
SupportBase
to be queried must invoke
SupportBase.setFileName
, SupportBase.setFind
,
and SupportBase.setReplace
before calling this method.
The following methods may optionally be called.
SupportBase.setIgnoreCase
SupportBase.setBackupFindAndReplace
This method will NOT ignore whitespace.
s
- the SupportBase
to be queried
public int fileSearchAndReplaceLine(SupportBase s)
SupportBase
to be queried must invoke
SupportBase.setFileName
, SupportBase.setFind
,
and SupportBase.setReplace
before calling this method.
It may optionally call SupportBase.setBackupFindAndReplace
s
- the SupportBase
to be queried
public int findAndReplace(SupportBase s)
SupportBase
to be queried must invoke
SupportBase.setFileName
, SupportBase.setFind
,
and SupportBase.setReplace
before calling this method.
It may optionally call SupportBase.setBackupFindAndReplace
To search and replace an entire lines in a file use
fileSearchAndReplaceLine
To search and replace all occurrences of a substring in a file use
fileSearchAndReplace
s
- the SupportBase
to be queried
public void postSuccessMessageToDeployerUI(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setMessage
before calling this method.
s
- the SupportBase
to be queried
String
message
SupportBase.getMessage
public void postSuccessMessageToDeployerMainUI(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setMessage
before calling this method.
s
- the SupportBase
to be queried
String
message
SupportBase.getMessage
public void postInformationMessageToDeployerUI(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setMessage
before calling this method.
s
- the SupportBase
to be queried
String
message
SupportBase.getMessage
public void postInformationMessageToDeployerMainUI(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setMessage
before calling this method.
s
- the SupportBase
to be queried
String
message
SupportBase.getMessage
public void postWarningMessageToDeployerUI(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setMessage
before calling this method.
s
- the SupportBase
to be queried
String
message
SupportBase.getMessage
public void postWarningMessageToDeployerMainUI(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setMessage
before calling this method.
s
- the SupportBase
to be queried
String
message
SupportBase.getMessage
public void postErrorMessageToDeployerUI(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setMessage
before calling this method.
s
- the SupportBase
to be queried
String
message
SupportBase.getMessage
public void postErrorMessageToDeployerMainUI(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setMessage
before calling this method.
s
- the SupportBase
to be queried
String
message
SupportBase.getMessage
public void postCompletionMessageToDeployerUI(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setMessage
before calling this method.
s
- the SupportBase
to be queried
String
message
SupportBase.getMessage
public java.lang.String getTranslatedMessage(SupportBase s)
Locale
specific
ResourceBundle
.
The SupportBase
to be queried. Must invoke
SupportBase.setLocale
,
SupportBase.setMessageResourcePath
, and
SupportBase.setMessageSubstitutionString
before calling
this method.
s
- the SupportBase
to be queried
String
dotted classpath
SupportBase.getMessageResourcePath
Locale
message locale
SupportBase.getLocale
String
message substitution parameters
SupportBase.getMessageSubstitutionString
String
the translated messagepublic java.util.Locale getDeployerLocale(SupportBase s)
Locale
of the deployment wizard so that a
translatable message can be created for display.
s
- SupportBase
to be queried
Locale
public boolean isApplicationVersionEqual(SupportBase s)
SupportBase
to be queried must invoke
SupportBase.setApplicationVersion
before calling this
method.
s
- SupportBase
to be queried
boolean
public java.lang.String getProductInstallingVersion(SupportBase s)
s
- SupportBase
to be queried
String
public java.lang.String getStringFromCommandArray(SupportBase s)
String
from a
String[]
for logging purposes.
The SupportBase
to be queried must invoke
SupportBase.setCommandArray
before calling this method.
s
- SupportBase
String
public java.util.Properties getIbmNsiProperties(SupportBase s)
Properties
object
associated with the ibmnsi.properties
file.
No parameters need to be set into SupportBase
prior to
invocation.
Note that the properties are cached with each instance of
SupportBase
. The properties are (re)loaded from disk for
each instance of SupportBase
.
Typically, each pre-deployment checker, entry, main, or exit program will have its own cached properties instance.
Properties
public java.util.ArrayList getVpdPropertyList(SupportBase s)
vpd.properties
file.
The SupportBase
to be queried must invoke
SupportBase.setVpdUid
and
SupportBase.setStartPipe
and
SupportBase.setEndPipe
and before calling this method.
s
- SupportBase
to be queried
String
the property value.public java.lang.String[] getVpdInstallLocationArray(SupportBase s)
String array of install locations of an installed product
with a given UID from the ISMP vpd.properties
file.
The return will be null
if the UID is not
found in the properties file.
The SupportBase
to be queried must invoke
SupportBase.setVpdUid
before calling this method.
- Parameters:
s
- SupportBase
to be queried
- Returns:
String[]
the install locations.
public java.lang.String[] getVpdVersionArray(SupportBase s)
vpd.properties
file.
The return will be null
if the UID is not found in the
properties file.
The SupportBase
to be queried must invoke
SupportBase.setVpdUid
before calling this method.
s
- SupportBase
to be queried
String[]
the versionpublic int compareVersions(SupportBase s)
The compared version strings must be comprised of only dots and numbers.
The SupportBase
to be queried must invoke
SupportBase.setVersion
and
SupportBase.setCompareVersion
before calling this method.
s
- SupportBase
to be queried
int
there are four possible return values: 0
indicates versions are equal 1 indicates version is "greater"
than compareVersion -1 indicates version is "less" than
compareVersion Integer.MIN_VALUE
if version or
compareVersion contains characters other than dots and numbers.public java.util.Properties getProductInstallingBundleProperties(SupportBase s)
Properties
object loaded from the default
properties bundle for the currently installing product.
Nothing needs to be set into SupportBase prior to invoking this method.
s
- SupportBase
to be queried
Properties
public void executeCommand(SupportBase s)
Runtime.exec()
with the specified environment and working
directory and waits for it to finish.
The SupportBase
to be queried must invoke
setCommand
or setCommandArray
before
calling this method.
The value set via setCommand
will be replaced by
null
when setCommandArray
is invoked and
vice versa.
The SupportBase
to be queried may optionally invoke
SupportBase.setCommandLaunchDirectory
or
SupportBase.setCommandEnvironmentArray
before calling this
method. The environment array and/or the working directory may be
null
. If the environment array is null, the current
environment of the calling process will be used. If the working directory
is null, the current directory will be used.
Command logging may be prohibited via the
setCommandLogging
method by passing a value of
false
.
The SupportBase.setWaitForOutput
method may optionally be
called with a boolean
to indicate whether or not execution
should be paused in order to ensure that the command output is captured
in its entirety. The default is false.
Return values may be obtained via the getLastCommandOutput
method and/or the getLastCommandReturnCode
method.
The Wait For Completion property must be checked for the corresponding user program if the program being launched locally is an interactive program.
s
- SupportBase
to be queriedpublic java.lang.String getLastCommandOutput(SupportBase s)
The "output" will consist of stdout, stderr, and an
Exception
stacktrace as appropriate. The stdout, stderr,
and stacktrace will be concatenated together in that order.
s
- SupportBase
to be queried
String
public java.lang.String getCommandStdOut(SupportBase s)
s
- SupportBase
to be queried
String
public java.lang.String getCommandStdError(SupportBase s)
s
- SupportBase
to be queried
String
from stderrpublic int getLastCommandReturnCode(SupportBase s)
For Linux and i5/OS the return code will be wrapped to be within the range of -128 to +127 if it is not already in that range.
s
- the SupportBase
to be queried
SupportBase.getCommand
int
public java.util.List getSelectedTaskList(SupportBase s)
List
of the task ids that have been selected
for deployment in the Deployment Wizard.
Nothing needs to be set into SupportBase
prior to calling
this method.
If the Deployment wizard has a specification version earlier than
2.1.1.0, then this method will return null
.
The task id is an optional attribute in the solution XML. If tasks are selected that do not have an id specified, they will be identified by a number. The number is a one-based index derived from the order of appearance in the solution XML.
The ordering of the tasks in the solution XML is preserved in the List.
code
- SupportBase
List
public java.lang.String getPreDeploymentCheckerResponseFilePath(SupportBase s)
If multiple response files are associated with this program, the
SupportBase
method setOriginalResponseFileName
should be called prior to calling this method.
If no response file was specified for this program, null
will be returned.
If the Deployment wizard has a specification version earlier than
2.1.1.0, then this method will return null
.
code
- SupportBase
String
public java.lang.String getEntryResponseFilePath(SupportBase s)
If multiple response files are associated with this program, the
SupportBase
method setOriginalResponseFileName
should be called prior to calling this method.
If no response file was specified for this program, null
will be returned.
If the Deployment wizard has a specification version earlier than
2.1.1.0, then this method will return null
.
code
- SupportBase
String
public java.lang.String getMainResponseFilePath(SupportBase s)
If multiple response files are associated with this program, the
SupportBase
method setOriginalResponseFileName
should be called prior to calling this method.
If no response file was specified for this program, null
will be returned.
If the Deployment wizard has a specification version earlier than
2.1.1.0, then this method will return null
.
code
- SupportBase
String
public java.lang.String getExitResponseFilePath(SupportBase s)
If multiple response files are associated with this program, the
SupportBase
method setOriginalResponseFileName
should be called prior to calling this method.
If no response file was specified for this program, null
will be returned.
If the Deployment wizard has a specification version earlier than
2.1.1.0, then this method will return null
.
code
- SupportBase
String
protected java.lang.String getResponseFilePath(SupportBase s, int stage)
Nothing needs to be set into SupportBase
prior to calling
this method.
If no response file was specified for this program, null
will be returned.
If the Deployment wizard has a specification version earlier than
2.1.1.0, then this method will return null
.
code
- int the stage or program typecode
- SupportBase
String
protected java.lang.String getResponseFilePath(SupportBase s, int stage, java.lang.String srcName)
s
- stage
- srcName
-
protected java.util.List<java.lang.String> getResponseFilePaths(SupportBase s, int stage)
Nothing needs to be set into SupportBase
prior to calling
this method.
If no response file was specified for this program, null
will be returned.
If the Deployment wizard has a specification version earlier than
2.1.1.0, then this method will return null
.
code
- int the stage or program typecode
- SupportBase
String
public java.lang.String getVariableValueForTaskApplication(SupportBase s)
The SupportBase
to be queried must invoke
setVariableKeyword
and setApplicationId
and
setTaskId
before calling this method.
code
- SupportBase
String
public java.util.List getTaskHostnameList(SupportBase s)
List
of the hostnames that were specified for
deployment in the Deployment Wizard for the given task.
The SupportBase
to be queried must invoke
setTaskId
before calling this method.
If the Deployment wizard has a specification version earlier than
2.1.1.0, then this method will return null
.
The task id is an optional attribute in the solution XML. If tasks are selected that do not have an id specified, they will be identified by a number. The number is a one-based index derived from the order of appearance in the solution XML.
code
- SupportBase
List
public java.util.List getTaskApplicationList(SupportBase s)
List
of the application ids that were
specified for deployment in the Deployment Wizard for the given task.
The SupportBase
to be queried must invoke
setTaskId
before calling this method.
If the Deployment wizard has a specification version earlier than
2.1.1.0, then this method will return null
.
The task id is an optional attribute in the solution XML. If tasks are selected that do not have an id specified, they will be identified by a number. The number is a one-based index derived from the order of appearance in the solution XML.
code
- SupportBase
List
protected boolean checkDeployerVersion(SupportBase s, java.lang.String minVersion, java.lang.String methodName)
An error message is logged if version incompatibility is detected.
code
- SupportBase code
- String minVersioncode
- String methodName
boolean
public void setIbmNsiProperty(SupportBase s)
Properties
object and saves the updated properties to disk.
The SupportBase
to be queried must invoke
SupportBase.setKey
, and
SupportBase.setKeyValue
before calling this method.
code
- SupportBase public java.lang.String getPartitionFileSystemType(SupportBase s)
SupportBase
to be queried must invoke
SupportBase.setPath
, before calling this method. The path
format on Windows must be C:\\, where C is the drive letter.
code
- SupportBase
String
public java.lang.String getPartitionVolumeLabel(SupportBase s)
SupportBase
to be queried must invoke
SupportBase.setPath
, before calling this method. The path
format on Windows must be C:\\, where C is the drive letter.
code
- SupportBase
String
public long getPartitionCapacity(SupportBase s)
SupportBase
to be queried must invoke
SupportBase.setPath
, before calling this method. The path
format on Windows must be C:\\, where C is the drive letter.
code
- SupportBase
String
public boolean isWindows()
true
if operating system is Windowspublic boolean isLinux()
true
if operating system is Linuxpublic boolean isLinuxX86_64()
true
if operating system is Linux 64 bitspublic boolean isLinuxX86_32()
true
if operating system is Linux 32 bitspublic boolean isSunOS()
true
if operating system is Solarispublic boolean isHPUX()
true
if operating system is HPUXpublic boolean isAix()
true
if operating system is AIXpublic boolean isOS400()
true
if operating system is iSeriespublic boolean isWindowsOSType(java.lang.String os)
true
if operating system is Windowspublic boolean isLinuxOSType(java.lang.String os)
true
if operating system is Linuxpublic boolean isAixOSType(java.lang.String os)
true
if operating system is AIXpublic boolean isOS400OSType(java.lang.String os)
true
if operating system is OS/400 or iSeriespublic boolean isHPUXOSType(java.lang.String os)
true
if operating system is HPUXpublic boolean isSunOSType(java.lang.String os)
true
if operating system is Solarispublic boolean isPowerLinuxOSType(java.lang.String os)
true
if operating system is power linuxpublic java.lang.String getOSType(java.lang.String os)
String
operating system typepublic java.lang.String getPasswordValue(java.lang.String passwordVariableName)
The password is encrypted and stored as a hex string in the properties file. This will "unmask" the value and return it as a plain text string.
code
- String passwordVariableName
String
public java.lang.String getIbmNsiPropValue(SupportBase s)
ibmnsi.properties
file.
Uses the application ID of the product currently installing and the name
of the variable, concatenated together to form the key.
The SupportBase
to be queried must invoke
SupportBase.setVariableName
before calling this method.
s
- the SupportBase
to be queried
String
variable name
SupportBase.getVariableName
public java.lang.String getIbmNsiPropValueByKey(SupportBase s)
ibmnsi.properties
file.
The SupportBase
to be queried must invoke
SupportBase.setKey
before calling this method.
s
- the SupportBase
to be queried
String
key in the
ibmnsi.properties
file
SupportBase.getKey
public java.lang.String getIbmNsiISMPPropValue(SupportBase s)
ibmnsi.properties
file.
Uses the application ID of the product currently installing, the property
key type and the name of the variable, concatenated together to form the
key.
The SupportBase
to be queried must invoke
SupportBase.setVariableName
and
SupportBase.setPropertyKeyType
before calling this method.
s
- the SupportBase
to be queried
String
variable name
SupportBase.getVariableName
String
property key type
SupportBase.getPropertyKeyType
Valid key types
are:
SupportBase.ISMP_GLOBAL_PROPERTY, SupportBase.ISMP_PRODUCT_PROPERTY, and SupportBase.ISMP_WIZARD_PROPERTY
public java.lang.String getIbmNsiPropValue(java.lang.String variableName)
variableName
- -
The name of the variablepublic int invokeCommand(java.lang.String command)
The string “\bin\sh –c“ is added to the beginning of the command for Linux platforms. The string “cmd /C “ is added to the beginning of the command for Windows platforms.
command
- -
The command string to run.
public int invokeCommand(java.lang.String command, java.lang.String commandToLog)
The string “\bin\sh –c “ is added to the beginning of the command for Linux platforms. The string “cmd /C “ is added to the beginning of the command for Windows platforms.
command
- -
The command string to run.commandToLog
- -
The command string to log.
public int invokeCommand(java.lang.String command, java.lang.String commandToLog, java.lang.String launchDir)
The string “\bin\sh –c “ is added to the beginning of the command for Linux platforms. The string “cmd /C “ is added to the beginning of the command for Windows platforms.
command
- -
The command string to run.commandToLog
- -
The command string to log.launchDir
- The directory where to launch from.
public int invokeCommandLogOutput(java.lang.String command)
The string “\bin\sh –c “ is added to the beginning of the command for Linux platforms. The string “cmd /C “ is added to the beginning of the command for Windows platforms.
All output is logged to the default log file specified in the application
wrapper or the Support
command
- -
The command string to run.
public int invokeCommandLogOutput(java.lang.String command, java.lang.String commandToLog)
The string “\bin\sh –c “ is added to the beginning of the command for Linux platforms. The string “cmd /C “ is added to the beginning of the command for Windows platforms.
All output is logged to the default log file specified in the application
wrapper or the default of Support
command
- -
The command string to run.commandToLog
- The command to log.
public int invokeCommandLogOutput(java.lang.String command, java.lang.String commandToLog, java.lang.String launchDir)
The string “\bin\sh –c “ is added to the beginning of the command for Linux platforms. The string “cmd /C “ is added to the beginning of the command for Windows platforms.
All output is logged to the default log file specified in the application
wrapper or the default of Support
command
- -
The command string to run.commandToLog
- The command to log.launchDir
- The directory where to launch from.
public int invokeCommandLogOutputToFileName(java.lang.String command, java.lang.String logFileName)
The string “\bin\sh –c “ is added to the beginning of the command for Linux platforms. The string “cmd /C “ is added to the beginning of the command for Windows platforms.
command
- -
The command string to run.logFileName
- -
The name of the log file used for logging.
public int invokeCommandLogOutputToFileName(java.lang.String command, java.lang.String commandToLog, java.lang.String logFileName)
The string “\bin\sh –c “ is added to the beginning of the command for Linux platforms. The string “cmd /C “ is added to the beginning of the command for Windows platforms.
command
- -
The command string to run.commandToLog
- -
The command string to log.logFileName
- -
The name of the log file used for logging.
public int invokeCommandLogOutputToFileName(java.lang.String command, java.lang.String commandToLog, java.lang.String logFileName, java.lang.String launchDir)
The string “\bin\sh –c “ is added to the beginning of the command for Linux platforms. The string “cmd /C “ is added to the beginning of the command for Windows platforms.
command
- -
The command string to run.commandToLog
- -
The command string to log.logFileName
- -
The name of the log file used for logging.launchDir
- -
The directory where to launch from.
public void log(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setMessage
,
SupportBase.setLogFileName
, and
SupportBase.setLogsDir
before calling this method.
s
- the SupportBase
to be queried
SupportBase.getMessage
SupportBase.getLogFileName
SupportBase.getLogsDir
public void logNewLine(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setLogFileName
and
SupportBase.setLogsDir
before calling this method.
s
- the SupportBase
to be queried
SupportBase.getLogFileName
SupportBase.getLogsDir
public void logStatus(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setInstallSuccessStatus
,
SupportBase.setLogFileName
, and
SupportBase.setLogsDir
before calling this method.
s
- the SupportBase
to be queried
boolean
installation status
SupportBase.getInstallSuccessStatus
String
log file name
SupportBase.getLogFileName
String
log directory name
SupportBase.getLogsDir
public void log(java.lang.String message)
Message
- -
to write to the log.public void log(java.lang.String message, java.lang.String logFileName)
message
- -Full text message string to write to the log.logFileName
- -Fully qualified file name to write the message to.public boolean logAppendFile(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setFileName
,
SupportBase.setLogFileName
and
SupportBase.setLogsDir
before calling this method.
s
- the SupportBase
to be queried
SupportBase.getFileName
to be
opened.
SupportBase.getLogFileName
where the contents of SupportBase.getFileName
are appended.
public int logAppendFile(java.lang.String fileName)
fileName
- -
Specify the file name with an absolute path
public int logAppendFile(java.lang.String[] fileNames)
fileNames
- -
Array of string. Each element is a fully qualified name of a file to append.
public int logAppendFile(java.lang.String fileName, java.lang.String logFileName)
fileName
- -
Specify the file name with the absolute pathlogFileName
- -
should be the fully qualified path.
public int logAppendFile(java.lang.String[] fileNames, java.lang.String logFileName)
fileNames
- -
Use an absolute path for the names of the files in the array.logFileName
- -
The fully qualified log file name
public java.lang.String removeAlphaCharsFromString(java.lang.String inputString)
inputString
- -
The original input string.
public java.lang.String getTempDir()
public boolean fileGrep(SupportBase s)
The SupportBase
to be queried must invoke
SupportBase.setGrepFileName
and
SupportBase.setGrepString
before calling this method.
The SupportBase
to be queried may optionally invoke
SupportBase.setFileTextStartIndex
to designate the
starting point in the string text from which to begin the search.
s
- the SupportBase
to be queried
String
file name
SupportBase.getGrepFileName
String
to grep for
SupportBase.getGrepString
boolean
true
if the string was found in the file
false
otherwise
public boolean fileGrep(java.lang.String fileName, long startIndex, java.lang.String searchString)
public long fileLength(java.lang.String fileName)
fileName
- -
Specify the file name using an absolute path.
public java.lang.String[] directoryGrep(java.lang.String directoryName, java.lang.String regularExpression)
directoryName
- -
The directory name should contain the absolute path.regularExpression
- -
The regular expression to match.
public boolean arraySearch(java.lang.String[] messageArray, java.lang.String searchString)
messageArray
- -
Array of strings to search.searchString
- -
Search string.
public boolean isSameDirectoryName(java.lang.String location1, java.lang.String location2)
String
- String
-
boolean
public java.lang.String buildCommand(java.lang.String propFileName, java.lang.String command, java.lang.String newFileName)
propFileName
- -The name of the properties file.command
- -The real command to be run.newFileName
- -The name of the command which is built.
public java.lang.String trimDoubleQuotes(java.lang.String inputString)
String
- -the string to remove quotes from
public java.lang.String getPasswordValueByKey(java.lang.String key)
By specifying a fully qualified key, a password for applications other than the one currently installing can be obtained. The key may be in the form "taskId.appId.keyword".
Any password variable key that appears in the ibmnsi.properties file may be used.
The password is encrypted and stored as a hex string in the properties file. This will "unmask" the value and return it as a plain text string.
code
- String the key in the ibmnsi.properties file
String
public java.util.List getTiedVariableValue(java.lang.String variableKeyword)
List
of tied, host attribute values that
correspond to the variable keyword for the currently installing
application.
There is one value for each target computer selected for the task supplying the attribute to which the variable has been tied.
The order of the values in the list corresponds to the natural ordering
of the fully-qualified hostnames for the particular tied task. The list
of ordered, fully-qualified hostnames is available via the property
code
- String keyword. The variable keyword.
List
public java.util.List getQualifiedTiedVariableValue(java.lang.String task, java.lang.String applicationId, java.lang.String variableKeyword)
List
of tied, host attribute values that
correspond to the specified task, application Id and variable keyword.
There is one value for each target computer selected for the task supplying the attribute to which the variable has been tied.
The order of the values in the list corresponds to the natural ordering
of the fully-qualified hostnames for the particular tied task. The list of
of ordered, fully-qualified hostnames is available via the property
code
- String task. This is the task that contains the
application whose variable has been tied. It is NOT the task that
supplies the attribute to which the variable has been tied.code
- String application id. The application which contains
the variable whose value is tied.code
- String keyword. The variable keyword.
List
public java.util.List getTiedVariableValueForKey(java.lang.String key)
List
of tied, host attribute values that
correspond to the specified key.
There is one value for each target computer selected for the task supplying the attribute to which the variable has been tied.
If the key is not task qualified, the current task is assumed.
The order of the values in the list corresponds to the natural ordering
of the fully-qualified hostnames for the particular tied task. The list of
of ordered, fully-qualified hostnames is available via the property
code
- String key
List
public java.util.List getTiedPasswordValue(java.lang.String variableKeyword)
List
of tied, host password values that
correspond to the variable keyword for the currently installing
application.
There is one value for each target computer selected for the task supplying the attribute to which the variable has been tied.
The order of the values in the list corresponds to the natural ordering
of the fully-qualified hostnames for the particular tied task. The list of
of ordered, fully-qualified hostnames is available via the property
code
- String key
List
public java.util.List getQualifiedTiedPasswordValue(java.lang.String task, java.lang.String applicationId, java.lang.String variableKeyword)
List
of tied, password attribute values that
correspond to the specified task, application Id and variable keyword.
There is one value for each target computer selected for the task supplying the attribute to which the variable has been tied.
The order of the values in the list corresponds to the natural ordering
of the fully-qualified hostnames for the particular tied task. The list of
of ordered, fully-qualified hostnames is available via the property
code
- String task. This is the task that contains the
application whose variable has been tied. It is NOT the task that
supplies attribute to which the variable has been tied.code
- String application id. The application which contains
the variable whose value is tied.code
- String keyword. The variable keyword.
List
public java.util.List getTiedPasswordValueForKey(java.lang.String key)
List
of tied, host password values that
correspond to the specified key.
There is one value for each target computer selected for the task supplying the attribute to which the variable has been tied.
If the key is not task qualified, the current task is assumed.
The order of the values in the list corresponds to the natural ordering
of the fully-qualified hostnames for the particular tied task. The list of
of ordered, fully-qualified hostnames is available via the property
code
- String key
List
public boolean isVersionSupported(java.lang.String version, java.lang.String lowestSupportedVersion, java.lang.String highestSupportedVersion)
Version
- - version of a product to verify is supportedlowestSupportedVersion
- - the lowest supported version of a producthighestSupportedVersion
- - the highest supported version of product
public boolean valueExists(java.lang.String stringToSearch, java.lang.String[] values)
stringToSearch
- - the string to be searched for a particular valuevalues
- - an array of string values
public java.lang.String[] fileSearchAndReturnLinesWithSearch(java.lang.String filename, java.lang.String find, int startSearchPosition)
filename
- - The file name that contains the string.find
- - The string to find.startSearchPosition
- - The position of the file to start searching from.
public java.lang.String getQualifiedHostName()
public boolean getSetupFileRemovalSetting()
boolean
true
if setup files will
be removed, false
if setup files will not be removed.public void setResponseFileProperty(java.lang.String propertiesFilePath, java.lang.String key, java.lang.String value)
code
- String propertiesFilePath
In order to obtain the correct response file path and name, one of
the following methods should be used; getPreDeploymentCheckerResponseFilePath,
getEntryResponseFilePath, getMainResponseFilePath, getExitResponseFilePath,
getResponseFilePath.code
- String keycode
- String valuepublic java.lang.String getResponseFileProperty(java.lang.String propertiesFilePath, java.lang.String key)
code
- String propertiesFilePath
In order to obtain the correct response file path and name, one of
the following methods should be used; getPreDeploymentCheckerResponseFilePath,
getEntryResponseFilePath, getMainResponseFilePath, getExitResponseFilePath,
getResponseFilePath.code
- String key
String
valuepublic java.util.Properties getResponseFileProperties(java.lang.String propertiesFilePath)
code
- String propertiesFilePath
In order to obtain the correct response file path and name, one of
the following methods should be used; getPreDeploymentCheckerResponseFilePath,
getEntryResponseFilePath, getMainResponseFilePath, getExitResponseFilePath,
getResponseFilePath.
Properties
public boolean unPackJar(java.lang.String absolutePathName, java.lang.String destinationDirPath)
code
- String absolutePathName
The absolute path to the jar file including the name
of the jar file.code
- String destinationDirPath
The absolute destination path where the jar file will be upacked to.
public void launchLocalInteractiveProgram(SupportBase s)
Runtime.exec()
with the specified environment and working
directory and returns immediately. The method does not wait for the launched
program to complete.
This method should not be used to launch interactive programs during a remote deployment. The method assumes a local deployment.
The SupportBase
to be queried must invoke
setCommand
or setCommandArray
before
calling this method.
The value set via setCommand
will be replaced by
null
when setCommandArray
is invoked and
vice versa.
The SupportBase
to be queried may optionally invoke
SupportBase.setCommandLaunchDirectory
or
SupportBase.setCommandEnvironmentArray
before calling this
method. The environment array and/or the working directory may be
null
. If the environment array is null, the current
environment of the calling process will be used. If the working directory
is null, the current directory will be used.
Command logging may be prohibited via the
setCommandLogging
method by passing a value of
false
.
The SupportBase.setWaitForOutput
cannot be used with
this method.
The Wait For Completion property must be checked for the corresponding user program.
An alternative of launchLocalInteractiveProgram
method is to invoke SupportBase.setLocalInteractive(true)
prior to invoking executeCommand
.
s
- SupportBase
to be queriedpublic boolean isPortRegistered(int port)
port
- the port to check
public boolean isIpv6Address(java.lang.String computerName)
For example, "FEDC:BA98:7654:3210:FEDC:BA98:7654:3210" would return true. The name "test.ibm.com" would return false.
computerName
-
public SupportBase getTheSupportBase()
public void setTheSupportBase(SupportBase theSupportBase)
theSupportBase
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |