Package com.atlassian.jira.config
Class FeatureFlag
java.lang.Object
com.atlassian.jira.config.FeatureFlag
- All Implemented Interfaces:
Feature
- Direct Known Subclasses:
AnalyticsAwareFeatureFlag
A FeatureFlag is a simple declaration of a key and whether the flag is considered on or off by default.
The FeatureFlag is different from a
Feature
because it can have a default value. Additionally,
feature flags can be declared via xml and shared across apps.- Since:
- 7.1
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefaultedTo
(boolean defaultValue) Deprecated.- since 7.6 all flags are created as off by defaultboolean
static FeatureFlag
featureFlag
(String featureKey) Creates a new FeatureFlag with the specified key and off by defaultThe feature key that can be used to enable, disable or query the status of a feature using theFeatureManager
.int
hashCode()
boolean
Deprecated.- since 7.6 all flags are created as off by default, if you want your flag to be switched on use onByDefaultCreates a new FeatureFlag that is on by defaulttoString()
-
Field Details
-
POSTFIX_ENABLED
- See Also:
-
POSTFIX_DISABLED
- See Also:
-
-
Method Details
-
featureKey
Description copied from interface:Feature
The feature key that can be used to enable, disable or query the status of a feature using theFeatureManager
.- Specified by:
featureKey
in interfaceFeature
- Returns:
- feature key
-
isOnByDefault
public boolean isOnByDefault()- Returns:
- true if this feature is on by default
-
enabledFeatureKey
- Returns:
- this feature key with the enabled postfix of
POSTFIX_ENABLED
-
disabledFeatureKey
- Returns:
- this feature key with the enabled postfix of
POSTFIX_DISABLED
-
featureFlag
Creates a new FeatureFlag with the specified key and off by default- Parameters:
featureKey
- the key in play- Returns:
- a new feature flag
-
onByDefault
Creates a new FeatureFlag that is on by default- Returns:
- a new feature flag
-
offByDefault
Deprecated.- since 7.6 all flags are created as off by default, if you want your flag to be switched on use onByDefaultCreates a new FeatureFlag that is off by default- Returns:
- a new feature flag
-
defaultedTo
Deprecated.- since 7.6 all flags are created as off by defaultCreates a new FeatureFlag that is defaulted to the specified value- Returns:
- a new feature flag
-
equals
-
hashCode
public int hashCode() -
toString
-