diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/PerformComputationDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/PerformComputationDialog.java index 67129aab13dbd5821bd7fdd6884fb4eee6e5664b..50a1491dedcab14b481b3295b7335c93605e34d9 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/PerformComputationDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/PerformComputationDialog.java @@ -39,7 +39,6 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget. import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.DialogWithOnlineHelpUtils; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.AbstractExternalData; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetType; -import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataStore; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DatastoreServiceDescription; class PerformComputationDialog extends AbstractDataConfirmationDialog<ComputationData> @@ -57,9 +56,6 @@ class PerformComputationDialog extends AbstractDataConfirmationDialog<Computatio private List<String> selectedDataSetTypeCodes; - // not null only if all selected datasets come from the same datastore - private final DataStore dataStoreOrNull; - private final SelectedOrAllDataSetsRadioProvider radioProvider; private final DatastoreServiceDescription pluginTask; @@ -74,7 +70,6 @@ class PerformComputationDialog extends AbstractDataConfirmationDialog<Computatio this.pluginTask = data.getService(); this.radioProvider = new SelectedOrAllDataSetsRadioProvider(data); - this.dataStoreOrNull = tryGetSingleDatastore(data); setWidth(DIALOG_WIDTH); DialogWithOnlineHelpUtils.addHelpButton(viewContext, this, createHelpPageIdentifier()); @@ -166,7 +161,7 @@ class PerformComputationDialog extends AbstractDataConfirmationDialog<Computatio formPanel.setLabelWidth(LABEL_WIDTH); formPanel.setFieldWidth(FIELD_WIDTH); - if (data.getSelectedDataSets().size() > 0 && isSingleDatastore()) + if (data.getSelectedDataSets().size() > 0) { formPanel.add(createComputationDataSetsRadio()); selectedDataSetTypesText = formPanel.addText(createSelectedDataSetTypeText()); @@ -214,35 +209,6 @@ class PerformComputationDialog extends AbstractDataConfirmationDialog<Computatio selectedDataSetTypesText.setVisible(showSelectedDataSetTypes); } - private boolean isSingleDatastore() - { - return dataStoreOrNull != null; - } - - private static DataStore tryGetSingleDatastore(ComputationData data) - { - return tryGetSingleDatastore(data.getSelectedDataSets()); - } - - // if all datasets come from one datastore, that datastore is returned. Otherwise returns - // null. - private static DataStore tryGetSingleDatastore(List<AbstractExternalData> datasets) - { - if (datasets.size() == 0) - { - return null; - } - DataStore store = datasets.get(0).getDataStore(); - for (AbstractExternalData dataset : datasets) - { - if (store.equals(dataset.getDataStore()) == false) - { - return null; - } - } - return store; - } - private HelpPageIdentifier createHelpPageIdentifier() { return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.PERFORM_COMPUTATION,