Package oracle.dbtools.plugin.api.conf
Class ConfigurationSetting
java.lang.Object
oracle.dbtools.plugin.api.conf.ConfigurationSetting
Declares a
ConfigurationSetting, specifying it's type, and default value.- Author:
- cdivilly
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuildsConfigurationSettinginstancesstatic @interfaceDeprecated.since 20.3.0. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates if this setting can be overridden through SchemaOverride.The default value for the settingbooleaninthashCode()static booleanisConfigurationType(Class<?> type) Indicates if the specific type is a supportedConfigurationSettingtypebooleanisGlobal()Indicates if this is a global level settingbooleanisSecure()Indicates if this setting contains sensitive data that must be kept securemodify()Produce a newConfigurationSetting.Builderinstance initialized with the state of thisConfigurationSettingstatic ConfigurationSetting.Buildersetting()Create aConfigurationSetting.Builderinstancestatic ConfigurationSettingsetting(boolean defaultValue) Define aBooleansettingstatic ConfigurationSettingsetting(boolean defaultValue, Translatable description) Define aBooleansettingstatic ConfigurationSettingsetting(int defaultValue) Define anIntegerpropertystatic ConfigurationSettingsetting(int defaultValue, Translatable description) Define anIntegerpropertystatic ConfigurationSettingsetting(long defaultValue) Define aLongsettingstatic ConfigurationSettingsetting(long defaultValue, Translatable description) Define aLongsettingstatic <T extends Enum<T>>
ConfigurationSettingDefine anEnumsettingstatic <T extends Enum<T>>
ConfigurationSettingsetting(Class<T> type, T defaultValue, Translatable description) Define anEnumsettingstatic ConfigurationSettingDefine aStringpropertystatic ConfigurationSettingsetting(String defaultValue, Translatable description) Define aStringpropertystatic ConfigurationSettingsetting(TimeDuration defaultValue) Define aTimeDurationpropertystatic ConfigurationSettingsetting(TimeDuration defaultValue, Translatable description) Define aTimeDurationpropertystatic Map<String,ConfigurationSetting> Enumerates the settings defined by the specified type.status()The status of the configuration propertytoString()Class<?>type()The type of the setting
-
Method Details
-
defaultValue
The default value for the setting- Returns:
- default value or
nullif the setting has no default value
-
description
-
equals
-
hashCode
public int hashCode() -
canOverride
public boolean canOverride()Indicates if this setting can be overridden through SchemaOverride.- Returns:
- true if this setting can be overridden at runtime.
-
isGlobal
public boolean isGlobal()Indicates if this is a global level setting- Returns:
trueif this setting can only be configured for the entire application,falseotherwise
-
isSecure
public boolean isSecure()Indicates if this setting contains sensitive data that must be kept secure- Returns:
- true if this setting contains sensitive data
-
modify
Produce a newConfigurationSetting.Builderinstance initialized with the state of thisConfigurationSetting- Returns:
ConfigurationSetting.Builderinstance
-
status
The status of the configuration property- Returns:
-
toString
-
type
The type of the setting- Returns:
- The type of the setting
-
isConfigurationType
Indicates if the specific type is a supportedConfigurationSettingtype- Parameters:
type- The type to check- Returns:
- true if the type is supported, false otherwise
-
setting
Create aConfigurationSetting.Builderinstance- Returns:
ConfigurationSetting.Builderinstance
-
setting
Define aBooleansetting- Parameters:
defaultValue- The default value. For consistency the default value should always befalse- Returns:
ConfigurationSettinginstance
-
setting
Define aBooleansetting- Parameters:
defaultValue- The default value. For consistency the default value should always befalsedescription- Describe the purpose of the setting- Returns:
ConfigurationSettinginstance
-
setting
Define anEnumsetting- Type Parameters:
T- AnEnumsub-type- Parameters:
type- The type of theEnumsubclassdefaultValue- The default value.- Returns:
ConfigurationSettinginstance
-
setting
public static <T extends Enum<T>> ConfigurationSetting setting(Class<T> type, T defaultValue, Translatable description) Define anEnumsetting- Type Parameters:
T- AnEnumsub-type- Parameters:
type- The type of theEnumsubclassdefaultValue- The default value.description- Describe the purpose of the setting- Returns:
ConfigurationSettinginstance
-
setting
Define anIntegerproperty- Parameters:
defaultValue- The default value.- Returns:
ConfigurationSettinginstance
-
setting
Define anIntegerproperty- Parameters:
defaultValue- The default value.description- Describe the purpose of the setting- Returns:
ConfigurationSettinginstance
-
setting
Define aLongsetting- Parameters:
defaultValue- The default value.- Returns:
ConfigurationSettinginstance
-
setting
Define aLongsetting- Parameters:
defaultValue- The default value.description- Describe the purpose of the setting- Returns:
ConfigurationSettinginstance
-
setting
Define aStringproperty- Parameters:
defaultValue- The default value.- Returns:
ConfigurationSettinginstance
-
setting
Define aStringproperty- Parameters:
defaultValue- The default value.description- Describe the purpose of the setting- Returns:
ConfigurationSettinginstance
-
setting
Define aTimeDurationproperty- Parameters:
defaultValue- The default value- Returns:
ConfigurationSettinginstance
-
setting
Define aTimeDurationproperty- Parameters:
defaultValue- The default valuedescription- Describe the purpose of the setting- Returns:
ConfigurationSettinginstance
-
settings
Enumerates the settings defined by the specified type. Note this method involves reflection and is expensive and should only be called rarely, preferably in a static initializer- Parameters:
type- The type to enumerate the settings for- Returns:
Mapof setting name toConfigurationSettingmappings
-