Class Conditions
java.lang.Object
com.azure.spring.cloud.feature.management.models.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the list of client-side feature filters that should be evaluated to determine if a feature flag is enabled.Gets the requirement type that determines how feature filters are evaluated.setClientFilters(List<FeatureFilterEvaluationContext> clientFilters) Sets the list of client-side feature filters to be evaluated to determine if a feature flag is enabled.setRequirementType(String requirementType) Sets the requirement type that determines how feature filters are evaluated.
-
Constructor Details
-
Conditions
public Conditions()Creates a new instance of the Conditions class.
-
-
Method Details
-
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:
- the requirement type for filter evaluation
-
setRequirementType
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:
requirementType- the requirement type to set for filter evaluation- Returns:
- the updated Conditions object
-
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:
- the list of client-side feature filters
-
setClientFilters
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:
clientFilters- the list of client-side feature filters to set- Returns:
- the updated Conditions object
-