Class SpringEnvironmentConfigImpl

java.lang.Object
dev.orne.config.impl.AbstractConfig
dev.orne.config.impl.SpringEnvironmentConfigImpl
All Implemented Interfaces:
Config

@API(status=INTERNAL, since="1.0") public class SpringEnvironmentConfigImpl extends AbstractConfig
Implementation of Config based on Spring Environment.
Since:
0.1
Version:
1.0, 2025-09
Author:
(w) Iker Hernaez
See Also:
  • Constructor Details

    • SpringEnvironmentConfigImpl

      public SpringEnvironmentConfigImpl(@NotNull @NotNull ConfigOptions options, @NotNull @NotNull SpringEnvironmentConfigOptions springOptions)
      Creates a new instance.
      Parameters:
      options - The configuration builder options.
      springOptions - The Spring environment based configuration options.
  • Method Details

    • getEnvironment

      @NotNull public @NotNull org.springframework.core.env.Environment getEnvironment()
      Returns the Spring environment used as storage of configuration properties.
      Returns:
      The Spring environment.
    • isEmptyInt

      protected boolean isEmptyInt()
      Returns true if this configuration instance contains no property.

      Parent configuration

      Specified by:
      isEmptyInt in class AbstractConfig
      Returns:
      Returns true if the configuration contains no property.
    • containsInt

      protected boolean containsInt(@NotBlank @NotBlank String key)
      Returns true if the property with the key passed as argument has been configured in this configuration instance.
      Specified by:
      containsInt in class AbstractConfig
      Parameters:
      key - The configuration property.
      Returns:
      Returns true if the property has been configured.
    • getKeysInt

      @NotNull protected @NotNull Stream<String> getKeysInt()
      Returns the configuration property keys contained in this configuration instance .
      Specified by:
      getKeysInt in class AbstractConfig
      Returns:
      The configuration property keys.
    • getInt

      protected String getInt(@NotBlank @NotBlank String key)
      Returns the value of the configuration property as String.
      Specified by:
      getInt in class AbstractConfig
      Parameters:
      key - The configuration property.
      Returns:
      The configuration parameter value.