Package oracle.dbtools.plugin.api.conf

## Class ConfigurationSetting

- java.lang.Object
- - oracle.dbtools.plugin.api.conf.ConfigurationSetting

-     public final class ConfigurationSetting
      extends java.lang.Object

  Declares a `ConfigurationSetting`, specifying it's type, and default value.
  Author:
    cdivilly
  See Also:
    `oracle.dbtools.plugin.api.conf` package description

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `ConfigurationSetting.Builder` | Builds `ConfigurationSetting` instances
    `static interface` | `ConfigurationSetting.Description` | Deprecated. since 20.3.0.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.Object` | `defaultValue()` | The default value for the setting
    `Translatable` | `description()` |
    `boolean` | `equals​(java.lang.Object obj)` |
    `int` | `hashCode()` |
    `static boolean` | `isConfigurationType​(java.lang.Class<?> type)` | Indicates if the specific type is a supported `ConfigurationSetting` type
    `boolean` | `isGlobal()` | Indicates if this is a global level setting
    `boolean` | `isSecure()` | Indicates if this setting contains sensitive data that must be kept secure
    `ConfigurationSetting.Builder` | `modify()` | Produce a new `ConfigurationSetting.Builder` instance initialized with the state of this `ConfigurationSetting`
    `static ConfigurationSetting.Builder` | `setting()` | Create a `ConfigurationSetting.Builder` instance
    `static ConfigurationSetting` | `setting​(boolean defaultValue)` | Define a `Boolean` setting
    `static ConfigurationSetting` | `setting​(boolean defaultValue, Translatable description)` | Define a `Boolean` setting
    `static ConfigurationSetting` | `setting​(int defaultValue)` | Define an `Integer` property
    `static ConfigurationSetting` | `setting​(int defaultValue, Translatable description)` | Define an `Integer` property
    `static ConfigurationSetting` | `setting​(long defaultValue)` | Define a `Long` setting
    `static ConfigurationSetting` | `setting​(long defaultValue, Translatable description)` | Define a `Long` setting
    `static <T extends java.lang.Enum<T>> ConfigurationSetting` | `setting​(java.lang.Class<T> type, T defaultValue)` | Define an `Enum` setting
    `static <T extends java.lang.Enum<T>> ConfigurationSetting` | `setting​(java.lang.Class<T> type, T defaultValue, Translatable description)` | Define an `Enum` setting
    `static ConfigurationSetting` | `setting​(java.lang.String defaultValue)` | Define a `String` property
    `static ConfigurationSetting` | `setting​(java.lang.String defaultValue, Translatable description)` | Define a `String` property
    `static ConfigurationSetting` | `setting​(TimeDuration defaultValue)` | Define a `TimeDuration` property
    `static ConfigurationSetting` | `setting​(TimeDuration defaultValue, Translatable description)` | Define a `TimeDuration` property
    `static java.util.Map<java.lang.String,​ConfigurationSetting>` | `settings​(java.lang.Class<?> type)` | Enumerates the settings defined by the specified type.
    `ConfigurationStatus` | `status()` | The status of the configuration property
    `java.lang.String` | `toString()` |
    `java.lang.Class<?>` | `type()` | The type of the setting

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### defaultValue

          public java.lang.Object defaultValue()

      The default value for the setting
      Returns:
        default value or `null` if the setting has no default value

    - #### description

          public Translatable description()

    - #### equals

          public boolean equals​(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### isGlobal

          public boolean isGlobal()

      Indicates if this is a global level setting
      Returns:
        `true` if this setting can only be configured for the entire application, `false` otherwise

    - #### 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

          public ConfigurationSetting.Builder modify()

      Produce a new `ConfigurationSetting.Builder` instance initialized with the state of this `ConfigurationSetting`
      Returns:
        `ConfigurationSetting.Builder` instance

    - #### status

          public ConfigurationStatus status()

      The status of the configuration property
      Returns:

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### type

          public java.lang.Class<?> type()

      The type of the setting
      Returns:
        The type of the setting

    - #### isConfigurationType

          public static boolean isConfigurationType​(java.lang.Class<?> type)

      Indicates if the specific type is a supported `ConfigurationSetting` type
      Parameters:
        `type` - The type to check
      Returns:
        true if the type is supported, false otherwise

    - #### setting

          public static ConfigurationSetting.Builder setting()

      Create a `ConfigurationSetting.Builder` instance
      Returns:
        `ConfigurationSetting.Builder` instance

    - #### setting

          public static ConfigurationSetting setting​(boolean defaultValue)

      Define a `Boolean` setting
      Parameters:
        `defaultValue` - The default value. For consistency the default value should always be `false`
      Returns:
        `ConfigurationSetting` instance

    - #### setting

          public static ConfigurationSetting setting​(boolean defaultValue,
                                                     Translatable description)

      Define a `Boolean` setting
      Parameters:
        `defaultValue` - The default value. For consistency the default value should always be `false`
        `description` - Describe the purpose of the setting
      Returns:
        `ConfigurationSetting` instance

    - #### setting

          public static <T extends java.lang.Enum<T>> ConfigurationSetting setting​(java.lang.Class<T> type,
                                                                                   T defaultValue)

      Define an `Enum` setting
      Type Parameters:
        `T` - An `Enum` sub-type
      Parameters:
        `type` - The type of the `Enum` subclass
        `defaultValue` - The default value.
      Returns:
        `ConfigurationSetting` instance

    - #### setting

          public static <T extends java.lang.Enum<T>> ConfigurationSetting setting​(java.lang.Class<T> type,
                                                                                   T defaultValue,
                                                                                   Translatable description)

      Define an `Enum` setting
      Type Parameters:
        `T` - An `Enum` sub-type
      Parameters:
        `type` - The type of the `Enum` subclass
        `defaultValue` - The default value.
        `description` - Describe the purpose of the setting
      Returns:
        `ConfigurationSetting` instance

    - #### setting

          public static ConfigurationSetting setting​(int defaultValue)

      Define an `Integer` property
      Parameters:
        `defaultValue` - The default value.
      Returns:
        `ConfigurationSetting` instance

    - #### setting

          public static ConfigurationSetting setting​(int defaultValue,
                                                     Translatable description)

      Define an `Integer` property
      Parameters:
        `defaultValue` - The default value.
        `description` - Describe the purpose of the setting
      Returns:
        `ConfigurationSetting` instance

    - #### setting

          public static ConfigurationSetting setting​(long defaultValue)

      Define a `Long` setting
      Parameters:
        `defaultValue` - The default value.
      Returns:
        `ConfigurationSetting` instance

    - #### setting

          public static ConfigurationSetting setting​(long defaultValue,
                                                     Translatable description)

      Define a `Long` setting
      Parameters:
        `defaultValue` - The default value.
        `description` - Describe the purpose of the setting
      Returns:
        `ConfigurationSetting` instance

    - #### setting

          public static ConfigurationSetting setting​(java.lang.String defaultValue)

      Define a `String` property
      Parameters:
        `defaultValue` - The default value.
      Returns:
        `ConfigurationSetting` instance

    - #### setting

          public static ConfigurationSetting setting​(java.lang.String defaultValue,
                                                     Translatable description)

      Define a `String` property
      Parameters:
        `defaultValue` - The default value.
        `description` - Describe the purpose of the setting
      Returns:
        `ConfigurationSetting` instance

    - #### setting

          public static ConfigurationSetting setting​(TimeDuration defaultValue)

      Define a `TimeDuration` property
      Parameters:
        `defaultValue` - The default value
      Returns:
        `ConfigurationSetting` instance

    - #### setting

          public static ConfigurationSetting setting​(TimeDuration defaultValue,
                                                     Translatable description)

      Define a `TimeDuration` property
      Parameters:
        `defaultValue` - The default value
        `description` - Describe the purpose of the setting
      Returns:
        `ConfigurationSetting` instance

    - #### settings

          public static java.util.Map<java.lang.String,​ConfigurationSetting> settings​(java.lang.Class<?> type)

      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:
        `Map` of setting name to `ConfigurationSetting` mappings