Interface Feature
-
- All Known Implementing Classes:
IntegrationApiFeature,OutboundSyncFeature
public interface FeatureRepresents 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 filemy.feature.enabled=true
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voiddisable()Turns off the featuredefault voidenable()Turns on the featurejava.lang.StringgetProperty()Gets the property related to the feature enumdefault booleanisEnabled()Indicates whether the feature is enabled
-
-
-
Method Detail
-
getProperty
java.lang.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:
trueif the feature is enabled, else false
-
enable
default void enable()
Turns on the feature
-
disable
default void disable()
Turns off the feature
-
-