Class JKVersionManager

java.lang.Object
com.jk.core.version.JKVersionManager

public class JKVersionManager extends Object
This class manages version information for software components.
Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Method Details

    • getInstance

      public static JKVersionManager getInstance()
      This method gets the singleton instance of the version manager.
      Returns:
      the singleton instance of JKVersionManager.
    • init

      protected void init() throws IOException
      This method initialize the version manager by reading and registering version information from build properties files.
      Throws:
      IOException - if an I/O exception has occurred.
    • registerInfo

      public void registerInfo(String fileName)
      This method register version information from a build properties file.
      Parameters:
      fileName - Specifies the name of the build properties file.
    • registerInfo

      public void registerInfo(JKVersionInfo info)
      This method register version information.
      Parameters:
      info - Specifies the version information to register.
    • getVersionInfoMap

      public Map<String,JKVersionInfo> getVersionInfoMap()
      This method gets the map of version information.
      Returns:
      the map of version information.
    • getVersionInfo

      public JKVersionInfo getVersionInfo(String name)
      This method get version information by name.
      Parameters:
      name - Specifies the name of the software component.
      Returns:
      the version information.
    • getVersionsInfo

      public List<JKVersionInfo> getVersionsInfo()
      This method gets a list of all version information.
      Returns:
      a list of all version information.
    • main

      public static void main(String[] args)
      This main method demonstrates how to display version information.
      Parameters:
      args - the command-line arguments.