Package google.registry.util
Class YamlUtils
java.lang.Object
google.registry.util.YamlUtils
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 Summary
Modifier and TypeMethodDescriptionstatic <T> T
getConfigSettings
(String defaultYaml, String customYaml, Class<T> clazz) Loads the POJO of typeT
from merged YAML configuration files.
-
Method Details
-
getConfigSettings
Loads the POJO of typeT
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
-