All Known Implementing Classes:
IntegrationApiFeature, OutboundSyncFeature

public interface Feature
Represents a Feature for feature toggling. The intent of this interface is for enumerations to implement it. In a properties file, also define the property and set to true/false. Here's an example of a Feature implementation: public enum MyFeature implements Feature { MY_FEATURE("my.feature.enabled") private final String property; MyFeature(final String property) { this.property = property; } public String getProperty() { return property; } } In a property file my.feature.enabled=true
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Turns off the feature
    default void
    Turns on the feature
    Gets the property related to the feature enum
    default boolean
    Indicates whether the feature is enabled
  • Method Details

    • getProperty

      String getProperty()
      Gets the property related to the feature enum
      Returns:
      Feature's property name
    • isEnabled

      default boolean isEnabled()
      Indicates whether the feature is enabled
      Returns:
      true if the feature is enabled, else false
    • enable

      default void enable()
      Turns on the feature
    • disable

      default void disable()
      Turns off the feature