com.atlassian.bitbucket.server.FeatureManager |
Class Overview
Provides access to bitbucket.properties
flags for enabling/disabling various features
.
Public Methods
public
boolean
isAvailable
(Feature feature)
Parameters
feature
| the feature to check |
Returns
true
if the feature is available for the current license type; otherwise false
public
boolean
isEnabled
(Feature feature)
Parameters
feature
| the feature to check |
Returns
true
if the feature is available and enabled; otherwise, false
public
boolean
isEnabled
(Feature feature, boolean defaultValue)
Parameters
feature
| the feature to check |
defaultValue
| the value to return if no property has been defined for the feature |
Returns
true
if the feature is available and enabled, false
if the feature is not available or
disabled; otherwise defaultValue
public
void
requireEnabled
(Feature feature)
Ensures that Feature
is available and enabled.
If there is no property for the Feature
, assumes it is disabled.
public
void
requireEnabled
(Feature feature, boolean defaultValue)
Ensures that Feature
is available and enabled.
If there is no property for the Feature
, uses supplied default value
as enabled/disabled state of the Feature
Parameters
feature
| the Feature to check |
defaultValue
| assume feature enabled/disabled by default |