Package com.unboundid.ldap.sdk
Class Version
java.lang.Object
com.unboundid.ldap.sdk.Version
This class provides information about the current version of the UnboundID
LDAP SDK for Java.
Note that if you reference the constant values directly in your source code, those constant values may be compiled into your source code directly rather than dynamically replacing them at runtime or when the class is loaded. This means that if you swap out the LDAP SDK library after the source code has been compiled, the already-compiled code may not accurately reflect the values from the version of the LDAP SDK that is actually being used. To avoid that, you may wish to use the provided methods to obtain the values rather than referencing the constants directly (e.g., use
Note that if you reference the constant values directly in your source code, those constant values may be compiled into your source code directly rather than dynamically replacing them at runtime or when the class is loaded. This means that if you swap out the LDAP SDK library after the source code has been compiled, the already-compiled code may not accurately reflect the values from the version of the LDAP SDK that is actually being used. To avoid that, you may wish to use the provided methods to obtain the values rather than referencing the constants directly (e.g., use
getProductName() instead of PRODUCT_NAME).-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA timestamp that indicates when this build of the LDAP SDK was generated.static final StringThe full version string for the LDAP SDK.static final intThe major version number for the LDAP SDK.static final intThe minor version number for the LDAP SDK.static final StringThe version number string for the LDAP SDK, which contains just the major, minor, and point version, and optional version qualifier.static final intThe point version number for the LDAP SDK.static final StringThe official full product name for the LDAP SDK.static final StringThe path to the LDAP SDK source code in the repository.static final StringThe type of repository from which the source code used to build the LDAP SDK was retrieved.static final StringThe URL for the repository from which the source code used to build the LDAP SDK was retrieved.static final StringThe string representation of the source revision from which this build of the LDAP SDK was generated.static final longDeprecated.static final StringThe short product name for the LDAP SDK.static final StringThe short version string for the LDAP SDK.static final StringThe version qualifier string for the LDAP SDK. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringRetrieves a timestamp that indicates when this build of the LDAP SDK was generated.static StringRetrieves the full version string for the LDAP SDK.static intRetrieves the major version number for the LDAP SDK.static intRetrieves the minor version number for the LDAP SDK.static StringRetrieves the version number string for the LDAP SDK, which contains just the major, minor, and point version, and optional version qualifier.static intRetrieves the point version number for the LDAP SDK.static StringRetrieves the official full product name for the LDAP SDK.static StringRetrieves the path to the LDAP SDK source code in the repository.static StringRetrieves the type of repository from which the source code used to build the LDAP SDK was retrieved.static StringRetrieves the URL for the repository from which the source code used to build the LDAP SDK was retrieved.static StringRetrieves the string representation of the source revision from which this build of the LDAP SDK was generated.static StringRetrieves the short product name for the LDAP SDK.static StringRetrieves the short version string for the LDAP SDK.Retrieves a list of lines containing information about the LDAP SDK version.static StringRetrieves the version qualifier string for the LDAP SDK.static voidPrints version information from this class to standard output.
-
Field Details
-
PRODUCT_NAME
The official full product name for the LDAP SDK. For this build, the value is "UnboundID LDAP SDK for Java".- See Also:
-
SHORT_NAME
The short product name for the LDAP SDK. This will not have any spaces. For this build, the value is "unboundid-ldapsdk".- See Also:
-
MAJOR_VERSION
The major version number for the LDAP SDK. For this build, the value is 7.- See Also:
-
MINOR_VERSION
The minor version number for the LDAP SDK. For this build, the value is 0.- See Also:
-
POINT_VERSION
The point version number for the LDAP SDK. For this build, the value is 3.- See Also:
-
VERSION_QUALIFIER
The version qualifier string for the LDAP SDK. It will often be a zero-length string, but may be non-empty for special builds that should be tagged in some way (e.g., "-beta1" or "-rc2"). For this build, the value is "".- See Also:
-
BUILD_TIMESTAMP
A timestamp that indicates when this build of the LDAP SDK was generated. For this build, the value is "20250725000000Z".- See Also:
-
REPOSITORY_TYPE
The type of repository from which the source code used to build the LDAP SDK was retrieved. It will be one of "subversion", "git", or "{unknown}". For this build, the value is "git".- See Also:
-
REPOSITORY_URL
The URL for the repository from which the source code used to build the LDAP SDK was retrieved. If repository information could not be determined at build time, then this will be a file URL that references the path to the source code on the system used to build the LDAP SDK library. For this build, the value is "https://github.com/pingidentity/ldapsdk.git".- See Also:
-
REPOSITORY_PATH
The path to the LDAP SDK source code in the repository. If repository information could not be determined at build time, then this will be "/". For this build, the value is "{unknown}".- See Also:
-
REVISION_ID
The string representation of the source revision from which this build of the LDAP SDK was generated. For a subversion repository, this will be the string representation of the revision number. For a git repository, this will be the hexadecimal representation of the digest for the most recent commit. If repository information could not be determined at build time, the value will be "{unknown}". For this build, the value is "6580b9a0e188fedfe4c67776aabf1f0b61c06a28".- See Also:
-
REVISION_NUMBER
Deprecated.Use theREVISION_IDproperty instead, since it can handle non-numeric revision identifiers.The revision number for the source revision from which this build of the LDAP SDK was generated. For a subversion repository, this will be the revision number. For a git repository (which uses a hexadecimal digest to indicate revisions), or if repository information could not be determined at build time, the value will be -1. For this build, the value is -1.- See Also:
-
FULL_VERSION_STRING
The full version string for the LDAP SDK. For this build, the value is "UnboundID LDAP SDK for Java 7.0.3".- See Also:
-
SHORT_VERSION_STRING
The short version string for the LDAP SDK. This will not have any spaces. For this build, the value is "unboundid-ldapsdk-7.0.3".- See Also:
-
NUMERIC_VERSION_STRING
The version number string for the LDAP SDK, which contains just the major, minor, and point version, and optional version qualifier. For this build, the version string is "7.0.3".- See Also:
-
-
Method Details
-
main
Prints version information from this class to standard output.- Parameters:
args- The command-line arguments provided to this program.
-
getProductName
Retrieves the official full product name for the LDAP SDK. For this build, the value is "UnboundID LDAP SDK for Java".- Returns:
- The official full product name for the LDAP SDK.
-
getShortName
Retrieves the short product name for the LDAP SDK. This will not have any spaces. For this build, the value is "unboundid-ldapsdk".- Returns:
- The short product name for the LDAP SDK.
-
getMajorVersion
Retrieves the major version number for the LDAP SDK. For this build, the value is 7.- Returns:
- The major version number for the LDAP SDK.
-
getMinorVersion
Retrieves the minor version number for the LDAP SDK. For this build, the value is 0.- Returns:
- The minor version number for the LDAP SDK.
-
getPointVersion
Retrieves the point version number for the LDAP SDK. For this build, the value is 3.- Returns:
- The point version number for the LDAP SDK.
-
getVersionQualifier
Retrieves the version qualifier string for the LDAP SDK. It will often be a zero-length string, but may be non-empty for special builds that should be tagged in some way (e.g., "-beta1" or "-rc2"). For this build, the value is "".- Returns:
- The version qualifier string for the LDAP SDK.
-
getBuildTimestamp
Retrieves a timestamp that indicates when this build of the LDAP SDK was generated. For this build, the value is "20250725000000Z".- Returns:
- A timestamp that indicates when this build of the LDAP SDK was generated.
-
getRepositoryType
Retrieves the type of repository from which the source code used to build the LDAP SDK was retrieved. It will be one of "subversion", "git", or "{unknown}". For this build, the value is "git".- Returns:
- The type of repository from which the source code used to build the LDAP SDK was retrieved.
-
getRepositoryURL
Retrieves the URL for the repository from which the source code used to build the LDAP SDK was retrieved. If repository information could not be determined at build time, then this will be a file URL that references the path to the source code on the system used to build the LDAP SDK library. For this build, the value is "https://github.com/pingidentity/ldapsdk.git".- Returns:
- The URL for the repository from which the source code used to build the LDAP SDK was retrieved.
-
getRepositoryPath
Retrieves the path to the LDAP SDK source code in the repository. If repository information could not be determined at build time, then this will be "/". For this build, the value is "{unknown}".- Returns:
- The path to the LDAP SDK source code in the repository.
-
getRevisionID
Retrieves the string representation of the source revision from which this build of the LDAP SDK was generated. For a subversion repository, this will be the string representation of the revision number. For a git repository, this will be the hexadecimal representation of the digest for the most recent commit. If repository information could not be determined at build time, the value will be "{unknown}". For this build, the value is "6580b9a0e188fedfe4c67776aabf1f0b61c06a28".- Returns:
- The string representation of the source revision from which this build of the LDAP SDK was generated.
-
getFullVersionString
Retrieves the full version string for the LDAP SDK. For this build, the value is "UnboundID LDAP SDK for Java 7.0.3".- Returns:
- The full version string for the LDAP SDK.
-
getShortVersionString
Retrieves the short version string for the LDAP SDK. This will not have any spaces. For this build, the value is "unboundid-ldapsdk-7.0.3".- Returns:
- The short version string for the LDAP SDK.
-
getNumericVersionString
Retrieves the version number string for the LDAP SDK, which contains just the major, minor, and point version, and optional version qualifier. For this build, the version string is "7.0.3".- Returns:
- The version number string for the LDAP SDK.
-
getVersionLines
Retrieves a list of lines containing information about the LDAP SDK version.- Returns:
- A list of lines containing information about the LDAP SDK version.
-
REVISION_IDproperty instead, since it can handle non-numeric revision identifiers.