java.lang.Object
de.hybris.platform.integrationservices.util.featuretoggle.FeatureToggler

public class FeatureToggler extends Object
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 Details

    • 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