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 TypeMethodDescriptionbooleanisDisabled(Feature feature) booleanisDisabled(Feature feature, boolean defaultValue) booleanbooleanvoidrequireEnabled(Feature feature) Ensures thatFeatureis enabled.voidrequireEnabled(Feature feature, boolean defaultValue) Ensures thatFeatureis enabled.
-
Method Details
-
isDisabled
- Parameters:
feature- the feature to check- Returns:
trueif 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:
trueif the feature is disabled,defaultValueif no property has been defined for the feature, otherwisefalse.- Since:
- 8.13
-
isEnabled
- Parameters:
feature- the feature to check- Returns:
trueif 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:
trueif the feature is enabled,defaultValueif no property has been defined for the feature, otherwisefalse.
-
requireEnabled
Ensures thatFeatureis enabled.If there is no property for the
Featurethen it is assumed to be disabled.- Parameters:
feature- theFeatureto check- Throws:
FeatureDisabledException- in case ifFeatureis disabled- Since:
- 6.5
-
requireEnabled
Ensures thatFeatureis enabled.If there is no property for the
Featurethen thedefaultValuewill be used for whether the feature is enabled.- Parameters:
feature- theFeatureto checkdefaultValue- whether the feature is enabled if no property has been defined for the feature- Throws:
FeatureDisabledException- in case ifFeatureis disabled- Since:
- 6.5
-