From d29bda956d878c23c34c1e9a948ed770bdceacb9 Mon Sep 17 00:00:00 2001 From: Adam Rauch Date: Fri, 5 Jul 2024 12:32:22 -0700 Subject: [PATCH] Generalize experimental features to optional features --- .../trialshare/DelegatingSpecimenRequestCustomizer.java | 6 +++--- .../org/labkey/test/tests/trialshare/ITNSpecimenTest.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/org/labkey/trialshare/DelegatingSpecimenRequestCustomizer.java b/src/org/labkey/trialshare/DelegatingSpecimenRequestCustomizer.java index 8a5e0a48..d72417e7 100644 --- a/src/org/labkey/trialshare/DelegatingSpecimenRequestCustomizer.java +++ b/src/org/labkey/trialshare/DelegatingSpecimenRequestCustomizer.java @@ -3,7 +3,7 @@ import org.labkey.api.data.Container; import org.labkey.api.security.User; import org.labkey.api.settings.AdminConsole; -import org.labkey.api.settings.ExperimentalFeatureService; +import org.labkey.api.settings.OptionalFeatureService; import org.labkey.api.study.SpecimenService; import org.labkey.api.util.HtmlString; @@ -20,12 +20,12 @@ public DelegatingSpecimenRequestCustomizer(SpecimenService.SpecimenRequestCustom { _default = defaultCustomizer; - _active = ExperimentalFeatureService.get().isFeatureEnabled(ITN_SPECIMEN_HANDLING_FEATURE_NAME) ? _itn : _default; + _active = OptionalFeatureService.get().isFeatureEnabled(ITN_SPECIMEN_HANDLING_FEATURE_NAME) ? _itn : _default; AdminConsole.addExperimentalFeatureFlag(ITN_SPECIMEN_HANDLING_FEATURE_NAME, "ITN specimen behavior", "This feature allows empty specimen requests, adds ITN-specific messages, hides some reporting options, and other tweaks", false); - ExperimentalFeatureService.get().addFeatureListener(ITN_SPECIMEN_HANDLING_FEATURE_NAME, (feature, enabled) -> _active = enabled ? _itn : _default); + OptionalFeatureService.get().addFeatureListener(ITN_SPECIMEN_HANDLING_FEATURE_NAME, (feature, enabled) -> _active = enabled ? _itn : _default); } @Override diff --git a/test/src/org/labkey/test/tests/trialshare/ITNSpecimenTest.java b/test/src/org/labkey/test/tests/trialshare/ITNSpecimenTest.java index 27df1745..beef8690 100644 --- a/test/src/org/labkey/test/tests/trialshare/ITNSpecimenTest.java +++ b/test/src/org/labkey/test/tests/trialshare/ITNSpecimenTest.java @@ -18,7 +18,7 @@ import org.labkey.test.pages.study.specimen.ShowCreateSpecimenRequestPage; import org.labkey.test.pages.study.specimen.TypeSummaryReportPage; import org.labkey.test.util.ApiPermissionsHelper; -import org.labkey.test.util.ExperimentalFeaturesHelper; +import org.labkey.test.util.OptionalFeatureHelper; import org.labkey.test.util.LogMethod; import org.labkey.test.util.PermissionsHelper.MemberType; import org.labkey.test.util.TestLogger; @@ -192,7 +192,7 @@ public void testRequestPermissionCustomization() public void enableITNSpecimenHandling(boolean enable) { Connection cn = createDefaultConnection(false); - ExperimentalFeaturesHelper.setExperimentalFeature(cn, ITN_SPECIMEN_HANDLING, enable); + OptionalFeatureHelper.setOptionalFeature(cn, ITN_SPECIMEN_HANDLING, enable); } @Override