Class FeatureToggler
java.lang.Object
de.hybris.platform.integrationservices.util.featuretoggle.FeatureToggler
FeatureToggler enables developers to toggle on/off features in their code.
Developers need to create an enumeration that extends from
Feature,
define the feature name in a properties file, and set it to true or false.
For example my.feature=true. Developers can toggle feature dynamically by looking up the property
in the HAC -> Platform -> Configuration.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidTurns off the featurestatic voidTurns on the featurestatic booleanisFeatureDisabled(Feature feature) Indicates whether a feature is off (true) or on (false).static booleanisFeatureEnabled(Feature feature) Indicates whether a feature is on (true) or off (false).
-
Method Details
-
isFeatureEnabled
Indicates whether a feature is on (true) or off (false).- Parameters:
feature- The feature to query- Returns:
- True if feature is enabled, else false
-
isFeatureDisabled
Indicates whether a feature is off (true) or on (false).- Parameters:
feature- The feature to query- Returns:
- True if feature is disabled, else false
-
enable
Turns on the feature- Parameters:
feature- Feature to turn on
-
disable
Turns off the feature- Parameters:
feature- Feature to turn off
-