diff OrthancServer/Sources/main.cpp @ 4628:5fabef29c4ff db-changes

added new primitive "hasRevisionsSupport" in database SDK, added "CheckRevisions" to URI "/system"
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 20 Apr 2021 15:59:31 +0200
parents 95ffe3b6ef7c
children 66109d24d26e
line wrap: on
line diff
--- a/OrthancServer/Sources/main.cpp	Tue Apr 20 15:11:59 2021 +0200
+++ b/OrthancServer/Sources/main.cpp	Tue Apr 20 15:59:31 2021 +0200
@@ -1489,6 +1489,25 @@
                            ": Please run Orthanc with the \"--upgrade\" argument");
   }
 
+  {
+    static const char* const CHECK_REVISIONS = "CheckRevisions";
+    
+    OrthancConfiguration::ReaderLock lock;
+    if (lock.GetConfiguration().GetBooleanParameter(CHECK_REVISIONS, false))
+    {
+      if (database.HasRevisionsSupport())
+      {
+        LOG(INFO) << "Handling of revisions is enabled, and the custom database back-end *has* "
+                  << "support for revisions of metadata and attachments";
+      }
+      else
+      {
+        LOG(WARNING) << "The custom database back-end has *no* support for revisions of metadata and attachments, "
+                     << "but configuration option \"" << CHECK_REVISIONS << "\" is set to \"true\"";
+      }
+    }
+  }
+
   bool success = ConfigureServerContext
     (database, storageArea, plugins, loadJobsFromDatabase);