Class ReleaseInfo

java.lang.Object
org.daiitech.naftah.ReleaseInfo

public final class ReleaseInfo extends Object
Exposes the Naftah release information such as version, build date, and build time.

This class loads the properties from META-INF/naftah-release-info.properties at class initialization time.

It is a utility class and cannot be instantiated.

Author:
Chakib Daii
  • Field Details

    • NAFTAH_VERSION_PROPERTY

      public static final String NAFTAH_VERSION_PROPERTY
      System property key representing the Naftah version.
      See Also:
    • NAFTAH_VERSION_DATE_PROPERTY

      public static final String NAFTAH_VERSION_DATE_PROPERTY
      System property key representing the Naftah build/release date.
      See Also:
    • NAFTAH_VERSION_TIME_PROPERTY

      public static final String NAFTAH_VERSION_TIME_PROPERTY
      System property key representing the Naftah framework build/release time.
      See Also:
    • RELEASE_INFO

      private static final Properties RELEASE_INFO
      The loaded release information properties.
    • RELEASE_INFO_FILE

      private static final String RELEASE_INFO_FILE
      Path to the release info properties file inside the JAR.
      See Also:
    • KEY_IMPLEMENTATION_VERSION

      private static final String KEY_IMPLEMENTATION_VERSION
      Property key for the implementation version.
      See Also:
    • KEY_BUNDLE_VERSION

      private static final String KEY_BUNDLE_VERSION
      Property key for the bundle version.
      See Also:
    • KEY_BUILD_DATE

      private static final String KEY_BUILD_DATE
      Property key for the build date.
      See Also:
    • KEY_BUILD_TIME

      private static final String KEY_BUILD_TIME
      Property key for the build time.
      See Also:
  • Constructor Details

    • ReleaseInfo

      private ReleaseInfo()
      Private constructor to prevent instantiation. Always throws a NaftahBugError when called.
  • Method Details

    • getVersion

      public static String getVersion()
      Returns the implementation version of the release.
      Returns:
      the implementation version string, or an empty string if not found
    • getBundleVersion

      public static String getBundleVersion()
      Returns the bundle version of the release.
      Returns:
      the bundle version string, or an empty string if not found
    • getBuildDate

      public static String getBuildDate()
      Returns the build date of the release.
      Returns:
      the build date string, or an empty string if not found
    • getBuildTime

      public static String getBuildTime()
      Returns the build time of the release.
      Returns:
      the build time string, or an empty string if not found
    • getAllProperties

      public static Properties getAllProperties()
      Returns all loaded release information properties.
      Returns:
      a Properties object containing all release metadata
    • get

      private static String get(String propName)
      Returns the value of a specific release property.
      Parameters:
      propName - the name of the property
      Returns:
      the value of the property, or an empty string if not found