Interface Configuration

All Known Subinterfaces:
ExecutionContext.ConfigurationContext
All Known Implementing Classes:
GlobalConfigurationContext

public interface Configuration
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Represents configuration part that is obtained from yaml configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    findByPath(String required, String... optional)
    This method obtains a value through a name or path to property from a yaml configuration.
  • Method Details

    • findByPath

      Configuration.ConfigurationPart findByPath(String required, String... optional)
      This method obtains a value through a name or path to property from a yaml configuration. For example consider such app.yaml
       data:
         items:
           - item1
           - item2
         work:
           count: 1
           people:
             person:
               name: bob
       
      call findByPath("data") to get ConfigurationPart representing map {items: [..], work: {..}} call findByPath("data", "items") to get items as list [item1, item2] call findByPath("data", "work", "count") to get items as integer (1) call findByPath("data.work", "count") to get items as integer (1) call findByPath("data.work.people.person") to get items as map {name: bob} call findByPath("big.unknown") returns empty ConfigurationPart
      Parameters:
      required - to access a value
      optional - to access a value
      Returns:
      ConfigurationPart representing the value