diff options
Diffstat (limited to 'common-be/src/main/java')
-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 |