Class Version


  • @ThreadSafety(level=COMPLETELY_THREADSAFE)
    public final class Version
    extends java.lang.Object
    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 getProductName() instead of PRODUCT_NAME).
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String BUILD_TIMESTAMP
      A timestamp that indicates when this build of the LDAP SDK was generated.
      static java.lang.String FULL_VERSION_STRING
      The full version string for the LDAP SDK.
      static int MAJOR_VERSION
      The major version number for the LDAP SDK.
      static int MINOR_VERSION
      The minor version number for the LDAP SDK.
      static java.lang.String NUMERIC_VERSION_STRING
      The version number string for the LDAP SDK, which contains just the major, minor, and point version, and optional version qualifier.
      static int POINT_VERSION
      The point version number for the LDAP SDK.
      static java.lang.String PRODUCT_NAME
      The official full product name for the LDAP SDK.
      static java.lang.String REPOSITORY_PATH
      The path to the LDAP SDK source code in the repository.
      static java.lang.String REPOSITORY_TYPE
      The type of repository from which the source code used to build the LDAP SDK was retrieved.
      static java.lang.String REPOSITORY_URL
      The URL for the repository from which the source code used to build the LDAP SDK was retrieved.
      static java.lang.String REVISION_ID
      The string representation of the source revision from which this build of the LDAP SDK was generated.
      static long REVISION_NUMBER
      Deprecated.
      Use the REVISION_ID property instead, since it can handle non-numeric revision identifiers.
      static java.lang.String SHORT_NAME
      The short product name for the LDAP SDK.
      static java.lang.String SHORT_VERSION_STRING
      The short version string for the LDAP SDK.
      static java.lang.String VERSION_QUALIFIER
      The version qualifier string for the LDAP SDK.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getBuildTimestamp()
      Retrieves a timestamp that indicates when this build of the LDAP SDK was generated.
      static java.lang.String getFullVersionString()
      Retrieves the full version string for the LDAP SDK.
      static int getMajorVersion()
      Retrieves the major version number for the LDAP SDK.
      static int getMinorVersion()
      Retrieves the minor version number for the LDAP SDK.
      static java.lang.String getNumericVersionString()
      Retrieves the version number string for the LDAP SDK, which contains just the major, minor, and point version, and optional version qualifier.
      static int getPointVersion()
      Retrieves the point version number for the LDAP SDK.
      static java.lang.String getProductName()
      Retrieves the official full product name for the LDAP SDK.
      static java.lang.String getRepositoryPath()
      Retrieves the path to the LDAP SDK source code in the repository.
      static java.lang.String getRepositoryType()
      Retrieves the type of repository from which the source code used to build the LDAP SDK was retrieved.
      static java.lang.String getRepositoryURL()
      Retrieves the URL for the repository from which the source code used to build the LDAP SDK was retrieved.
      static java.lang.String getRevisionID()
      Retrieves the string representation of the source revision from which this build of the LDAP SDK was generated.
      static java.lang.String getShortName()
      Retrieves the short product name for the LDAP SDK.
      static java.lang.String getShortVersionString()
      Retrieves the short version string for the LDAP SDK.
      static java.util.List<java.lang.String> getVersionLines()
      Retrieves a list of lines containing information about the LDAP SDK version.
      static java.lang.String getVersionQualifier()
      Retrieves the version qualifier string for the LDAP SDK.
      static void main​(java.lang.String... args)
      Prints version information from this class to standard output.
      • Methods inherited from class java.lang.Object

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

      • PRODUCT_NAME

        public static final java.lang.String PRODUCT_NAME
        The official full product name for the LDAP SDK. For this build, the value is "UnboundID LDAP SDK for Java".
        See Also:
        Constant Field Values
      • SHORT_NAME

        public static final java.lang.String 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:
        Constant Field Values
      • VERSION_QUALIFIER

        public static final java.lang.String 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:
        Constant Field Values
      • BUILD_TIMESTAMP

        public static final java.lang.String BUILD_TIMESTAMP
        A timestamp that indicates when this build of the LDAP SDK was generated. For this build, the value is "19700112114533Z".
        See Also:
        Constant Field Values
      • REPOSITORY_TYPE

        public static final java.lang.String 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:
        Constant Field Values
      • REPOSITORY_URL

        public static final java.lang.String 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:
        Constant Field Values
      • REPOSITORY_PATH

        public static final java.lang.String 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:
        Constant Field Values
      • REVISION_ID

        public static final java.lang.String 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 "b2272901fd62ad978017ff1aeb049cafc1999b12".
        See Also:
        Constant Field Values
      • REVISION_NUMBER

        @Deprecated
        public static final long REVISION_NUMBER
        Deprecated.
        Use the REVISION_ID property 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:
        Constant Field Values
      • FULL_VERSION_STRING

        public static final java.lang.String FULL_VERSION_STRING
        The full version string for the LDAP SDK. For this build, the value is "UnboundID LDAP SDK for Java 5.0.1".
        See Also:
        Constant Field Values
      • SHORT_VERSION_STRING

        public static final java.lang.String 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-5.0.1".
        See Also:
        Constant Field Values
      • NUMERIC_VERSION_STRING

        public static final java.lang.String 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 "5.0.1".
        See Also:
        Constant Field Values
    • Method Detail

      • main

        public static void main​(java.lang.String... args)
        Prints version information from this class to standard output.
        Parameters:
        args - The command-line arguments provided to this program.
      • getProductName

        public static java.lang.String 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

        public static java.lang.String 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

        public static int getMajorVersion()
        Retrieves the major version number for the LDAP SDK. For this build, the value is 5.
        Returns:
        The major version number for the LDAP SDK.
      • getMinorVersion

        public static int 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

        public static int getPointVersion()
        Retrieves the point version number for the LDAP SDK. For this build, the value is 1.
        Returns:
        The point version number for the LDAP SDK.
      • getVersionQualifier

        public static java.lang.String 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

        public static java.lang.String getBuildTimestamp()
        Retrieves a timestamp that indicates when this build of the LDAP SDK was generated. For this build, the value is "19700112114533Z".
        Returns:
        A timestamp that indicates when this build of the LDAP SDK was generated.
      • getRepositoryType

        public static java.lang.String 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

        public static java.lang.String 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

        public static java.lang.String 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

        public static java.lang.String 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 "b2272901fd62ad978017ff1aeb049cafc1999b12".
        Returns:
        The string representation of the source revision from which this build of the LDAP SDK was generated.
      • getFullVersionString

        public static java.lang.String getFullVersionString()
        Retrieves the full version string for the LDAP SDK. For this build, the value is "UnboundID LDAP SDK for Java 5.0.1".
        Returns:
        The full version string for the LDAP SDK.
      • getShortVersionString

        public static java.lang.String getShortVersionString()
        Retrieves the short version string for the LDAP SDK. This will not have any spaces. For this build, the value is "unboundid-ldapsdk-5.0.1".
        Returns:
        The short version string for the LDAP SDK.
      • getNumericVersionString

        public static java.lang.String 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 "5.0.1".
        Returns:
        The version number string for the LDAP SDK.
      • getVersionLines

        public static java.util.List<java.lang.String> 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.