Interface IConfigSegment

All Known Implementing Classes:
Configuration, DatasourceConfig, ModuleConfig

public interface IConfigSegment
Each configuration segment is a part of the configuration file that is responsible for a specific part of the configuration. This class is the interface that all configuration segments must implement. This is to provide a common interface for all configuration segments to override it's state using the state pattern
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the configuration as a struct
    process(IStruct config)
    Processes the state of the configuration segment from the configuration struct.
  • Method Details

    • process

      IConfigSegment process(IStruct config)
      Processes the state of the configuration segment from the configuration struct.

      Each segment is processed individually from the initial configuration struct. This is so we can handle cascading overrides from configuration loading.

      Parameters:
      config - The state of the segment as a struct
      Returns:
      Return itself for chaining
    • asStruct

      IStruct asStruct()
      Returns the configuration as a struct
      Returns:
      A struct representation of the configuration segment