From 8b8a3d734b31e5103ac5a331110f6d416bea7f70 Mon Sep 17 00:00:00 2001
From: kaloyane <kaloyane>
Date: Mon, 7 Mar 2011 12:52:54 +0000
Subject: [PATCH] [LMS-2119] HierarchicalStorageUpdater : Make the link source
 configurable

SVN: 20230
---
 datastore_server/dist/etc/service.properties              | 8 ++++++++
 .../etlserver/plugins/HierarchicalStorageUpdater.java     | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/datastore_server/dist/etc/service.properties b/datastore_server/dist/etc/service.properties
index 4002482f02c..649d89a5826 100644
--- a/datastore_server/dist/etc/service.properties
+++ b/datastore_server/dist/etc/service.properties
@@ -247,6 +247,14 @@ main-thread.incoming-data-completeness-condition = marker-file
 #   dataSet, dataSetType, experiment, instance, project, sample, space
 # will be recognized and replaced in the final link name.
 #hierarchy-builder.link-naming-strategy.template = ${space}/${project}/${experiment}/${datasettype}+${sample}+${dataset}
+# When specified for a given <dataset-type> this store subpath will be used as the symbolic source 
+#hierarchical-storage-updater.link-source-subpath.<dataset-type> = original
+# Setting this property to "true" for a given <dataset-type> will treat the first child item (file or folder) 
+# in the specified location as the symbolic link source. It can be used in conjunction with 
+# the "link-source-subpath.<dataset-type>" to produce links pointing to a folder with unknown name e.g.
+# <data-set-location>/original/UNKNOWN-NAME-20100307-1350
+#hierarchical-storage-updater.link-from-first-child.<dataset-type> = true
+
 
 # ---------------- Plugin properties
 # The extractor class to use for code extraction
diff --git a/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/HierarchicalStorageUpdater.java b/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/HierarchicalStorageUpdater.java
index 677346da929..d4d2b54d185 100644
--- a/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/HierarchicalStorageUpdater.java
+++ b/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/HierarchicalStorageUpdater.java
@@ -55,7 +55,7 @@ public class HierarchicalStorageUpdater implements IDataStoreLockingMaintenanceT
 
     public static final String HIERARCHY_LINK_NAMING_STRATEGY = "link-naming-strategy";
 
-    public static final String LINK_SOURCE_SUBFOLDER = "link-source-subfolder";
+    public static final String LINK_SOURCE_SUBFOLDER = "link-source-subpath";
 
     public static final String LINK_FROM_FIRST_CHILD = "link-from-first-child";
 
-- 
GitLab