public interface FeatureManager
bitbucket.properties flags for enabling/disabling various features.| Modifier and Type | Method and Description |
|---|---|
boolean |
isAvailable(Feature feature)
Deprecated.
in 8.15 for removal in 9.0, without replacement
|
boolean |
isDisabled(Feature feature) |
boolean |
isDisabled(Feature feature,
boolean defaultValue) |
boolean |
isEnabled(Feature feature) |
boolean |
isEnabled(Feature feature,
boolean defaultValue) |
void |
requireEnabled(Feature feature)
Ensures that
Feature is enabled. |
void |
requireEnabled(Feature feature,
boolean defaultValue)
Ensures that
Feature is enabled. |
@Deprecated boolean isAvailable(@Nonnull Feature feature)
feature - the feature to checktrue if the feature is available for the current license type, otherwise falseboolean isDisabled(@Nonnull Feature feature)
feature - the feature to checktrue if the feature is disabled, otherwise falseboolean isDisabled(@Nonnull Feature feature, boolean defaultValue)
feature - the feature to checkdefaultValue - the value to return if no property has been defined for the featuretrue if the feature is disabled, defaultValue if no property has been defined for the
feature, otherwise false.boolean isEnabled(@Nonnull Feature feature)
feature - the feature to checktrue if the feature is enabled, otherwise falseboolean isEnabled(@Nonnull Feature feature, boolean defaultValue)
feature - the feature to checkdefaultValue - the value to return if no property has been defined for the featuretrue if the feature is enabled, defaultValue if no property has been defined for the
feature, otherwise false.void requireEnabled(@Nonnull Feature feature)
Feature is enabled.
If there is no property for the Feature then it is assumed to be disabled.
feature - the Feature to checkFeatureDisabledException - in case if Feature is disabledvoid requireEnabled(@Nonnull Feature feature, boolean defaultValue)
Feature is enabled.
If there is no property for the Feature then the defaultValue will be used for whether the
feature is enabled.
feature - the Feature to checkdefaultValue - whether the feature is enabled if no property has been defined for the featureFeatureDisabledException - in case if Feature is disabledCopyright © 2023 Atlassian. All rights reserved.