public class FeatureFlag extends Object implements Feature
Feature
because it can have a default value. Additionally,
feature flags can be declared via xml and shared across apps.Modifier and Type | Field and Description |
---|---|
static String |
POSTFIX_DISABLED |
static String |
POSTFIX_ENABLED |
Modifier and Type | Method and Description |
---|---|
FeatureFlag |
defaultedTo(boolean defaultValue)
Deprecated.
- since 7.6 all flags are created as off by default
|
String |
disabledFeatureKey() |
String |
enabledFeatureKey() |
boolean |
equals(Object o) |
static FeatureFlag |
featureFlag(String featureKey)
Creates a new FeatureFlag with the specified key and off by default
|
String |
featureKey()
The feature key that can be used to enable, disable or query the status of a feature using the
FeatureManager . |
int |
hashCode() |
boolean |
isOnByDefault() |
FeatureFlag |
offByDefault()
Deprecated.
- since 7.6 all flags are created as off by default,
if you want your flag to be switched on use onByDefault
|
FeatureFlag |
onByDefault()
Creates a new FeatureFlag that is on by default
|
String |
toString() |
public static final String POSTFIX_ENABLED
public static final String POSTFIX_DISABLED
public String featureKey()
Feature
FeatureManager
.featureKey
in interface Feature
public boolean isOnByDefault()
public String enabledFeatureKey()
POSTFIX_ENABLED
public String disabledFeatureKey()
POSTFIX_DISABLED
public static FeatureFlag featureFlag(String featureKey)
featureKey
- the key in playpublic FeatureFlag onByDefault()
@Deprecated public FeatureFlag offByDefault()
@Deprecated public FeatureFlag defaultedTo(boolean defaultValue)
Copyright © 2002-2022 Atlassian. All Rights Reserved.