Packages

  • package root
    Definition Classes
    root
  • package play

    Play framework.

    Play framework.

    Play

    http://www.playframework.com

    Definition Classes
    root
  • package api

    Contains the public API for Scala developers.

    Contains the public API for Scala developers.

    Access the current Play application
    import play.api.Play.current
    Read configuration
    val poolSize = configuration.getInt("engine.pool.size")
    Use the logger
    Logger.info("Hello!")
    Define a Plugin
    class MyPlugin(app: Application) extends Plugin
    Create adhoc applications (for testing)
    val application = Application(new File("."), this.getClass.getClassloader, None, Play.Mode.DEV)
    Definition Classes
    play
  • package cache

    Contains the Cache access API.

    Contains the Cache access API.

    Definition Classes
    api
  • package controllers
    Definition Classes
    api
  • package data

    Contains data manipulation helpers (typically HTTP form handling)

    Contains data manipulation helpers (typically HTTP form handling)

    import play.api.data._
    import play.api.data.Forms._
    
    val taskForm = Form(
      tuple(
        "name" -> text(minLength = 3),
        "dueDate" -> date("yyyy-MM-dd"),
        "done" -> boolean
      )
    )
    Definition Classes
    api
  • package db

    Contains the JDBC database access API.

    Contains the JDBC database access API.

    Example, retrieving a connection from the 'customers' datasource:

    val conn = db.getConnection("customers")
    Definition Classes
    api
  • package http

    Contains standard HTTP constants.

    Contains standard HTTP constants. For example:

    val text = ContentTypes.TEXT
    val ok = Status.OK
    val accept = HeaderNames.ACCEPT
    Definition Classes
    api
  • package i18n

    Contains the internationalisation API.

    Contains the internationalisation API.

    For example, translating a message:

    val msgString = Messages("items.found", items.size)
    Definition Classes
    api
  • package inject

    Play's runtime dependency injection abstraction.

    Play's runtime dependency injection abstraction.

    Play's runtime dependency injection support is built on JSR-330, which provides a specification for declaring how dependencies get wired to components. JSR-330 however does not address how components are provided to or located by a DI container. Play's API seeks to address this in a DI container agnostic way.

    The reason for providing this abstraction is so that Play, the modules it provides, and third party modules can all express their bindings in a way that is not specific to any one DI container.

    Components are bound in the DI container. Each binding is identified by a BindingKey, which is typically an interface that the component implements, and may be optionally qualified by a JSR-330 qualifier annotation. A binding key is bound to a BindingTarget, which describes how the implementation of the interface that the binding key represents is constructed or provided. Bindings may also be scoped using JSR-330 scope annotations.

    Bindings are provided by instances of Module.

    Out of the box, Play provides an implementation of this abstraction using Guice.

    Definition Classes
    api
    See also

    The Module class for information on how to provide bindings.

  • package internal
    Definition Classes
    api
  • package libs

    Contains various APIs that are useful while developing web applications.

    Contains various APIs that are useful while developing web applications.

    Definition Classes
    api
  • package mvc

    Contains the Controller/Action/Result API to handle HTTP requests.

    Contains the Controller/Action/Result API to handle HTTP requests.

    For example, a typical controller:

    class HomeController @Inject() (val controllerComponents: ControllerComponents) extends BaseController {
    
      def index = Action {
        Ok("It works!")
      }
    
    }
    Definition Classes
    api
  • package routing
    Definition Classes
    api
  • package templates
    Definition Classes
    api
  • package test

    Contains test helpers.

    Contains test helpers.

    Definition Classes
    api
  • Application
  • ApplicationLoader
  • BuiltInComponents
  • BuiltInComponentsFromContext
  • ConfigLoader
  • Configuration
  • DefaultApplication
  • DefaultMarkerContext
  • Environment
  • Logger
  • LoggerConfigurator
  • LoggerLike
  • Logging
  • LowPriorityMarkerContextImplicits
  • MarkerContext
  • MarkerContexts
  • Mode
  • NoHttpFiltersComponents
  • OptionalDevContext
  • OptionalSourceMapper
  • OptionalSourceMapperProvider
  • Play
  • UnexpectedException

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

A full configuration set.

The underlying implementation is provided by https://github.com/typesafehub/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. All

Instance Constructors

  1. new Configuration(underlying: Config)

    underlying

    the underlying Config implementation

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. 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.

  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def entrySet: Set[(String, ConfigValue)]

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

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  10. def get[A](path: String)(implicit loader: ConfigLoader[A]): A

    Get the config at the given path.

  11. 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.

  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. 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.

  14. 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.

  15. 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
  16. 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
  17. 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.

  18. 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.

  19. 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.

  20. 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

  21. def has(path: String): Boolean

    Check if the given path exists.

  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. 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

  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. def productElementNames: Iterator[String]
    Definition Classes
    Product
  28. 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

  29. 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

  30. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  31. val underlying: Config
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. def getBoolean(path: String): Option[Boolean]

    Retrieves a configuration value as a Boolean.

    Retrieves a configuration value as a Boolean.

    For example:

    val configuration = Configuration.load()
    val isEnabled = configuration.getBoolean("engine.isEnabled")

    A configuration error will be thrown if the configuration value is not a valid Boolean. Authorized values are yes/no or true/false.

    path

    the configuration key, relative to the configuration root key

    returns

    a configuration value

    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use get[Boolean] with reference config entry

  2. def getBooleanList(path: String): Option[List[Boolean]]

    Retrieves a configuration value as a List of Boolean.

    Retrieves a configuration value as a List of Boolean.

    For example:

    val configuration = Configuration.load()
    val switches = configuration.getBooleanList("board.switches")

    The configuration must be provided as:

    board.switches = [true, true, false]

    A configuration error will be thrown if the configuration value is not a valid Boolean. Authorized values are yes/no or true/false.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use underlying.getBooleanList with reference config entry

  3. def getBooleanSeq(path: String): Option[Seq[Boolean]]

    Retrieves a configuration value as a Seq of Boolean.

    Retrieves a configuration value as a Seq of Boolean.

    For example:

    val configuration = Configuration.load()
    val switches = configuration.getBooleanSeq("board.switches")

    The configuration must be provided as:

    board.switches = [true, true, false]

    A configuration error will be thrown if the configuration value is not a valid Boolean. Authorized values are yes/no or true/false.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use get[Seq[Boolean]] with reference config entry

  4. def getBytes(path: String): Option[Long]

    Retrieves a configuration value as Bytes.

    Retrieves a configuration value as Bytes.

    For example:

    val configuration = Configuration.load()
    val maxSize = configuration.getBytes("engine.maxSize")

    The configuration must be provided as:

    engine.maxSize = 512k
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use underlying.getBytes with reference config entry

  5. def getBytesList(path: String): Option[List[Long]]

    Retrieves a configuration value as a List of Bytes.

    Retrieves a configuration value as a List of Bytes.

    For example:

    val configuration = Configuration.load()
    val maxSizes = configuration.getBytesList("engine.maxSizes")

    The configuration must be provided as:

    engine.maxSizes = [512k, 256k, 256k]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use underlying.getBytesList with reference config entry

  6. def getBytesSeq(path: String): Option[Seq[Long]]

    Retrieves a configuration value as a Seq of Bytes.

    Retrieves a configuration value as a Seq of Bytes.

    For example:

    val configuration = Configuration.load()
    val maxSizes = configuration.getBytesSeq("engine.maxSizes")

    The configuration must be provided as:

    engine.maxSizes = [512k, 256k, 256k]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use underlying.getBytesList with reference config entry

  7. def getConfig(path: String): Option[Configuration]

    Retrieves a sub-configuration, i.e.

    Retrieves a sub-configuration, i.e. a configuration instance containing all keys starting with a given prefix.

    For example:

    val configuration = Configuration.load()
    val engineConfig = configuration.getConfig("engine")

    The root key of this new configuration will be ‘engine’, and you can access any sub-keys relatively.

    path

    the root prefix for this sub-configuration

    returns

    a new configuration

    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use get[Configuration] with reference config entry

  8. def getConfigList(path: String): Option[List[Configuration]]

    Retrieves a List of sub-configurations, i.e.

    Retrieves a List of sub-configurations, i.e. a configuration instance for each key that matches the path.

    For example:

    val configuration = Configuration.load()
    val engineConfigs = configuration.getConfigList("engine")

    The root key of this new configuration will be "engine", and you can access any sub-keys relatively.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use underlying.getConfigList with reference config entry

  9. def getConfigSeq(path: String): Option[Seq[Configuration]]

    Retrieves a Seq of sub-configurations, i.e.

    Retrieves a Seq of sub-configurations, i.e. a configuration instance for each key that matches the path.

    For example:

    val configuration = Configuration.load()
    val engineConfigs = configuration.getConfigSeq("engine")

    The root key of this new configuration will be "engine", and you can access any sub-keys relatively.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use underlying.getConfigList with reference config entry

  10. def getDouble(path: String): Option[Double]

    Retrieves a configuration value as a Double.

    Retrieves a configuration value as a Double.

    For example:

    val configuration = Configuration.load()
    val population = configuration.getDouble("world.population")

    A configuration error will be thrown if the configuration value is not a valid Double.

    path

    the configuration key, relative to the configuration root key

    returns

    a configuration value

    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use get[Double] with reference config entry

  11. def getDoubleList(path: String): Option[List[Double]]

    Retrieves a configuration value as a List of Double.

    Retrieves a configuration value as a List of Double.

    For example:

    val configuration = Configuration.load()
    val maxSizes = configuration.getDoubleList("engine.maxSizes")

    The configuration must be provided as:

    engine.maxSizes = [5.0, 3.34, 2.6]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use underlying.getDoubleList with reference config entry

  12. def getDoubleSeq(path: String): Option[Seq[Double]]

    Retrieves a configuration value as a Seq of Double.

    Retrieves a configuration value as a Seq of Double.

    For example:

    val configuration = Configuration.load()
    val maxSizes = configuration.getDoubleSeq("engine.maxSizes")

    The configuration must be provided as:

    engine.maxSizes = [5.0, 3.34, 2.6]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use get[Seq[Double]] with reference config entry

  13. def getInt(path: String): Option[Int]

    Retrieves a configuration value as an Int.

    Retrieves a configuration value as an Int.

    For example:

    val configuration = Configuration.load()
    val poolSize = configuration.getInt("engine.pool.size")

    A configuration error will be thrown if the configuration value is not a valid Int.

    path

    the configuration key, relative to the configuration root key

    returns

    a configuration value

    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use get[Int] with reference config entry

  14. def getIntList(path: String): Option[List[Integer]]

    Retrieves a configuration value as a List of Integer.

    Retrieves a configuration value as a List of Integer.

    For example:

    val configuration = Configuration.load()
    val maxSizes = configuration.getIntList("engine.maxSizes")

    The configuration must be provided as:

    engine.maxSizes = [100, 500, 2]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use underlying.getIntList with reference config entry

  15. def getIntSeq(path: String): Option[Seq[Integer]]

    Retrieves a configuration value as a Seq of Integer.

    Retrieves a configuration value as a Seq of Integer.

    For example:

    val configuration = Configuration.load()
    val maxSizes = configuration.getIntSeq("engine.maxSizes")

    The configuration must be provided as:

    engine.maxSizes = [100, 500, 2]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use get[Seq[Int]] with reference config entry

  16. def getList(path: String): Option[ConfigList]

    Gets a list value (with any element type) as a ConfigList, which implements java.util.List<ConfigValue>.

    Gets a list value (with any element type) as a ConfigList, which implements java.util.List<ConfigValue>.

    For example:

    val configuration = Configuration.load()
    val maxSizes = configuration.getList("engine.maxSizes")

    The configuration must be provided as:

    engine.maxSizes = ["foo", "bar"]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use get[ConfigList] with reference config entry

  17. def getLong(path: String): Option[Long]

    Retrieves a configuration value as a Long.

    Retrieves a configuration value as a Long.

    For example:

    val configuration = Configuration.load()
    val duration = configuration.getLong("timeout.duration")

    A configuration error will be thrown if the configuration value is not a valid Long.

    path

    the configuration key, relative to the configuration root key

    returns

    a configuration value

    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use get[Long] with reference config entry

  18. def getLongList(path: String): Option[List[Long]]

    Retrieves a configuration value as a List of Long.

    Retrieves a configuration value as a List of Long.

    For example:

    val configuration = Configuration.load()
    val maxSizes = configuration.getLongList("engine.maxSizes")

    The configuration must be provided as:

    engine.maxSizes = [10000000000000, 500, 2000]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use underlying.getLongList with reference config entry

  19. def getLongSeq(path: String): Option[Seq[Long]]

    Retrieves a configuration value as a Seq of Long.

    Retrieves a configuration value as a Seq of Long.

    For example:

    val configuration = Configuration.load()
    val maxSizes = configuration.getLongSeq("engine.maxSizes")

    The configuration must be provided as:

    engine.maxSizes = [10000000000000, 500, 2000]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use get[Seq[Long]] with reference config entry

  20. def getMilliseconds(path: String): Option[Long]

    Retrieves a configuration value as Milliseconds.

    Retrieves a configuration value as Milliseconds.

    For example:

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

    The configuration must be provided as:

    engine.timeout = 1 second
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use getMillis with reference config entry

  21. def getMillisecondsList(path: String): Option[List[Long]]

    Retrieves a configuration value as List of Milliseconds.

    Retrieves a configuration value as List of Milliseconds.

    For example:

    val configuration = Configuration.load()
    val timeouts = configuration.getMillisecondsList("engine.timeouts")

    The configuration must be provided as:

    engine.timeouts = [1 second, 1 second]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use underlying.getMillisecondsList with reference config entry

  22. def getMillisecondsSeq(path: String): Option[Seq[Long]]

    Retrieves a configuration value as Seq of Milliseconds.

    Retrieves a configuration value as Seq of Milliseconds.

    For example:

    val configuration = Configuration.load()
    val timeouts = configuration.getMillisecondsSeq("engine.timeouts")

    The configuration must be provided as:

    engine.timeouts = [1 second, 1 second]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use get[Seq[Duration]].map(_.toMillis) with reference config entry

  23. def getNanoseconds(path: String): Option[Long]

    Retrieves a configuration value as Nanoseconds.

    Retrieves a configuration value as Nanoseconds.

    For example:

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

    The configuration must be provided as:

    engine.timeout = 1 second
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use getNanos with reference config entry

  24. def getNanosecondsList(path: String): Option[List[Long]]

    Retrieves a configuration value as List of Nanoseconds.

    Retrieves a configuration value as List of Nanoseconds.

    For example:

    val configuration = Configuration.load()
    val timeouts = configuration.getNanosecondsList("engine.timeouts")

    The configuration must be provided as:

    engine.timeouts = [1 second, 1 second]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use underlying.getNanosecondsList with reference config entry

  25. def getNanosecondsSeq(path: String): Option[Seq[Long]]

    Retrieves a configuration value as Seq of Nanoseconds.

    Retrieves a configuration value as Seq of Nanoseconds.

    For example:

    val configuration = Configuration.load()
    val timeouts = configuration.getNanosecondsSeq("engine.timeouts")

    The configuration must be provided as:

    engine.timeouts = [1 second, 1 second]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use get[Seq[Duration]].map(_.toMillis) with reference config entry

  26. def getNumber(path: String): Option[Number]

    Retrieves a configuration value as a Number.

    Retrieves a configuration value as a Number.

    For example:

    val configuration = Configuration.load()
    val counter = configuration.getNumber("foo.counter")

    A configuration error will be thrown if the configuration value is not a valid Number.

    path

    the configuration key, relative to the configuration root key

    returns

    a configuration value

    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use get[Number] with reference config entry

  27. def getNumberList(path: String): Option[List[Number]]

    Retrieves a configuration value as a List of Number.

    Retrieves a configuration value as a List of Number.

    For example:

    val configuration = Configuration.load()
    val maxSizes = configuration.getNumberList("engine.maxSizes")

    The configuration must be provided as:

    engine.maxSizes = [50, 500, 5000]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use underlying.getNumberList with reference config entry

  28. def getNumberSeq(path: String): Option[Seq[Number]]

    Retrieves a configuration value as a Seq of Number.

    Retrieves a configuration value as a Seq of Number.

    For example:

    val configuration = Configuration.load()
    val maxSizes = configuration.getNumberSeq("engine.maxSizes")

    The configuration must be provided as:

    engine.maxSizes = [50, 500, 5000]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use get[Seq[Number]] with reference config entry

  29. def getObject(path: String): Option[ConfigObject]

    Retrieves a ConfigObject for this path, which implements Map<String,ConfigValue>

    Retrieves a ConfigObject for this path, which implements Map<String,ConfigValue>

    For example:

    val configuration = Configuration.load()
    val engineProperties = configuration.getObject("engine.properties")

    The configuration must be provided as:

    engine.properties = {id: 1, power: 5}
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use get[ConfigObject] with reference config entry

  30. def getObjectList(path: String): Option[List[_ <: ConfigObject]]

    Retrieves a configuration value as a List of ConfigObject.

    Retrieves a configuration value as a List of ConfigObject.

    For example:

    val configuration = Configuration.load()
    val engineProperties = configuration.getObjectList("engine.properties")

    The configuration must be provided as:

    engine.properties = [{id: 5, power: 3}, {id: 6, power: 20}]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use underlying.getObjectList with reference config entry

  31. def getString(path: String, validValues: Option[Set[String]] = None): Option[String]

    Retrieves a configuration value as a String.

    Retrieves a configuration value as a String.

    This method supports an optional set of valid values:

    val config = Configuration.load()
    val mode = config.getString("engine.mode", Some(Set("dev","prod")))

    A configuration error will be thrown if the configuration value does not match any of the required values.

    path

    the configuration key, relative to configuration root key

    validValues

    valid values for this configuration

    returns

    a configuration value

    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use get[String] or getAndValidate[String] with reference config entry

  32. def getStringList(path: String): Option[List[String]]

    Retrieves a configuration value as a List of String.

    Retrieves a configuration value as a List of String.

    For example:

    val configuration = Configuration.load()
    val names = configuration.getStringList("names")

    The configuration must be provided as:

    names = ["Jim", "Bob", "Steve"]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use underlying.getStringList with reference config entry

  33. def getStringSeq(path: String): Option[Seq[String]]

    Retrieves a configuration value as a Seq of String.

    Retrieves a configuration value as a Seq of String.

    For example:

    val configuration = Configuration.load()
    val names = configuration.getStringSeq("names")

    The configuration must be provided as:

    names = ["Jim", "Bob", "Steve"]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use get[Seq[String]] with reference config entry

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped