Package com.atlassian.jira.config
Class FeatureFlagDefinitions.Definition
java.lang.Object
com.atlassian.jira.config.FeatureFlagDefinitions.Definition
- Enclosing class:
- FeatureFlagDefinitions
A builder intermediate class that allows for static definition
-
Method Summary
Modifier and TypeMethodDescriptiondefine()
This will define the feature flag, add it to the parent FeatureFlagDefinitions and return the created.Makes feature flag disabled by default - it is default behaviour of feature flagsMakes feature flag enabled by defaultsafeFlag()
Marks feature flag as analytics friendly.Marks feature flag as not analytics friendly.
-
Method Details
-
offByDefault
Makes feature flag disabled by default - it is default behaviour of feature flags- Returns:
- updated builder object
-
onByDefault
Makes feature flag enabled by default- Returns:
- updated builder object
-
safeFlag
Marks feature flag as analytics friendly. Analytics friendly feature flags have hard coded (not changing) feature key that is not connected with any user generated data. Examples of good feature key: 'jira.my.feature.alternative.option'; 'jira.fix.use.old.behaviour' Examples of bad feature key: 'jira.my.feature.' + issueKey + '.alternative'; 'jira.fix.ISSUE_KEY.old' If you are unsure if your feature flag key is analytics friendly don't use this option. Your feature flag will be reported by analytics but feature key will be hashed with SHA256 or other hashing algorithm. For details seeFeatureFlagStatisticEvent
. Default behaviour of Feature Flags is to mark all flags as analytics unfriendly. It means that you must mark your feature flag as safe when creating, otherwise is will be marked as unsafe.- Returns:
- updated builder object
-
unsafeFlag
Marks feature flag as not analytics friendly. It is default behaviour. SeesafeFlag()
for details. Use only if you want to make sure that your feature flag key will be hashed in analytics events.- Returns:
- updated builder object
-
define
This will define the feature flag, add it to the parent FeatureFlagDefinitions and return the created.- Returns:
- the created feature flag
-