Package org.daiitech.naftah
Class ReleaseInfo
java.lang.Object
org.daiitech.naftah.ReleaseInfo
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 Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringProperty key for the build date.private static final StringProperty key for the build time.private static final StringProperty key for the bundle version.private static final StringProperty key for the implementation version.static final StringSystem property key representing the Naftah build/release date.static final StringSystem property key representing the Naftah version.static final StringSystem property key representing the Naftah framework build/release time.private static final PropertiesThe loaded release information properties.private static final StringPath to the release info properties file inside the JAR. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePrivate constructor to prevent instantiation. -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringReturns the value of a specific release property.static PropertiesReturns all loaded release information properties.static StringReturns the build date of the release.static StringReturns the build time of the release.static StringReturns the bundle version of the release.static StringReturns the implementation version of the release.
-
Field Details
-
NAFTAH_VERSION_PROPERTY
System property key representing the Naftah version.- See Also:
-
NAFTAH_VERSION_DATE_PROPERTY
System property key representing the Naftah build/release date.- See Also:
-
NAFTAH_VERSION_TIME_PROPERTY
System property key representing the Naftah framework build/release time.- See Also:
-
RELEASE_INFO
The loaded release information properties. -
RELEASE_INFO_FILE
Path to the release info properties file inside the JAR.- See Also:
-
KEY_IMPLEMENTATION_VERSION
Property key for the implementation version.- See Also:
-
KEY_BUNDLE_VERSION
Property key for the bundle version.- See Also:
-
KEY_BUILD_DATE
Property key for the build date.- See Also:
-
KEY_BUILD_TIME
Property key for the build time.- See Also:
-
-
Constructor Details
-
ReleaseInfo
private ReleaseInfo()Private constructor to prevent instantiation. Always throws aNaftahBugErrorwhen called.
-
-
Method Details
-
getVersion
Returns the implementation version of the release.- Returns:
- the implementation version string, or an empty string if not found
-
getBundleVersion
Returns the bundle version of the release.- Returns:
- the bundle version string, or an empty string if not found
-
getBuildDate
Returns the build date of the release.- Returns:
- the build date string, or an empty string if not found
-
getBuildTime
Returns the build time of the release.- Returns:
- the build time string, or an empty string if not found
-
getAllProperties
Returns all loaded release information properties.- Returns:
- a
Propertiesobject containing all release metadata
-
get
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
-