Package com.atlassian.bitbucket.server
Interface FeatureManager
public interface FeatureManager
Provides access to
bitbucket.properties
flags for enabling/disabling various features
.- Since:
- 4.1
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isDisabled
(Feature feature) boolean
isDisabled
(Feature feature, boolean defaultValue) boolean
boolean
void
requireEnabled
(Feature feature) Ensures thatFeature
is enabled.void
requireEnabled
(Feature feature, boolean defaultValue) Ensures thatFeature
is enabled.
-
Method Details
-
isDisabled
- Parameters:
feature
- the feature to check- Returns:
true
if the feature is disabled, otherwisefalse
- Since:
- 8.13
-
isDisabled
- Parameters:
feature
- the feature to checkdefaultValue
- the value to return if no property has been defined for the feature- Returns:
true
if the feature is disabled,defaultValue
if no property has been defined for the feature, otherwisefalse
.- Since:
- 8.13
-
isEnabled
- Parameters:
feature
- the feature to check- Returns:
true
if the feature is enabled, otherwisefalse
-
isEnabled
- Parameters:
feature
- the feature to checkdefaultValue
- the value to return if no property has been defined for the feature- Returns:
true
if the feature is enabled,defaultValue
if no property has been defined for the feature, otherwisefalse
.
-
requireEnabled
Ensures thatFeature
is enabled.If there is no property for the
Feature
then it is assumed to be disabled.- Parameters:
feature
- theFeature
to check- Throws:
FeatureDisabledException
- in case ifFeature
is disabled- Since:
- 6.5
-
requireEnabled
Ensures thatFeature
is enabled.If there is no property for the
Feature
then thedefaultValue
will be used for whether the feature is enabled.- Parameters:
feature
- theFeature
to checkdefaultValue
- whether the feature is enabled if no property has been defined for the feature- Throws:
FeatureDisabledException
- in case ifFeature
is disabled- Since:
- 6.5
-