case class Configuration(underlying: Config) extends Product with Serializable

A full configuration set.

The underlying implementation is provided by https://github.com/lightbend/config.

underlying

the underlying Config implementation

Source
Configuration.scala
Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Configuration
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Configuration(underlying: Config)

    underlying

    the underlying Config implementation

Value Members

  1. def entrySet: Set[(String, ConfigValue)]

    Returns every path as a set of key to value pairs, by recursively iterating through the config objects.

  2. def get[A](path: String)(implicit loader: ConfigLoader[A]): A

    Get the config at the given path.

  3. def getAndValidate[A](path: String, values: Set[A])(implicit loader: ConfigLoader[A]): A

    Get the config at the given path and validate against a set of valid values.

  4. def getDeprecated[A](path: String, deprecatedPaths: String*)(implicit arg0: ConfigLoader[A]): A

    Get a deprecated configuration item.

    Get a deprecated configuration item.

    If the deprecated configuration item is defined, it will be returned, and a warning will be logged.

    Otherwise, the configuration from path will be looked up.

  5. def getDeprecatedWithFallback(path: String, deprecated: String, parent: String = ""): Configuration

    Get a deprecated configuration.

    Get a deprecated configuration.

    If the deprecated configuration is defined, it will be returned, falling back to the new configuration, and a warning will be logged.

    Otherwise, the configuration from path will be looked up and used as is.

  6. def getMillis(path: String): Long

    Retrieves a configuration value as Milliseconds.

    Retrieves a configuration value as Milliseconds.

    For example:

    val configuration = Configuration.load()
    val timeout = configuration.getMillis("engine.timeout")

    The configuration must be provided as:

    engine.timeout = 1 second
  7. def getNanos(path: String): Long

    Retrieves a configuration value as Milliseconds.

    Retrieves a configuration value as Milliseconds.

    For example:

    val configuration = Configuration.load()
    val timeout = configuration.getNanos("engine.timeout")

    The configuration must be provided as:

    engine.timeout = 1 second
  8. def getOptional[A](path: String)(implicit loader: ConfigLoader[A]): Option[A]

    Get a value that may either not exist or be null.

    Get a value that may either not exist or be null. Note that this is not generally considered idiomatic Config usage. Instead you should define all config keys in a reference.conf file.

  9. def getPrototypedMap(path: String, prototypePath: String = "prototype.$path"): Map[String, Configuration]

    Get a prototyped map of objects.

    Get a prototyped map of objects.

    Each value in the map will fallback to the object loaded from prototype.$path.

  10. def getPrototypedSeq(path: String, prototypePath: String = "prototype.$path"): Seq[Configuration]

    Get a prototyped sequence of objects.

    Get a prototyped sequence of objects.

    Each object in the sequence will fallback to the object loaded from prototype.$path.

  11. def globalError(message: String, e: Option[Throwable] = None): PlayException

    Creates a configuration error for this configuration.

    Creates a configuration error for this configuration.

    For example:

    val configuration = Configuration.load()
    throw configuration.globalError("Missing configuration key: [yop.url]")
    message

    the error message

    e

    the related exception

    returns

    a configuration exception

  12. def has(path: String): Boolean

    Check if the given path exists.

  13. def keys: Set[String]

    Returns available keys.

    Returns available keys.

    For example:

    val configuration = Configuration.load()
    val keys = configuration.keys
    returns

    the set of keys available in this configuration

  14. def productElementNames: Iterator[String]
    Definition Classes
    Product
  15. def reportError(path: String, message: String, e: Option[Throwable] = None): PlayException

    Creates a configuration error for a specific configuration key.

    Creates a configuration error for a specific configuration key.

    For example:

    val configuration = Configuration.load()
    throw configuration.reportError("engine.connectionUrl", "Cannot connect!")
    path

    the configuration key, related to this error

    message

    the error message

    e

    the related exception

    returns

    a configuration exception

  16. def subKeys: Set[String]

    Returns sub-keys.

    Returns sub-keys.

    For example:

    val configuration = Configuration.load()
    val subKeys = configuration.subKeys
    returns

    the set of direct sub-keys available in this configuration

  17. val underlying: Config
  18. def withFallback(other: Configuration): Configuration

    Merge two configurations.

    Merge two configurations. The second configuration will act as the fallback for the first configuration.

Deprecated Value Members

  1. def ++(other: Configuration): Configuration

    Merge two configurations.

    Merge two configurations. The second configuration overrides the first configuration. This is the opposite direction of Config's withFallback method.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use withFallback instead