From a8c9d11e133e3eb5a83b9940883588cadbd9c8b2 Mon Sep 17 00:00:00 2001 From: gakin <gakin> Date: Tue, 16 May 2017 08:36:08 +0000 Subject: [PATCH] SSDM-5025 : Refactoring SVN: 38190 --- .../synchronizer/EntitySynchronizer.java | 70 ++---------- .../synchronizer/ResourceListParserData.java | 4 +- .../AttachmentSynchronizationSummary.java | 12 +- ...AttachmentSynchronizationTaskExecutor.java | 5 +- .../DataSetRegistrationIngestionService.java | 4 +- .../DataSetRegistrationTaskExecutor.java | 106 ++++++++++++++++++ .../DataSetSynchronizationSummary.java | 10 +- .../{ => util}/DSPropertyUtils.java | 6 +- .../synchronizer/{ => util}/V3Utils.java | 2 +- 9 files changed, 137 insertions(+), 82 deletions(-) rename datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/{ => parallelizedExecutor}/AttachmentSynchronizationSummary.java (67%) rename datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/{ => parallelizedExecutor}/AttachmentSynchronizationTaskExecutor.java (98%) rename datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/{ => parallelizedExecutor}/DataSetRegistrationIngestionService.java (97%) create mode 100644 datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/DataSetRegistrationTaskExecutor.java rename datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/{ => parallelizedExecutor}/DataSetSynchronizationSummary.java (71%) rename datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/{ => util}/DSPropertyUtils.java (89%) rename datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/{ => util}/V3Utils.java (99%) diff --git a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/EntitySynchronizer.java b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/EntitySynchronizer.java index 76c95d810df..cf24d9d6552 100644 --- a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/EntitySynchronizer.java +++ b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/EntitySynchronizer.java @@ -31,7 +31,6 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Properties; import java.util.Set; import org.apache.commons.codec.binary.Hex; @@ -76,12 +75,16 @@ import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronize import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.ResourceListParserData.MaterialWithLastModificationDate; import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.datasourceconnector.DataSourceConnector; import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.datasourceconnector.IDataSourceConnector; +import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.parallelizedExecutor.AttachmentSynchronizationSummary; +import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.parallelizedExecutor.AttachmentSynchronizationTaskExecutor; +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.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.util.DSPropertyUtils; +import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.util.V3Utils; import ch.systemsx.cisd.cifex.shared.basic.UserFailureException; -import ch.systemsx.cisd.common.concurrent.ITaskExecutor; import ch.systemsx.cisd.common.concurrent.ParallelizedExecutor; -import ch.systemsx.cisd.common.exceptions.Status; import ch.systemsx.cisd.common.filesystem.FileUtilities; import ch.systemsx.cisd.common.logging.Log4jSimpleLogger; import ch.systemsx.cisd.etlserver.registrator.api.v1.impl.ConversionUtils; @@ -114,8 +117,6 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Project; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.PropertyType; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Space; -import ch.systemsx.cisd.openbis.generic.shared.basic.dto.TableModel; -import ch.systemsx.cisd.openbis.generic.shared.basic.dto.TableModelColumnHeader; import ch.systemsx.cisd.openbis.generic.shared.dto.AtomicEntityOperationDetails; import ch.systemsx.cisd.openbis.generic.shared.dto.AtomicEntityOperationResult; import ch.systemsx.cisd.openbis.generic.shared.dto.DataSetBatchUpdatesDTO; @@ -633,7 +634,8 @@ public class EntitySynchronizer // and the dependencies are established later on in the sync process. ParallelizedExecutionPreferences preferences = config.getParallelizedExecutionPrefs(); - ParallelizedExecutor.process(dsList, new DataSetRegistrationTaskExecutor(dataSetSynchronizationSummary), + ParallelizedExecutor.process(dsList, new DataSetRegistrationTaskExecutor(dataSetSynchronizationSummary, operationLog, storeRoot, context, + config), preferences.getMachineLoad(), preferences.getMaxThreads(), "register data sets", preferences.getRetriesOnFail(), preferences.isStopOnFailure()); @@ -1324,62 +1326,6 @@ public class EntitySynchronizer return null; } - private final class DataSetRegistrationTaskExecutor implements ITaskExecutor<IncomingDataSet> - { - private DataSetSynchronizationSummary dsRegistrationSummary; - - public DataSetRegistrationTaskExecutor(DataSetSynchronizationSummary dsRegSummary) - { - this.dsRegistrationSummary = dsRegSummary; - } - - @Override - public Status execute(IncomingDataSet dataSet) - { - Properties props = setProperties(); - - DataSetRegistrationIngestionService ingestionService = - new DataSetRegistrationIngestionService(props, storeRoot, dataSet.getDataSet(), operationLog); - TableModel resultTable = ingestionService.createAggregationReport(new HashMap<String, Object>(), context); - if (resultTable != null) - { - List<TableModelColumnHeader> headers = resultTable.getHeader(); - String[] stringArray = new String[headers.size()]; - for (int i = 0; i < stringArray.length; i++) - { - if (headers.get(i).getTitle().startsWith("Error")) - { - String message = resultTable.getRows().get(0).getValues().toString(); - dsRegistrationSummary.notRegisteredDataSetCodes.add(dataSet.getDataSet().getCode()); - operationLog.error(message); - return Status.createError(message); - } - else if (headers.get(i).getTitle().startsWith("Added")) - { - dsRegistrationSummary.addedDsCount.getAndIncrement(); - } - else if (headers.get(i).getTitle().startsWith("Updated")) - { - dsRegistrationSummary.updatedDsCount.getAndIncrement(); - } - } - } - return Status.OK; - } - - private Properties setProperties() - { - Properties props = new Properties(); - props.setProperty("user", EntitySynchronizer.this.config.getUser()); - props.setProperty("pass", EntitySynchronizer.this.config.getPassword()); - props.setProperty("as-url", EntitySynchronizer.this.config.getDataSourceOpenbisURL()); - props.setProperty("dss-url", EntitySynchronizer.this.config.getDataSourceDSSURL()); - props.setProperty("harvester-temp-dir", EntitySynchronizer.this.config.getHarvesterTempDir()); - props.setProperty("do-not-create-original-dir", "true"); - return props; - } - } - private boolean deepCompareDataSets(String dataSetCode) throws NoSuchAlgorithmException, UnsupportedEncodingException { diff --git a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/ResourceListParserData.java b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/ResourceListParserData.java index b7a1220c21c..8097f7d3990 100644 --- a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/ResourceListParserData.java +++ b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/ResourceListParserData.java @@ -189,7 +189,7 @@ public class ResourceListParserData return dsMap; } - class IncomingEntity<T extends Identifier<T>> + public class IncomingEntity<T extends Identifier<T>> { private final Identifier<T> entity; @@ -298,7 +298,7 @@ public class ResourceListParserData } } - class IncomingDataSet implements Serializable + public class IncomingDataSet implements Serializable { private static final long serialVersionUID = 1L; private final NewExternalData dataSet; diff --git a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/AttachmentSynchronizationSummary.java b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/AttachmentSynchronizationSummary.java similarity index 67% rename from datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/AttachmentSynchronizationSummary.java rename to datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/AttachmentSynchronizationSummary.java index d30f01df7a2..c93089185d5 100644 --- a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/AttachmentSynchronizationSummary.java +++ b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/AttachmentSynchronizationSummary.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer; +package ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.parallelizedExecutor; import java.util.ArrayList; import java.util.Collections; @@ -26,13 +26,13 @@ import java.util.concurrent.atomic.AtomicInteger; * * @author Ganime Betul Akin */ -class AttachmentSynchronizationSummary +public class AttachmentSynchronizationSummary { - final List<String> notRegisteredAttachmentHolderCodes = Collections.synchronizedList(new ArrayList<String>()); + public final List<String> notRegisteredAttachmentHolderCodes = Collections.synchronizedList(new ArrayList<String>()); - final AtomicInteger addedCount = new AtomicInteger(0); + public final AtomicInteger addedCount = new AtomicInteger(0); - final AtomicInteger updatedCount = new AtomicInteger(0); + public final AtomicInteger updatedCount = new AtomicInteger(0); - final AtomicInteger deletedCount = new AtomicInteger(0); + public final AtomicInteger deletedCount = new AtomicInteger(0); } diff --git a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/AttachmentSynchronizationTaskExecutor.java b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/AttachmentSynchronizationTaskExecutor.java similarity index 98% rename from datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/AttachmentSynchronizationTaskExecutor.java rename to datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/AttachmentSynchronizationTaskExecutor.java index 323f6627be8..24735667cc3 100644 --- a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/AttachmentSynchronizationTaskExecutor.java +++ b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/AttachmentSynchronizationTaskExecutor.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer; +package ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.parallelizedExecutor; import java.util.ArrayDeque; import java.util.ArrayList; @@ -33,6 +33,7 @@ import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.common.ServiceFinderU import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.common.SyncEntityKind; import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.config.SyncConfig; import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.ResourceListParserData.IncomingEntity; +import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.util.V3Utils; import ch.systemsx.cisd.cifex.shared.basic.UserFailureException; import ch.systemsx.cisd.common.concurrent.ITaskExecutor; import ch.systemsx.cisd.common.exceptions.Status; @@ -53,7 +54,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.ProjectIdentifierF * * @author Ganime Betul Akin */ -final class AttachmentSynchronizationTaskExecutor implements ITaskExecutor<IncomingEntity<?>> +public final class AttachmentSynchronizationTaskExecutor implements ITaskExecutor<IncomingEntity<?>> { private final Date lastSyncTimestamp; diff --git a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/DataSetRegistrationIngestionService.java b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/DataSetRegistrationIngestionService.java similarity index 97% rename from datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/DataSetRegistrationIngestionService.java rename to datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/DataSetRegistrationIngestionService.java index d0e73beb849..bd75844598f 100644 --- a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/DataSetRegistrationIngestionService.java +++ b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/DataSetRegistrationIngestionService.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer; +package ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.parallelizedExecutor; import java.io.File; import java.io.InputStream; @@ -39,6 +39,8 @@ import ch.ethz.sis.openbis.generic.dssapi.v3.dto.datasetfile.download.DataSetFil import ch.ethz.sis.openbis.generic.dssapi.v3.dto.datasetfile.fetchoptions.DataSetFileFetchOptions; import ch.ethz.sis.openbis.generic.dssapi.v3.dto.datasetfile.id.DataSetFilePermId; import ch.ethz.sis.openbis.generic.dssapi.v3.dto.datasetfile.id.IDataSetFileId; +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.V3Utils; import ch.systemsx.cisd.common.io.IOUtilities; import ch.systemsx.cisd.etlserver.registrator.api.v2.IDataSet; import ch.systemsx.cisd.etlserver.registrator.api.v2.IDataSetRegistrationTransactionV2; diff --git a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/DataSetRegistrationTaskExecutor.java b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/DataSetRegistrationTaskExecutor.java new file mode 100644 index 00000000000..921ca0a3de9 --- /dev/null +++ b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/DataSetRegistrationTaskExecutor.java @@ -0,0 +1,106 @@ +/* + * Copyright 2017 ETH Zuerich, SIS + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.parallelizedExecutor; + +import java.io.File; +import java.util.HashMap; +import java.util.List; +import java.util.Properties; + +import org.apache.log4j.Logger; + +import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.config.SyncConfig; +import ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.ResourceListParserData.IncomingDataSet; +import ch.systemsx.cisd.common.concurrent.ITaskExecutor; +import ch.systemsx.cisd.common.exceptions.Status; +import ch.systemsx.cisd.openbis.dss.generic.shared.DataSetProcessingContext; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.TableModel; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.TableModelColumnHeader; + +/** + * + * + * @author Ganime Betul Akin + */ +public final class DataSetRegistrationTaskExecutor implements ITaskExecutor<IncomingDataSet> +{ + private final File storeRoot; + + private final DataSetProcessingContext context; + + private final Logger operationLog; + + private DataSetSynchronizationSummary dsRegistrationSummary; + + private final SyncConfig config; + + public DataSetRegistrationTaskExecutor(DataSetSynchronizationSummary dsRegSummary, Logger operationLog, File storeRoot, + DataSetProcessingContext context, SyncConfig config) + { + this.dsRegistrationSummary = dsRegSummary; + this.operationLog = operationLog; + this.storeRoot = storeRoot; + this.context = context; + this.config = config; + } + + @Override + public Status execute(IncomingDataSet dataSet) + { + Properties props = setProperties(); + + DataSetRegistrationIngestionService ingestionService = + new DataSetRegistrationIngestionService(props, storeRoot, dataSet.getDataSet(), operationLog); + TableModel resultTable = ingestionService.createAggregationReport(new HashMap<String, Object>(), context); + if (resultTable != null) + { + List<TableModelColumnHeader> headers = resultTable.getHeader(); + String[] stringArray = new String[headers.size()]; + for (int i = 0; i < stringArray.length; i++) + { + if (headers.get(i).getTitle().startsWith("Error")) + { + String message = resultTable.getRows().get(0).getValues().toString(); + dsRegistrationSummary.notRegisteredDataSetCodes.add(dataSet.getDataSet().getCode()); + operationLog.error(message); + return Status.createError(message); + } + else if (headers.get(i).getTitle().startsWith("Added")) + { + dsRegistrationSummary.addedDsCount.getAndIncrement(); + } + else if (headers.get(i).getTitle().startsWith("Updated")) + { + dsRegistrationSummary.updatedDsCount.getAndIncrement(); + } + } + } + return Status.OK; + } + + private Properties setProperties() + { + Properties props = new Properties(); + props.setProperty("user", config.getUser()); + props.setProperty("pass", config.getPassword()); + props.setProperty("as-url", config.getDataSourceOpenbisURL()); + props.setProperty("dss-url", config.getDataSourceDSSURL()); + props.setProperty("harvester-temp-dir", config.getHarvesterTempDir()); + props.setProperty("do-not-create-original-dir", "true"); + return props; + } +} diff --git a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/DataSetSynchronizationSummary.java b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/DataSetSynchronizationSummary.java similarity index 71% rename from datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/DataSetSynchronizationSummary.java rename to datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/DataSetSynchronizationSummary.java index b0a2c66e0ea..67544bac4d4 100644 --- a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/DataSetSynchronizationSummary.java +++ b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/DataSetSynchronizationSummary.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer; +package ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.parallelizedExecutor; import java.util.ArrayList; import java.util.Collections; @@ -26,11 +26,11 @@ import java.util.concurrent.atomic.AtomicInteger; * * @author Ganime Betul Akin */ -class DataSetSynchronizationSummary +public class DataSetSynchronizationSummary { - final List<String> notRegisteredDataSetCodes = Collections.synchronizedList(new ArrayList<String>()); + public final List<String> notRegisteredDataSetCodes = Collections.synchronizedList(new ArrayList<String>()); - final AtomicInteger addedDsCount = new AtomicInteger(0); + public final AtomicInteger addedDsCount = new AtomicInteger(0); - final AtomicInteger updatedDsCount = new AtomicInteger(0); + public final AtomicInteger updatedDsCount = new AtomicInteger(0); } diff --git a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/DSPropertyUtils.java b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/util/DSPropertyUtils.java similarity index 89% rename from datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/DSPropertyUtils.java rename to datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/util/DSPropertyUtils.java index e2721b73d57..6093c10f917 100644 --- a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/DSPropertyUtils.java +++ b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/util/DSPropertyUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer; +package ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.util; import java.util.ArrayList; import java.util.HashSet; @@ -32,7 +32,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.NewProperty; */ public class DSPropertyUtils { - static Set<String> extractPropertyNames(List<NewProperty> dataSetProperties) + public static Set<String> extractPropertyNames(List<NewProperty> dataSetProperties) { Set<String> existingPropertyNames = new HashSet<String>(); for (NewProperty prop : dataSetProperties) @@ -42,7 +42,7 @@ public class DSPropertyUtils return existingPropertyNames; } - static IEntityProperty[] convertToEntityProperty(List<NewProperty> dataSetProperties) + public static IEntityProperty[] convertToEntityProperty(List<NewProperty> dataSetProperties) { ArrayList<IEntityProperty> list = new ArrayList<IEntityProperty>(); for (NewProperty prop : dataSetProperties) diff --git a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/V3Utils.java b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/util/V3Utils.java similarity index 99% rename from datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/V3Utils.java rename to datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/util/V3Utils.java index 8e75f7d9cd7..a8f5d4e012e 100644 --- a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/V3Utils.java +++ b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/util/V3Utils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer; +package ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.util; import java.io.InputStream; import java.util.Arrays; -- GitLab