public class

FeatureFlagDefinitions

extends Object
java.lang.Object
   ↳ com.atlassian.jira.config.FeatureFlagDefinitions

Class Overview

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();
 }
 
 

Summary

Nested Classes
class FeatureFlagDefinitions.Definition A builder intermediate class that allows for static definition  
Public Constructors
FeatureFlagDefinitions()
Public Methods
FeatureFlagDefinitions.Definition featureFlag(String featureKey)
Begin a a new feature flag definition that can be stored in a static variable.
Set<FeatureFlag> getFeatureFlags()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public FeatureFlagDefinitions ()

Public Methods

public FeatureFlagDefinitions.Definition featureFlag (String featureKey)

Begin a 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

public Set<FeatureFlag> getFeatureFlags ()

Returns
  • the set of feature flags defined by this object