Class YamlUtils

java.lang.Object
google.registry.util.YamlUtils

public final class YamlUtils extends Object
Utility methods for dealing with YAML.

There are always two YAML configuration files that are used: the default-config.yaml file, which contains default configuration for all environments, and the environment-specific nomulus-config-ENVIRONMENT.yaml file, which contains overrides for the default values for environment-specific settings such as the App Engine project ID. The environment-specific configuration can be blank, but it must exist.

  • Method Details

    • getConfigSettings

      public static <T> T getConfigSettings(String defaultYaml, String customYaml, Class<T> clazz)
      Loads the POJO of type T from merged YAML configuration files.
      Parameters:
      defaultYaml - content of the default YAML file.
      customYaml - content of the custom YAML file, to override default values.
      clazz - type of the POJO loaded from the merged YAML files.
      Throws:
      IllegalStateException - if the configuration files don't exist or are invalid