Skip to content
Snippets Groups Projects
Commit ab64e76c authored by felmer's avatar felmer
Browse files

SSDM-7158: Respecting config flag translate-using-data-source-alias correctly

parent 1a2e839d
No related branches found
No related tags found
No related merge requests found
...@@ -141,7 +141,7 @@ public class SynchronizationConfigReader ...@@ -141,7 +141,7 @@ public class SynchronizationConfigReader
} }
config.setHarvesterTempDir(reader.getString(section, HARVESTER_TEMP_DIR_PROPERTY_NAME, DEFAULT_HARVESTER_TEMP_DIR, false)); config.setHarvesterTempDir(reader.getString(section, HARVESTER_TEMP_DIR_PROPERTY_NAME, DEFAULT_HARVESTER_TEMP_DIR, false));
config.setTranslateUsingDataSourceAlias(reader.getBoolean(section, TRANSLATE_USING_DATA_SOURCE_ALIAS_PROPERTY_NAME, false)); config.setTranslateUsingDataSourceAlias(reader.getBoolean(section, TRANSLATE_USING_DATA_SOURCE_ALIAS_PROPERTY_NAME, true));
// read full-sync configuration // read full-sync configuration
boolean fullSync = reader.getBoolean(section, FULL_SYNC_PROPERTY_NAME, false); boolean fullSync = reader.getBoolean(section, FULL_SYNC_PROPERTY_NAME, false);
......
...@@ -85,6 +85,7 @@ import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronize ...@@ -85,6 +85,7 @@ import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronize
import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.parallelizedExecutor.AttachmentsSynchronizer; import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.parallelizedExecutor.AttachmentsSynchronizer;
import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.parallelizedExecutor.DataSetRegistrationTaskExecutor; import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.parallelizedExecutor.DataSetRegistrationTaskExecutor;
import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.parallelizedExecutor.DataSetSynchronizationSummary; import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.parallelizedExecutor.DataSetSynchronizationSummary;
import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.translator.DefaultNameTranslator;
import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.translator.INameTranslator; import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.translator.INameTranslator;
import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.translator.PrefixBasedNameTranslator; import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.translator.PrefixBasedNameTranslator;
import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.util.DSPropertyUtils; import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.util.DSPropertyUtils;
...@@ -592,7 +593,11 @@ public class EntitySynchronizer ...@@ -592,7 +593,11 @@ public class EntitySynchronizer
// Parse the resource list: This sends back all projects, // Parse the resource list: This sends back all projects,
// experiments, samples and data sets contained in the XML together with their last modification date to be used for filtering // experiments, samples and data sets contained in the XML together with their last modification date to be used for filtering
operationLog.info("Parsing the resource list xml document..."); operationLog.info("Parsing the resource list xml document...");
INameTranslator nameTranslator = new PrefixBasedNameTranslator(config.getDataSourceAlias()); INameTranslator nameTranslator = new DefaultNameTranslator();
if (config.isTranslateUsingDataSourceAlias())
{
nameTranslator = new PrefixBasedNameTranslator(config.getDataSourceAlias());
}
ResourceListParser parser = ResourceListParser.create(nameTranslator, dataStoreCode); ResourceListParser parser = ResourceListParser.create(nameTranslator, dataStoreCode);
ResourceListParserData data = parser.parseResourceListDocument(doc, monitor); ResourceListParserData data = parser.parseResourceListDocument(doc, monitor);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment