Class FeatureFlagConfigurationSetting
java.lang.Object
com.azure.data.appconfiguration.models.ConfigurationSetting
com.azure.data.appconfiguration.models.FeatureFlagConfigurationSetting
FeatureFlagConfigurationSetting
allows you to customize your own feature flags to dynamically administer a
feature's lifecycle. Feature flags can be used to enable or disable features.-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
A prefix is used to construct a feature flag configuration setting's key.Fields inherited from class com.azure.data.appconfiguration.models.ConfigurationSetting
NO_LABEL
-
Constructor Summary
ConstructorDescriptionFeatureFlagConfigurationSetting
(String featureId, boolean isEnabled) The constructor for a feature flag configuration setting. -
Method Summary
Modifier and TypeMethodDescriptionaddClientFilter
(FeatureFlagFilter clientFilter) Add a feature flag filter to this configuration setting.Gets the feature flag filters of this configuration setting.Get the description of this configuration setting.Get the display name of this configuration setting.Get the feature ID of this configuration setting.boolean
Get the boolean indicator to show if the setting is turn on or off.setClientFilters
(List<FeatureFlagFilter> clientFilters) Sets the feature flag filters of this configuration setting.setContentType
(String contentType) Sets the content type.setDescription
(String description) Set the description of this configuration setting.setDisplayName
(String displayName) Set the display name of this configuration setting.setEnabled
(boolean isEnabled) Set the boolean indicator to show if the setting is turn on or off.Sets the ETag for this configuration setting.setFeatureId
(String featureId) Set the feature ID of this configuration setting.Sets the key of this setting.Sets the label of this configuration setting.Sets the tags for this configuration setting.Sets the value of this setting.Methods inherited from class com.azure.data.appconfiguration.models.ConfigurationSetting
getContentType, getETag, getKey, getLabel, getLastModified, getTags, getValue, isReadOnly, toString
-
Field Details
-
KEY_PREFIX
A prefix is used to construct a feature flag configuration setting's key.- See Also:
-
-
Constructor Details
-
FeatureFlagConfigurationSetting
The constructor for a feature flag configuration setting.- Parameters:
featureId
- A feature flag identification value that used to construct in setting's key. The key of setting isKEY_PREFIX
concatenatefeatureId
.isEnabled
- A boolean value to turn on/off the feature flag setting.
-
-
Method Details
-
setKey
Sets the key of this setting.- Overrides:
setKey
in classConfigurationSetting
- Parameters:
key
- The key to associate with this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSetting
object.
-
setValue
Sets the value of this setting.- Overrides:
setValue
in classConfigurationSetting
- Parameters:
value
- The value to associate with this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSetting
object. - Throws:
IllegalArgumentException
- if the setting'svalue
is an invalid JSON format.
-
setLabel
Sets the label of this configuration setting.ConfigurationSetting.NO_LABEL
is the default label used when this value is not set.- Overrides:
setLabel
in classConfigurationSetting
- Parameters:
label
- The label of this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSetting
object.
-
setContentType
Sets the content type. By default, the content type is null.- Overrides:
setContentType
in classConfigurationSetting
- Parameters:
contentType
- The content type of this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSetting
object.
-
setETag
Sets the ETag for this configuration setting.- Overrides:
setETag
in classConfigurationSetting
- Parameters:
etag
- The ETag for the configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSetting
object.
-
setTags
Sets the tags for this configuration setting.- Overrides:
setTags
in classConfigurationSetting
- Parameters:
tags
- The tags to add to this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSetting
object.
-
getFeatureId
Get the feature ID of this configuration setting.- Returns:
- the feature ID of this configuration setting.
-
setFeatureId
Set the feature ID of this configuration setting.- Parameters:
featureId
- the feature ID of this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSetting
object. - Throws:
IllegalArgumentException
- if the setting'svalue
is an invalid JSON format.
-
isEnabled
public boolean isEnabled()Get the boolean indicator to show if the setting is turn on or off.- Returns:
- the boolean indicator to show if the setting is turn on or off.
-
setEnabled
Set the boolean indicator to show if the setting is turn on or off.- Parameters:
isEnabled
- the boolean indicator to show if the setting is turn on or off.- Returns:
- The updated
FeatureFlagConfigurationSetting
object. - Throws:
IllegalArgumentException
- if the setting'svalue
is an invalid JSON format.
-
getDescription
Get the description of this configuration setting.- Returns:
- the description of this configuration setting.
-
setDescription
Set the description of this configuration setting.- Parameters:
description
- the description of this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSetting
object. - Throws:
IllegalArgumentException
- if the setting'svalue
is an invalid JSON format.
-
getDisplayName
Get the display name of this configuration setting.- Returns:
- the display name of this configuration setting.
-
setDisplayName
Set the display name of this configuration setting.- Parameters:
displayName
- the display name of this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSetting
object. - Throws:
IllegalArgumentException
- if the setting'svalue
is an invalid JSON format.
-
getClientFilters
Gets the feature flag filters of this configuration setting.- Returns:
- the feature flag filters of this configuration setting.
-
setClientFilters
Sets the feature flag filters of this configuration setting.- Parameters:
clientFilters
- the feature flag filters of this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSetting
object. - Throws:
IllegalArgumentException
- if the setting'svalue
is an invalid JSON format.
-
addClientFilter
Add a feature flag filter to this configuration setting.- Parameters:
clientFilter
- a feature flag filter to add to this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSetting
object.
-