Class FixUtils


  • public class FixUtils
    extends java.lang.Object
    A variety of utilities and constants available for use throughout the update installer.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String AIX
      String representing the AIX operating system
      static java.lang.String AIX64
      String representing the AIX 64-bit operating system
      static java.lang.String AMC
      String representing the AMC TDI component
      static java.lang.String BASE
      String representing the BASE TDI component
      static java.lang.String CE
      String representing the CE TDI component
      static java.lang.String CE_UPDATE
      String representing the CE Update TDI component
      static java.lang.String EDITION
      String representing the EDITION section of the .registry file
      static java.lang.String EWP
      String representing the BASE TDI component
      static java.lang.String EXAMPLES
      String representing the Examples TDI component
      static java.lang.String FIXES
      String representing the FIXES section of the .registry file
      static java.lang.String FIXPACK_INDICATOR
      String representing a fixpack.
      static java.lang.String FULL
      String representing the full license version of TDI
      static java.lang.String GENERAL
      String representing the General Purpose version of TDI
      static java.lang.String HPIA64
      String representing the HP-UX 64 bit Itanium operating system
      static java.lang.String HPUX
      String representing an HP-UX operating system
      static java.lang.String I5OS
      String representing the I5OS operating system
      static java.lang.String IDENTITY
      String representing the Identity version of TDI
      static java.lang.String IEHS
      String representing the IEHS TDI component
      static java.lang.String JDOCS
      String representing the JavaDocs TDI component
      static java.lang.String LEVEL
      String representing the LEVEL section of the .registry file
      static java.lang.String LICENSE
      String representing the LICENSE section of the .registry file
      static java.lang.String LINUX
      String representing a Linux operating system
      static java.lang.String LINUX_AMD64
      String representing the Linux AMD64 operating system
      static java.lang.String LINUX_PPC
      String representing the Linux PPC operating system
      static java.lang.String NAME
      String representing the NAME section of the .manifest file
      static java.lang.String NONE
      String representing the value "None"
      static java.lang.String OBJECT_CODE
      The copyright notice for binary java code required by legal.
      static java.lang.String OPTERON
      String representing the Solaris Opteron operating system
      static java.lang.String PLUGINS
      String representing the PLUGINS TDI component
      static java.lang.String PREREQ
      String representing the PREREQ section of the .manifest file
      static java.lang.String SERVER
      String representing the SERVER TDI component
      static java.lang.String SOLARIS
      String representing a Solaris operating system
      static java.lang.String TRIAL
      String representing the trial license version of TDI
      static java.lang.String UNKNOWN
      String representing an unknown operating system
      static java.lang.String WINDOWS
      String representing a Windows operating system
      static java.lang.String WINDOWS64
      String representing the Windows AMD64
      static java.lang.String ZLINUX
      String representing the zLinux operating system
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int createAndExecUnixScript​(java.lang.String[] cmds)
      Creates a temporary script named ./tempScript.sh from the commands in the passed in array and then executes that script.
      static int executeCommand​(java.lang.String[] commands)
      Executes an operating system command.
      static java.lang.String[] getComponents()
      Gets the list of TDI components
      static java.lang.String getOS()
      Determines the current operating system.
      static java.lang.String[] readFile​(java.io.InputStream infile)
      Given an InputStream, will read a file into an array.
      static java.lang.String[] readFile​(java.lang.String filename)
      Given a filename, will read that file into an array.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • OBJECT_CODE

        public static final java.lang.String OBJECT_CODE
        The copyright notice for binary java code required by legal.
        See Also:
        Constant Field Values
      • BASE

        public static final java.lang.String BASE
        String representing the BASE TDI component
        See Also:
        Constant Field Values
      • SERVER

        public static final java.lang.String SERVER
        String representing the SERVER TDI component
        See Also:
        Constant Field Values
      • CE

        public static final java.lang.String CE
        String representing the CE TDI component
        See Also:
        Constant Field Values
      • CE_UPDATE

        public static final java.lang.String CE_UPDATE
        String representing the CE Update TDI component
        See Also:
        Constant Field Values
      • JDOCS

        public static final java.lang.String JDOCS
        String representing the JavaDocs TDI component
        See Also:
        Constant Field Values
      • EXAMPLES

        public static final java.lang.String EXAMPLES
        String representing the Examples TDI component
        See Also:
        Constant Field Values
      • IEHS

        public static final java.lang.String IEHS
        String representing the IEHS TDI component
        See Also:
        Constant Field Values
      • EWP

        public static final java.lang.String EWP
        String representing the BASE TDI component
        See Also:
        Constant Field Values
      • AMC

        public static final java.lang.String AMC
        String representing the AMC TDI component
        See Also:
        Constant Field Values
      • PLUGINS

        public static final java.lang.String PLUGINS
        String representing the PLUGINS TDI component
        See Also:
        Constant Field Values
      • FIXES

        public static final java.lang.String FIXES
        String representing the FIXES section of the .registry file
        See Also:
        Constant Field Values
      • LEVEL

        public static final java.lang.String LEVEL
        String representing the LEVEL section of the .registry file
        See Also:
        Constant Field Values
      • PREREQ

        public static final java.lang.String PREREQ
        String representing the PREREQ section of the .manifest file
        See Also:
        Constant Field Values
      • NAME

        public static final java.lang.String NAME
        String representing the NAME section of the .manifest file
        See Also:
        Constant Field Values
      • EDITION

        public static final java.lang.String EDITION
        String representing the EDITION section of the .registry file
        See Also:
        Constant Field Values
      • LICENSE

        public static final java.lang.String LICENSE
        String representing the LICENSE section of the .registry file
        See Also:
        Constant Field Values
      • TRIAL

        public static final java.lang.String TRIAL
        String representing the trial license version of TDI
      • FULL

        public static final java.lang.String FULL
        String representing the full license version of TDI
      • GENERAL

        public static final java.lang.String GENERAL
        String representing the General Purpose version of TDI
      • IDENTITY

        public static final java.lang.String IDENTITY
        String representing the Identity version of TDI
      • NONE

        public static final java.lang.String NONE
        String representing the value "None"
      • WINDOWS

        public static final java.lang.String WINDOWS
        String representing a Windows operating system
        See Also:
        Constant Field Values
      • WINDOWS64

        public static final java.lang.String WINDOWS64
        String representing the Windows AMD64
        See Also:
        Constant Field Values
      • I5OS

        public static final java.lang.String I5OS
        String representing the I5OS operating system
        See Also:
        Constant Field Values
      • ZLINUX

        public static final java.lang.String ZLINUX
        String representing the zLinux operating system
        See Also:
        Constant Field Values
      • AIX

        public static final java.lang.String AIX
        String representing the AIX operating system
        See Also:
        Constant Field Values
      • AIX64

        public static final java.lang.String AIX64
        String representing the AIX 64-bit operating system
        See Also:
        Constant Field Values
      • SOLARIS

        public static final java.lang.String SOLARIS
        String representing a Solaris operating system
        See Also:
        Constant Field Values
      • OPTERON

        public static final java.lang.String OPTERON
        String representing the Solaris Opteron operating system
        See Also:
        Constant Field Values
      • LINUX_PPC

        public static final java.lang.String LINUX_PPC
        String representing the Linux PPC operating system
        See Also:
        Constant Field Values
      • LINUX_AMD64

        public static final java.lang.String LINUX_AMD64
        String representing the Linux AMD64 operating system
        See Also:
        Constant Field Values
      • LINUX

        public static final java.lang.String LINUX
        String representing a Linux operating system
        See Also:
        Constant Field Values
      • HPIA64

        public static final java.lang.String HPIA64
        String representing the HP-UX 64 bit Itanium operating system
        See Also:
        Constant Field Values
      • HPUX

        public static final java.lang.String HPUX
        String representing an HP-UX operating system
        See Also:
        Constant Field Values
      • UNKNOWN

        public static final java.lang.String UNKNOWN
        String representing an unknown operating system
        See Also:
        Constant Field Values
      • FIXPACK_INDICATOR

        public static final java.lang.String FIXPACK_INDICATOR
        String representing a fixpack. If a fix name starts with this, it is a fixpack.
        See Also:
        Constant Field Values
    • Method Detail

      • getComponents

        public static final java.lang.String[] getComponents()
        Gets the list of TDI components
        Returns:
        An array representing TDI components
      • readFile

        public static java.lang.String[] readFile​(java.io.InputStream infile)
        Given an InputStream, will read a file into an array.
        Parameters:
        infile - The InputStream to be read
        Returns:
        An array of the lines in the file, or null if the file is empty or an error occurred
      • readFile

        public static java.lang.String[] readFile​(java.lang.String filename)
        Given a filename, will read that file into an array.
        Parameters:
        filename - The name of the file to be read
        Returns:
        An array of the lines in the file, or null if the file is empty or an error occurred
      • executeCommand

        public static int executeCommand​(java.lang.String[] commands)
        Executes an operating system command.
        Parameters:
        commands - An array representing a command to run and its arguments
        Returns:
        0 if the command completed without an error, nonzero otherwise
      • getOS

        public static java.lang.String getOS()
        Determines the current operating system.
        Returns:
        A string from the list above representing the current operating system
      • createAndExecUnixScript

        public static int createAndExecUnixScript​(java.lang.String[] cmds)
        Creates a temporary script named ./tempScript.sh from the commands in the passed in array and then executes that script. The temporary script is deleted after it is executed. This method is only intended for use on a UNIX operating system. The purpose of this function is to be able to executed that you normally can't by simply calling a regular exec, or if you want to group several shell cmds together in one call.
        Parameters:
        cmds - Commands to write to the temporary script file
        Returns:
        0 if no error was detected, nonzero otherwise