psdi.util

Class Version

  • java.lang.Object
    • psdi.util.Version


  • public class Version
    extends java.lang.Object
    psdi.util.Version is used to capture the version information for a release of the MXE product. It can be subclassed for module specific version information. Note: all the methods of this class are static.
    NOTE:This class is updated at build time
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      class  Version.PFReader 
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.util.Map allProductInfo 
      static java.util.Map allProductInfoWithoutProductKeyCheck 
      static java.lang.String build
      Build number
      static java.lang.String DBBuild
      DB Build
      static boolean dbConnection 
      protected static java.lang.String dbPropPrefix 
      protected static java.lang.String defaultSchemaOwner 
      static java.lang.String hfDBBuild
      Hotfix DB build
      static java.lang.String hotfix
      Hotfix number
      static java.lang.String lastReleaseDBbuilds
      last release database build number, it is not final on purpose to prevent upatedb class keeps the variable in its class by the compiler.
      static java.lang.String lastReleaseMTDBbuilds
      last release database build number for MT, it is not final on purpose to prevent upatedb class keeps the variable in its class by the compiler.
      static java.lang.String lastReportVersion 
      static java.lang.String majorVersion
      Major version
      static java.lang.String minorVersion
      Minor version
      static java.lang.String modLevel
      Modification version
      static java.lang.String MTDBBuild
      The latest MT script
      static java.lang.String patch
      Patch version
      static java.util.HashSet productKeysSet 
      static java.lang.String productName
      Name of the product
      static java.lang.String propdir
      properties file directory
      static java.lang.String versioncompatiblemap
      This means user can go from 7.1.1.11 or 7500 to 7503, not from in between 7.1.1.11 and 7500 like 71112 to 7503
      static java.lang.String versionStr 
    • Constructor Summary

      Constructors 
      Constructor and Description
      Version() 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static boolean checkMaxVarInDB(java.lang.String dbmaxvarname, java.sql.Connection con)
      Check if maxvar is there in database or not.
      static java.util.Map getAllProductInfo() 
      static java.util.Map getAllProductInfoWithoutProductKeyCheck()
      Returns hashmap with version information for all products without productkey check
      static java.lang.String getBaseProductName()
      returns the base product name string
      static java.lang.String getBuildString()
      returns the build string
      static java.sql.Connection getConnection() 
      static java.lang.String getDBBuildString()
      returns the database build string
      static java.lang.String getHFDBBuildString(boolean mt)
      returns the hotfix database build string
      static java.lang.String getHotFixVersion() 
      static java.lang.String getLastRelDBBuildString(java.lang.String previousBuildsString)
      returns the last release database build string
      static java.lang.String getMTDBBuildString()
      returns the database build string for MT
      static java.lang.String getPatchString()
      returns the patch build string
      java.lang.String getProductDir(java.lang.String productDir) 
      static java.util.Map getProductInfoFromXMLStream(java.util.HashMap xmlMap, java.sql.Connection con)
      Loop through all product xml inputstream and returns version information of products that has valid ProductKey.
      static java.lang.String getProductVersion() 
      static java.lang.String[] getRelDBBuildStrings(java.lang.String previousDBBuilds)
      returns the last releases' database build strings and the new release string in an array in the their relase orders.
      java.util.HashMap getStreamFromBundle(java.lang.String productDir) 
      java.util.HashMap getStreamfromDirectory(java.lang.String productDir)
      Gets maximo Input Stream from XML files in directory structure
      java.util.HashMap getStreamFromJar(java.lang.String productDir)
      Get product xml stream from jar
      static java.lang.String getString()
      Returns the version label.
      static java.lang.String getString(java.lang.String propdir)
      Returns the version label when not connected to MXServer.
      static java.lang.String getString(java.lang.String propdir, boolean isDBConnected)
      Returns the version label when not connected to MXServer.
      static java.lang.String[] getStringForHelpAboutDialog()
      Return the version label for help about dialog
      static java.lang.String getversionCompatibleMap() 
      java.util.HashMap getXMLInputStream()
      Gets maximo Input Stream from XML files
      static void main(java.lang.String[] argv)
      Print out the version of the product to the console
      static void setStreamHelper(StreamHelper _helper) 
      • Methods inherited from class java.lang.Object

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

      • productName

        public static final java.lang.String productName
        Name of the product
        See Also:
        Constant Field Values
      • majorVersion

        public static final java.lang.String majorVersion
        Major version
        See Also:
        Constant Field Values
      • minorVersion

        public static final java.lang.String minorVersion
        Minor version
        See Also:
        Constant Field Values
      • modLevel

        public static final java.lang.String modLevel
        Modification version
        See Also:
        Constant Field Values
      • MTDBBuild

        public static final java.lang.String MTDBBuild
        The latest MT script
        See Also:
        Constant Field Values
      • lastReleaseDBbuilds

        public static java.lang.String lastReleaseDBbuilds
        last release database build number, it is not final on purpose to prevent upatedb class keeps the variable in its class by the compiler.
      • lastReleaseMTDBbuilds

        public static java.lang.String lastReleaseMTDBbuilds
        last release database build number for MT, it is not final on purpose to prevent upatedb class keeps the variable in its class by the compiler.
      • hfDBBuild

        public static final java.lang.String hfDBBuild
        Hotfix DB build
        See Also:
        Constant Field Values
      • versioncompatiblemap

        public static java.lang.String versioncompatiblemap
        This means user can go from 7.1.1.11 or 7500 to 7503, not from in between 7.1.1.11 and 7500 like 71112 to 7503
      • lastReportVersion

        public static java.lang.String lastReportVersion
      • versionStr

        public static java.lang.String versionStr
      • propdir

        public static java.lang.String propdir
        properties file directory
      • dbConnection

        public static boolean dbConnection
      • allProductInfo

        public static java.util.Map allProductInfo
      • allProductInfoWithoutProductKeyCheck

        public static java.util.Map allProductInfoWithoutProductKeyCheck
      • productKeysSet

        public static java.util.HashSet productKeysSet
      • defaultSchemaOwner

        protected static final java.lang.String defaultSchemaOwner
        See Also:
        Constant Field Values
    • Constructor Detail

      • Version

        public Version()
    • Method Detail

      • getHotFixVersion

        public static java.lang.String getHotFixVersion()
      • getProductVersion

        public static java.lang.String getProductVersion()
      • getString

        public static java.lang.String getString(java.lang.String propdir,
                                                 boolean isDBConnected)
        Returns the version label when not connected to MXServer.
        Parameters:
        propdir - The location of the maximo.properties file
      • getString

        public static java.lang.String getString(java.lang.String propdir)
        Returns the version label when not connected to MXServer.
        Parameters:
        propdir - The location of the maximo.properties file
      • getString

        public static java.lang.String getString()
        Returns the version label.
      • getConnection

        public static java.sql.Connection getConnection()
      • getStringForHelpAboutDialog

        public static java.lang.String[] getStringForHelpAboutDialog()
        Return the version label for help about dialog
      • getXMLInputStream

        public java.util.HashMap getXMLInputStream()
                                            throws java.lang.Exception
        Gets maximo Input Stream from XML files
        Returns:
        hashmap(productname,inputstream)
        Throws:
        java.lang.Exception
      • getProductDir

        public java.lang.String getProductDir(java.lang.String productDir)
      • setStreamHelper

        public static void setStreamHelper(StreamHelper _helper)
      • getStreamFromBundle

        public java.util.HashMap getStreamFromBundle(java.lang.String productDir)
                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getStreamFromJar

        public java.util.HashMap getStreamFromJar(java.lang.String productDir)
                                           throws java.lang.Exception
        Get product xml stream from jar
        Throws:
        java.lang.Exception
      • getStreamfromDirectory

        public java.util.HashMap getStreamfromDirectory(java.lang.String productDir)
                                                 throws java.lang.Exception
        Gets maximo Input Stream from XML files in directory structure
        Throws:
        java.lang.Exception
      • getAllProductInfo

        public static java.util.Map getAllProductInfo()
      • getAllProductInfoWithoutProductKeyCheck

        public static java.util.Map getAllProductInfoWithoutProductKeyCheck()
        Returns hashmap with version information for all products without productkey check
        Returns:
      • getDBBuildString

        public static java.lang.String getDBBuildString()
        returns the database build string
      • getMTDBBuildString

        public static java.lang.String getMTDBBuildString()
        returns the database build string for MT
      • getHFDBBuildString

        public static java.lang.String getHFDBBuildString(boolean mt)
        returns the hotfix database build string
      • getLastRelDBBuildString

        public static java.lang.String getLastRelDBBuildString(java.lang.String previousBuildsString)
        returns the last release database build string
      • getBuildString

        public static java.lang.String getBuildString()
        returns the build string
      • getPatchString

        public static java.lang.String getPatchString()
        returns the patch build string
      • main

        public static void main(java.lang.String[] argv)
        Print out the version of the product to the console
      • getProductInfoFromXMLStream

        public static java.util.Map getProductInfoFromXMLStream(java.util.HashMap xmlMap,
                                                                java.sql.Connection con)
                                                         throws java.lang.Exception
        Loop through all product xml inputstream and returns version information of products that has valid ProductKey.
        Parameters:
        Hashmap(productname,inputstream) -
        database - connection
        Returns:
        version information
        Throws:
        java.lang.Exception
      • checkMaxVarInDB

        public static boolean checkMaxVarInDB(java.lang.String dbmaxvarname,
                                              java.sql.Connection con)
        Check if maxvar is there in database or not.
      • getBaseProductName

        public static java.lang.String getBaseProductName()
        returns the base product name string
      • getversionCompatibleMap

        public static java.lang.String getversionCompatibleMap()
      • getRelDBBuildStrings

        public static java.lang.String[] getRelDBBuildStrings(java.lang.String previousDBBuilds)
        returns the last releases' database build strings and the new release string in an array in the their relase orders.