Class Engine

java.lang.Object
com.flagsmith.flagengine.Engine

public class Engine
extends Object
  • Constructor Details

    • Engine

      public Engine()
  • Method Details

    • getEnvironmentFeatureStates

      public static List<FeatureStateModel> getEnvironmentFeatureStates​(EnvironmentModel environment)
      Get a list of feature states for a given environment.
      Parameters:
      environment - Instance of the Environment.
    • getEnvironmentFeatureState

      public static FeatureStateModel getEnvironmentFeatureState​(EnvironmentModel environment, String featureName) throws FeatureStateNotFound
      Get a specific feature state for a given feature_name in a given environment.
      Parameters:
      environment - Instance of the Environment.
      featureName - Feature name to search for.
      Throws:
      FeatureStateNotFound
    • getIdentityFeatureStates

      public static List<FeatureStateModel> getIdentityFeatureStates​(EnvironmentModel environmentModel, IdentityModel identityModel)
      Get a list of feature states for a given identity in a given environment.
      Parameters:
      environmentModel - Instance of the Environment.
      identityModel - Instance of Identity.
    • getIdentityFeatureStates

      public static List<FeatureStateModel> getIdentityFeatureStates​(EnvironmentModel environmentModel, IdentityModel identityModel, List<TraitModel> overrideTraits)
      Get a list of feature states for a given identity in a given environment.
      Parameters:
      environmentModel - Instance of the Environment.
      identityModel - Instance of Identity.
    • getIdentityFeatureState

      public static FeatureStateModel getIdentityFeatureState​(EnvironmentModel environmentModel, IdentityModel identityModel, String featureName, List<TraitModel> overrideTraits) throws FeatureStateNotFound
      Get a specific feature state for a given identity in a given environment.
      Parameters:
      environmentModel - Instance of the Environment.
      identityModel - Instance of identity.
      featureName - Feature Name to search for.
      overrideTraits - Traits to override identity's traits.
      Throws:
      FeatureStateNotFound