Conditions Class
- java.
lang. Object - com.
azure. spring. cloud. feature. management. models. Conditions
- com.
public class Conditions
Conditions for evaluating a feature flag. This class defines how feature filters should be evaluated to determine if a feature flag is enabled for the current request. It specifies both the filters to check and how their results should be combined (e.g., if all filters must pass or if only one needs to pass).
Constructor Summary
| Constructor | Description |
|---|---|
| Conditions() |
Creates a new instance of the Conditions class. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
List<Feature |
getClientFilters()
Gets the list of client-side feature filters that should be evaluated to determine if a feature flag is enabled. |
| String |
getRequirementType()
Gets the requirement type that determines how feature filters are evaluated. |
| Conditions |
setClientFilters(List<FeatureFilterEvaluationContext> clientFilters)
Sets the list of client-side feature filters to be evaluated to determine if a feature flag is enabled. |
| Conditions |
setRequirementType(String requirementType)
Sets the requirement type that determines how feature filters are evaluated. |
Methods inherited from java.lang.Object
Constructor Details
Conditions
public Conditions()
Creates a new instance of the Conditions class.
Method Details
getClientFilters
public List<FeatureFilterEvaluationContext> getClientFilters()
Gets the list of client-side feature filters that should be evaluated to determine if a feature flag is enabled. Each filter contains its own parameters and evaluation context.
Returns:
getRequirementType
public String getRequirementType()
Gets the requirement type that determines how feature filters are evaluated. The requirement type specifies whether all filters must evaluate to true (AND logic) or if only one filter needs to evaluate to true (OR logic).
Returns:
setClientFilters
public Conditions setClientFilters(List<FeatureFilterEvaluationContext> clientFilters)
Sets the list of client-side feature filters to be evaluated to determine if a feature flag is enabled. Each filter should contain its necessary parameters and context for evaluation.
Parameters:
Returns:
setRequirementType
public Conditions setRequirementType(String requirementType)
Sets the requirement type that determines how feature filters are evaluated. Valid values are typically "All" (AND logic) or "Any" (OR logic), where "All" requires all filters to evaluate to true, and "Any" requires only one filter to evaluate to true.
Parameters:
Returns: