diff options
author | marine <marine.de.dorlodot@intl.att.com> | 2021-06-18 17:51:46 +0200 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2021-07-05 08:45:12 +0000 |
commit | 3453264c35275af52a2fdcde33f6e8347a65d15b (patch) | |
tree | c33f49b95ac80b2240df631f0a354bc221d15030 /common-be/src | |
parent | 14a9a365c5aaaa4a34fe23541dc455134056cbdb (diff) |
External license as "toggleable feature"
Code modification in onboarding BE and onboarding UI so that the External License can be seen as a toggleable feature. By default this will set to true but could be disabled.
Issue-ID: SDC-3618
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Change-Id: I01690c4cb44d3df590987bb340e8fbb58fe960e0
Signed-off-by: marine <marine.de.dorlodot@intl.att.com>
Diffstat (limited to 'common-be/src')
-rw-r--r-- | common-be/src/main/java/org/openecomp/sdc/be/togglz/ToggleableFeature.java | 2 | ||||
-rw-r--r-- | common-be/src/main/java/org/openecomp/sdc/be/togglz/TogglzConfiguration.java | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/togglz/ToggleableFeature.java b/common-be/src/main/java/org/openecomp/sdc/be/togglz/ToggleableFeature.java index bc60eb9be4..7cd5bbdc44 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/togglz/ToggleableFeature.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/togglz/ToggleableFeature.java @@ -25,7 +25,7 @@ import org.togglz.core.annotation.Label; import org.togglz.core.context.FeatureContext; public enum ToggleableFeature implements Feature { - @Label("Default Feature") DEFAULT_FEATURE, @Label("Healing") HEALING; + @Label("Default Feature") DEFAULT_FEATURE, @Label("Healing") HEALING, @Label("External License") EXTERNAL_LICENSE; public static Feature getFeatureByName(String featureName) { return Arrays.stream(values()).filter(e -> e.name().equals(featureName)).findFirst().orElse(null); diff --git a/common-be/src/main/java/org/openecomp/sdc/be/togglz/TogglzConfiguration.java b/common-be/src/main/java/org/openecomp/sdc/be/togglz/TogglzConfiguration.java index 9278b4fb44..9f5b486354 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/togglz/TogglzConfiguration.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/togglz/TogglzConfiguration.java @@ -29,7 +29,10 @@ import org.togglz.core.user.UserProvider; public class TogglzConfiguration implements TogglzConfig { - private static final String TOGGLZ_FILE_LOCATION = "/tmp/features.properties"; + private String togglzFileLocation; + public TogglzConfiguration(){ + this.togglzFileLocation = System.getProperty("features.properties","/tmp/features.properties"); + } @Override public Class<? extends Feature> getFeatureClass() { @@ -38,7 +41,7 @@ public class TogglzConfiguration implements TogglzConfig { @Override public StateRepository getStateRepository() { - return new FileBasedStateRepository(new File(TOGGLZ_FILE_LOCATION)); + return new FileBasedStateRepository(new File(togglzFileLocation)); } @Override |