public interface FeatureManager
bitbucket.properties flags for enabling/disabling various features.| Modifier and Type | Method and Description |
|---|---|
boolean |
isAvailable(Feature feature) |
boolean |
isEnabled(Feature feature) |
boolean |
isEnabled(Feature feature,
boolean defaultValue) |
void |
requireEnabled(Feature feature)
Ensures that
Feature is available and enabled. |
void |
requireEnabled(Feature feature,
boolean defaultValue)
Ensures that
Feature is available and enabled. |
boolean isAvailable(@Nonnull Feature feature)
feature - the feature to checktrue if the feature is available for the current license type; otherwise falseboolean isEnabled(@Nonnull Feature feature)
feature - the feature to checktrue if the feature is available and 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 available and enabled, false if the feature is not available or
disabled; otherwise defaultValuevoid requireEnabled(@Nonnull Feature feature)
Feature is available and enabled.
If there is no property for the Feature, assumes it is disabled.feature - the Feature to checkFeatureUnavailableException - in case if Feature is unavailableFeatureDisabledException - in case if Feature is disabledvoid requireEnabled(@Nonnull Feature feature, boolean defaultValue)
Feature is available and enabled.
If there is no property for the Feature, uses supplied default value
as enabled/disabled state of the Featurefeature - the Feature to checkdefaultValue - assume feature enabled/disabled by defaultFeatureUnavailableException - in case if Feature is unavailableFeatureDisabledException - in case if Feature is disabledCopyright © 2019 Atlassian. All rights reserved.