From f232e2f931b79f4087f3758cb772a80fccfb19a3 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Thu, 09 Nov 2006 16:14:46 +0000
Subject: [PATCH] Add a simple method to the DirectoryServer class that may be used to get a compact server version string, matching the one used for the top-level directory included in the OpenDS zip file, as well as in the name of that ZIP file.

---
 opends/src/server/org/opends/server/core/DirectoryServer.java |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/core/DirectoryServer.java b/opends/src/server/org/opends/server/core/DirectoryServer.java
index caf5bb0..c0ca1dc 100644
--- a/opends/src/server/org/opends/server/core/DirectoryServer.java
+++ b/opends/src/server/org/opends/server/core/DirectoryServer.java
@@ -7118,6 +7118,29 @@
 
 
   /**
+   * Retrieves a compact version string for the Directory Server, which may be
+   * used in elements like path names.
+   *
+   * @return  A compact version string for the Directory Server.
+   */
+  public static String getCompactVersionString()
+  {
+    StringBuilder buffer = new StringBuilder();
+    buffer.append(SHORT_NAME);
+    buffer.append("-");
+    buffer.append(MAJOR_VERSION);
+    buffer.append(".");
+    buffer.append(MINOR_VERSION);
+    if ((VERSION_QUALIFIER != null) && (VERSION_QUALIFIER.length() > 0))
+    {
+      buffer.append(VERSION_QUALIFIER);
+    }
+    return buffer.toString();
+  }
+
+
+
+  /**
    * Retrieves the full version string for the Directory Server.
    *
    * @return  The full version string for the Directory Server.

--
Gitblit v1.10.0