Class Configs


  • public final class Configs
    extends Object
    Constants and utilities for configurations.
    Since:
    15.0
    Version:
    17.0 2020-01-04 14:41:57
    Author:
    Stéphane GALLAND
    Maven Group Id:
    org.arakhne.afc.bootique
    Maven Artifact Id:
    bootique-printconfig
    • Method Detail

      • extractConfigs

        public static List<io.bootique.meta.config.ConfigMetadataNode> extractConfigs​(io.bootique.meta.module.ModulesMetadata modulesMetadata)
        Extract the configuration metadata nodes from the given metadata.
        Parameters:
        modulesMetadata - the metadata of the bootique modules.
        Returns:
        the configuration metadata nodes.
      • defineConfig

        public static void defineConfig​(Map<String,​Object> content,
                                        io.bootique.meta.config.ConfigMetadataNode config,
                                        com.google.inject.Injector injector)
        Add a config to a Yaml configuration map.
        Parameters:
        content - the Yaml configuration map.
        config - the configuration.
        injector - the injector to be used for creating the configuration objects.
      • defineScalar

        public static void defineScalar​(Map<String,​Object> content,
                                        String bootiqueVariable,
                                        Object value)
                                 throws Exception
        Add a scalar to a Yaml configuration map.
        Parameters:
        content - the Yaml configuration map.
        bootiqueVariable - the name of the bootique variable.
        value - the value.
        Throws:
        Exception - if a map cannot be created internally.