manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1787743 - /manifoldcf/branches/CONNECTORS-1196-2/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java
Date Mon, 20 Mar 2017 12:29:11 GMT
Author: kwright
Date: Mon Mar 20 12:29:10 2017
New Revision: 1787743

URL: http://svn.apache.org/viewvc?rev=1787743&view=rev
Log:
Hook up a version property for the UI

Modified:
    manifoldcf/branches/CONNECTORS-1196-2/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java

Modified: manifoldcf/branches/CONNECTORS-1196-2/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1196-2/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java?rev=1787743&r1=1787742&r2=1787743&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1196-2/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java
(original)
+++ manifoldcf/branches/CONNECTORS-1196-2/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java
Mon Mar 20 12:29:10 2017
@@ -106,6 +106,7 @@ public class ManifoldCF
   protected static Integer initializeFlagLock = new Integer(0);
 
   // Local member variables
+  protected static String mcfVersion = null;
   protected static String masterDatabaseName = null;
   protected static String masterDatabaseUsername = null;
   protected static String masterDatabasePassword = null;
@@ -120,6 +121,10 @@ public class ManifoldCF
 
   // System property/config file property names
   
+  // Version property
+  /** The current ManifoldCF version string */
+  public static final String versionProperty = "org.apache.manifoldcf.versionstring";
+  
   // Process ID property
   /** Process ID - cannot exceed 16 characters */
   public static final String processIDProperty = "org.apache.manifoldcf.processid";
@@ -189,6 +194,7 @@ public class ManifoldCF
         // Clean up the system doing the same thing the shutdown thread would have if the
process was killed
         cleanUpEnvironment(threadContext);
         processID = null;
+        mcfVersion = null;
         masterDatabaseName = null;
         masterDatabaseUsername = null;
         masterDatabasePassword = null;
@@ -279,6 +285,7 @@ public class ManifoldCF
           Logging.initializeLoggers();
           Logging.setLogLevels(threadContext);
 
+          mcfVersion = LockManagerFactory.getStringProperty(threadContext,versionProperty,"unknown
version");
           masterDatabaseName = LockManagerFactory.getStringProperty(threadContext,masterDatabaseNameProperty,"dbname");
           masterDatabaseUsername = LockManagerFactory.getStringProperty(threadContext,masterDatabaseUsernameProperty,"manifoldcf");
           masterDatabasePassword = LockManagerFactory.getPossiblyObfuscatedStringProperty(threadContext,masterDatabasePasswordProperty,"local_pg_passwd");
@@ -586,6 +593,14 @@ public class ManifoldCF
     return rval.toString();
   }
 
+  /** Get the mcf version.
+  *@return the version string
+  */
+  public static String getMcfVersion()
+  {
+    return mcfVersion;
+  }
+  
   /** Get the master database name.
   *@return the master database name
   */



Mime
View raw message