Interface FeatureFlags

All Known Implementing Classes:
FeatureFlagsFF4j

@API(status=STABLE, since="3.0", consumers="FeatureFlagsFF4j") @Component public interface FeatureFlags
Feature Flags is a wrapper for the FF4j library to enable toggels for activating and deactivating features.
Since:
1.0
Version:
1.0
Author:
elmar.dott@gmail.com
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Define the configuration set for FeatureFlags.
    static final String
    Defines for which MODULE_VERSION the configuration will work.
    static final String
    Identifier for the given feature.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Activate a feature in the feature store by given ID.
    void
    addFeature(org.ff4j.core.Feature feature)
    Add a feature to the feature store.
    boolean
    check(String featureId)
    Check if a feature is enbaled or not.
    void
    Deactivate a feature in the feature store by given ID.
    org.ff4j.core.Feature
    getFeature(String featureId)
    Get the full feature by a given ID from the feature store.
    org.ff4j.FF4j
    getFeatureStore(String propertyFile)
    Connect an application to a feature store by a given database connection file.jdbc.driverClassName jdbc.url jdbc.user jdbc.password
    Map<String,org.ff4j.core.Feature>
    Grab all in the feature store existing features.
    void
    removeFeature(String featureId)
    Remove an existing feature from the feature store.
    void
    updateFeature(org.ff4j.core.Feature feature)
    Update an existing feature in the feature store.
  • Field Details

    • FEATURE_ID

      @API(status=STABLE, since="3.0") static final String FEATURE_ID
      Identifier for the given feature.
      See Also:
    • CONFIG_SET

      @API(status=STABLE, since="3.0") static final String CONFIG_SET
      Define the configuration set for FeatureFlags.
      See Also:
    • CONFIG_VERSION

      @API(status=STABLE, since="3.0") static final String CONFIG_VERSION
      Defines for which MODULE_VERSION the configuration will work.
      See Also:
  • Method Details

    • getFeatureStore

      org.ff4j.FF4j getFeatureStore(String propertyFile) throws IOException, ConnectException, MisconfigurationException
      Connect an application to a feature store by a given database connection file.
    • jdbc.driverClassName
    • jdbc.url
    • jdbc.user
    • jdbc.password
    • Parameters:
      propertyFile - as String
      Returns:
      feature store as FF4j
      Throws:
      IOException
      ConnectException
      MisconfigurationException
    • check

      boolean check(String featureId)
      Check if a feature is enbaled or not.
      Parameters:
      featureId - as String
      Returns:
      check as boolean
    • activateFeature

      void activateFeature(String featureId)
      Activate a feature in the feature store by given ID.
      Parameters:
      featureId - as String
    • deactivateFeature

      void deactivateFeature(String featureId)
      Deactivate a feature in the feature store by given ID.
      Parameters:
      featureId - as String
    • addFeature

      void addFeature(org.ff4j.core.Feature feature)
      Add a feature to the feature store.
      Parameters:
      feature - as Feature
    • getFeature

      org.ff4j.core.Feature getFeature(String featureId)
      Get the full feature by a given ID from the feature store.
      Parameters:
      featureId - as String
      Returns:
      feature as Feature
    • updateFeature

      void updateFeature(org.ff4j.core.Feature feature)
      Update an existing feature in the feature store.
      Parameters:
      feature - as Feature
    • removeFeature

      void removeFeature(String featureId)
      Remove an existing feature from the feature store.
      Parameters:
      featureId -
    • listAllFeatures

      Map<String,org.ff4j.core.Feature> listAllFeatures()
      Grab all in the feature store existing features.
      Returns:
      Feature by its featureId as Map