public class

FeatureFlag

extends Object
implements Feature
java.lang.Object
   ↳ com.atlassian.jira.config.FeatureFlag

Class Overview

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 add-ons.

Summary

Constants
String POSTFIX_DISABLED
String POSTFIX_ENABLED
Public Methods
FeatureFlag defaultedTo(boolean defaultValue)
Creates a new FeatureFlag that is defaulted to the specified value
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()
Creates a new FeatureFlag that is off by default
FeatureFlag onByDefault()
Creates a new FeatureFlag that is on by default
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.config.Feature

Constants

public static final String POSTFIX_DISABLED

Constant Value: ".disabled"

public static final String POSTFIX_ENABLED

Constant Value: ".enabled"

Public Methods

public FeatureFlag defaultedTo (boolean defaultValue)

Creates a new FeatureFlag that is defaulted to the specified value

Returns
  • a new feature flag

public String disabledFeatureKey ()

Returns

public String enabledFeatureKey ()

Returns

public boolean equals (Object o)

public static FeatureFlag featureFlag (String featureKey)

Creates a new FeatureFlag with the specified key and off by default

Parameters
featureKey the key in play
Returns
  • a new feature flag

public String featureKey ()

The feature key that can be used to enable, disable or query the status of a feature using the FeatureManager.

Returns
  • the unique key used to identify the feature.

public int hashCode ()

public boolean isOnByDefault ()

Returns
  • true if this feature is on by default

public FeatureFlag offByDefault ()

Creates a new FeatureFlag that is off by default

Returns
  • a new feature flag

public FeatureFlag onByDefault ()

Creates a new FeatureFlag that is on by default

Returns
  • a new feature flag

public String toString ()