public abstract class AbstractFeatureCondition extends Object implements com.atlassian.plugin.web.Condition
Feature
based conditions. If the feature is not
supplied directly
by the derived class, it will be parsed
from the initialisation context
using the "key"
parameter.
Feature condition can be used with standard features
or custom features. When using a custom
feature, the provided "key"
is used to construct a SimpleFeature
. Feature.isDataCenter()
can
be set by including a "dataCenter"
parameter; it defaults to false
if it's not specified.
Derived classes must implement Condition.shouldDisplay(Map)
and make the desired check using the
featureManager
.
Modifier and Type | Field and Description |
---|---|
protected com.atlassian.bitbucket.server.FeatureManager |
featureManager |
Modifier | Constructor and Description |
---|---|
|
AbstractFeatureCondition(com.atlassian.bitbucket.server.FeatureManager featureManager) |
protected |
AbstractFeatureCondition(com.atlassian.bitbucket.server.FeatureManager featureManager,
com.atlassian.bitbucket.server.Feature feature) |
Modifier and Type | Method and Description |
---|---|
protected com.atlassian.bitbucket.server.Feature |
getFeature() |
void |
init(Map<String,String> params) |
protected final com.atlassian.bitbucket.server.FeatureManager featureManager
public AbstractFeatureCondition(com.atlassian.bitbucket.server.FeatureManager featureManager)
protected AbstractFeatureCondition(com.atlassian.bitbucket.server.FeatureManager featureManager, com.atlassian.bitbucket.server.Feature feature)
public void init(Map<String,String> params) throws com.atlassian.plugin.PluginParseException
init
in interface com.atlassian.plugin.web.Condition
com.atlassian.plugin.PluginParseException
protected com.atlassian.bitbucket.server.Feature getFeature()
Copyright © 2019 Atlassian. All rights reserved.