STWFeatureFlagManager

object STWFeatureFlagManager

Feature Flags

A feature flag (also feature switch, feature toggle, feature flipper, conditional feature, etc.) is a technique in software development that attempts to provide an alternative to maintaining multiple branches in source code (known as feature branches), such that a software feature can be tested even before it is completed and ready for release. Feature toggle is used to hide, enable or disable the feature during runtime.



Continuous release and continuous deployment provide developers with rapid feedback about their coding. This requires the integration of their code changes as early as possible. Feature branches introduce a bypass to this process. Feature flags are an important technique used for the implementation of continuous delivery.



A bit more information can be found on the Wikipedia Feature Flag page.



In order to know which features are enabled or disabled at any given point, this manager class called STWFeatureFlagManager was coded in the API. This manager class can be interrogated in order to determine the status of a particular feature or to obtain the complete list of active features.



The feature name should be composed of the following (naming convention) :

  1. Product version: 246

  2. Feature name: MyCoolFeature

  3. Ticket/specification/backlog number: 2154

This would result in this feature name: 246-MyCoolFeature-2154.

Properties

Link copied to clipboard
val flags: List<String>?

Get all enabled feature flags.

Functions

Link copied to clipboard
fun enabled(featureName: String): Boolean

Check if a feature flag is enabled or not