public class

IsFeatureEnabledCondition

extends Object
implements Condition
java.lang.Object
   ↳ com.atlassian.bitbucket.web.conditions.IsFeatureEnabledCondition

Class Overview

Checks whether a configured Feature is is enabled.

This condition can be used with StandardFeature standard features or custom features. When using a custom feature, the provided "key" is used to construct a SimpleFeature. isDataCenter() can be set by including a "dataCenter" parameter; it defaults to false if it's not specified.

Whether using a StandardFeature or not, it's also possible to specify a "defaultValue" parameter to define whether the feature should be considered enabled or disabled if it's not explicitly configured. The default value is set to false if the parameter is not provided.

Summary

Public Constructors
IsFeatureEnabledCondition(FeatureManager featureManager)
Protected Constructors
IsFeatureEnabledCondition(FeatureManager featureManager, Feature feature)
Instantiates a check used to determine whether the provided Feature feature is enabled.
@Deprecated IsFeatureEnabledCondition(FeatureManager featureManager, StandardFeature feature)
This constructor is deprecated. in 5.5 for removal in 6.0. Use IsFeatureEnabledCondition(FeatureManager, Feature) instead. (You may need to use a cast to bind to that method instead of this one.)
Public Methods
void init(Map<StringString> params)
boolean shouldDisplay(Map<StringObject> context)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.plugin.web.Condition

Public Constructors

public IsFeatureEnabledCondition (FeatureManager featureManager)

Protected Constructors

protected IsFeatureEnabledCondition (FeatureManager featureManager, Feature feature)

Instantiates a check used to determine whether the provided Feature feature is enabled. The specified feature cannot be overridden by calling init(Map).

Parameters
featureManager the feature manager to perform the check
feature the feature to check

@Deprecated protected IsFeatureEnabledCondition (FeatureManager featureManager, StandardFeature feature)

This constructor is deprecated.
in 5.5 for removal in 6.0. Use IsFeatureEnabledCondition(FeatureManager, Feature) instead. (You may need to use a cast to bind to that method instead of this one.)

Instantiates a check used to determine whether the provided StandardFeature feature is enabled. The specified feature cannot be overridden by calling init(Map).

Parameters
featureManager the feature manager to perform the check
feature the standard feature to check

Public Methods

public void init (Map<StringString> params)

Throws
PluginParseException

public boolean shouldDisplay (Map<StringObject> context)