Class FeatureFlagConfigurationSetting
java.lang.Object
com.azure.data.appconfiguration.models.ConfigurationSetting
com.azure.data.appconfiguration.models.FeatureFlagConfigurationSetting
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ConfigurationSetting>
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
FieldsModifier and TypeFieldDescriptionstatic final StringA 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
ConstructorsConstructorDescriptionFeatureFlagConfigurationSetting(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.getValue()Gets the value of this configuration setting.booleanGet 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
fromJson, getContentType, getETag, getKey, getLabel, getLastModified, getTags, isReadOnly, toJson, 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_PREFIXconcatenatefeatureId.isEnabled- A boolean value to turn on/off the feature flag setting.
-
-
Method Details
-
getValue
Description copied from class:ConfigurationSettingGets the value of this configuration setting.- Overrides:
getValuein classConfigurationSetting- Returns:
- The value of this configuration setting.
-
setKey
Sets the key of this setting.- Overrides:
setKeyin classConfigurationSetting- Parameters:
key- The key to associate with this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSettingobject.
-
setValue
Sets the value of this setting.- Overrides:
setValuein classConfigurationSetting- Parameters:
value- The value to associate with this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSettingobject. - Throws:
IllegalArgumentException- if the setting'svalueis an invalid JSON format.
-
setLabel
Sets the label of this configuration setting.ConfigurationSetting.NO_LABELis the default label used when this value is not set.- Overrides:
setLabelin classConfigurationSetting- Parameters:
label- The label of this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSettingobject.
-
setContentType
Sets the content type. By default, the content type is null.- Overrides:
setContentTypein classConfigurationSetting- Parameters:
contentType- The content type of this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSettingobject.
-
setETag
Sets the ETag for this configuration setting.- Overrides:
setETagin classConfigurationSetting- Parameters:
etag- The ETag for the configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSettingobject.
-
setTags
Sets the tags for this configuration setting.- Overrides:
setTagsin classConfigurationSetting- Parameters:
tags- The tags to add to this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSettingobject.
-
getFeatureId
Get the feature ID of this configuration setting.- Returns:
- the feature ID of this configuration setting.
- Throws:
IllegalArgumentException- if the setting'svalueis an invalid JSON format.
-
setFeatureId
Set the feature ID of this configuration setting.- Parameters:
featureId- the feature ID of this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSettingobject. - Throws:
IllegalArgumentException- if the setting'svalueis 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.
- Throws:
IllegalArgumentException- if the setting'svalueis an invalid JSON format.
-
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
FeatureFlagConfigurationSettingobject. - Throws:
IllegalArgumentException- if the setting'svalueis an invalid JSON format.
-
getDescription
Get the description of this configuration setting.- Returns:
- the description of this configuration setting.
- Throws:
IllegalArgumentException- if the setting'svalueis an invalid JSON format.
-
setDescription
Set the description of this configuration setting.- Parameters:
description- the description of this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSettingobject. - Throws:
IllegalArgumentException- if the setting'svalueis an invalid JSON format.
-
getDisplayName
Get the display name of this configuration setting.- Returns:
- the display name of this configuration setting.
- Throws:
IllegalArgumentException- if the setting'svalueis an invalid JSON format.
-
setDisplayName
Set the display name of this configuration setting.- Parameters:
displayName- the display name of this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSettingobject. - Throws:
IllegalArgumentException- if the setting'svalueis an invalid JSON format.
-
getClientFilters
Gets the feature flag filters of this configuration setting.- Returns:
- the feature flag filters of this configuration setting.
- Throws:
IllegalArgumentException- if the setting'svalueis an invalid JSON format.
-
setClientFilters
Sets the feature flag filters of this configuration setting.- Parameters:
clientFilters- the feature flag filters of this configuration setting.- Returns:
- The updated
FeatureFlagConfigurationSettingobject. - Throws:
IllegalArgumentException- if the setting'svalueis 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
FeatureFlagConfigurationSettingobject. - Throws:
IllegalArgumentException- if the setting'svalueis an invalid JSON format.
-