Package com.atlassian.jira.config
Class FeatureFlagDefinitions
java.lang.Object
com.atlassian.jira.config.FeatureFlagDefinitions
A FeatureFlagDefinitions is designed to be used in a static variable declaration while still capturing the flags
defined via it.
Declare a static of this type and then declare specific FeatureFlag
definitions as static variables as well.
public class WellKnownFeatureFlags
{
static FeatureFlagDefinitions FLAGS = new FeatureFlagDefinitions();
public final static FeatureFlag TEST_FEATURE_ONE = FLAGS.featureFlag("test.feature.one").define();
public final static FeatureFlag TEST_FEATURE_TWO = FLAGS.featureFlag("test.feature.two").onByDefault().define();
}
- Since:
- 7.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
A builder intermediate class that allows for static definition -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfeatureFlag
(String featureKey) Begin a new feature flag definition that can be stored in a static variable.
-
Constructor Details
-
FeatureFlagDefinitions
public FeatureFlagDefinitions()
-
-
Method Details
-
getFeatureFlags
- Returns:
- the set of feature flags defined by this object
-
featureFlag
Begin a new feature flag definition that can be stored in a static variable. It must follow the validation rules of this class- Parameters:
featureKey
- the key of the feature- Returns:
- an intermediary builder object that can be called on to finish the registration
-