Class FeatureToggler
- java.lang.Object
-
- de.hybris.platform.integrationservices.util.featuretoggle.FeatureToggler
-
public class FeatureToggler extends java.lang.ObjectFeatureToggler enables developers to toggle on/off features in their code. Developers need to create an enumeration that extends fromFeature, define the feature name in a properties file, and set it to true or false. For examplemy.feature=true. Developers can toggle feature dynamically by looking up the property in the HAC -> Platform -> Configuration.- See Also:
IntegrationApiFeature
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddisable(Feature feature)Turns off the featurestatic voidenable(Feature feature)Turns on the featurestatic booleanisFeatureEnabled(Feature feature)Indicates whether a feature is on (true) or off (false).
-
-
-
Method Detail
-
isFeatureEnabled
public static boolean isFeatureEnabled(Feature feature)
Indicates whether a feature is on (true) or off (false).- Parameters:
feature- The feature to query- Returns:
- True if feature is enabled, else false
-
enable
public static void enable(Feature feature)
Turns on the feature- Parameters:
feature- Feature to turn on
-
disable
public static void disable(Feature feature)
Turns off the feature- Parameters:
feature- Feature to turn off
-
-