Class TigerGlobalConfiguration
- java.lang.Object
-
- de.gematik.test.tiger.common.config.TigerGlobalConfiguration
-
public class TigerGlobalConfiguration extends Object
Central configuration store. All sources (Environment-variables, YAML-files, local exports) end up here and all configuration is loaded from here (Testenv-mgr, local tiger-proxy, test-lib configuration and also user-defined values).
-
-
Constructor Summary
Constructors Constructor Description TigerGlobalConfiguration()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidinitialize()static voidinitializeWithCliProperties(Map<String,String> additionalProperties)static <T> TinstantiateConfigurationBean(com.fasterxml.jackson.core.type.TypeReference<T> configurationBeanType, String... baseKeys)static <T> Optional<T>instantiateConfigurationBean(Class<T> configurationBeanClass, String... baseKeys)static booleanisRequireTigerYaml()static List<AbstractTigerConfigurationSource>listSources()static TigerScopedExecutorlocalScope()Returns a local scope in which values can be added and code executed.static voidputValue(String key, boolean value)static voidputValue(String key, double value)static voidputValue(String key, int value)static voidputValue(String key, long value)static voidputValue(String key, Object value)static voidputValue(String key, Object value, SourceType sourceType)static voidputValue(String key, String value)static voidputValue(String key, String value, SourceType sourceType)static booleanreadBoolean(String key)static booleanreadBoolean(String key, boolean defaultValue)static voidreadFromYaml(String yamlSource, SourceType sourceType, String... baseKeys)static voidreadFromYaml(String yamlSource, String... baseKeys)static Optional<Integer>readIntegerOptional(String key)static Map<String,String>readMap(String... baseKeys)static StringreadString(String key)static StringreadString(String key, String defaultValue)static Optional<String>readStringOptional(String key)static voidreadTemplates(String templatesYaml, String... baseKeys)static voidreset()static StringresolvePlaceholders(String stringToSubstitute)static voidsetRequireTigerYaml(boolean requireTigerYaml)
-
-
-
Method Detail
-
reset
public static void reset()
-
initialize
public static void initialize()
-
initializeWithCliProperties
public static void initializeWithCliProperties(Map<String,String> additionalProperties)
-
instantiateConfigurationBean
public static <T> Optional<T> instantiateConfigurationBean(Class<T> configurationBeanClass, String... baseKeys)
-
instantiateConfigurationBean
public static <T> T instantiateConfigurationBean(com.fasterxml.jackson.core.type.TypeReference<T> configurationBeanType, String... baseKeys)
-
readFromYaml
public static void readFromYaml(String yamlSource, SourceType sourceType, String... baseKeys)
-
readBoolean
public static boolean readBoolean(String key)
-
readBoolean
public static boolean readBoolean(String key, boolean defaultValue)
-
listSources
public static List<AbstractTigerConfigurationSource> listSources()
-
putValue
public static void putValue(String key, long value)
-
putValue
public static void putValue(String key, boolean value)
-
putValue
public static void putValue(String key, double value)
-
putValue
public static void putValue(String key, int value)
-
putValue
public static void putValue(String key, String value, SourceType sourceType)
-
putValue
public static void putValue(String key, Object value, SourceType sourceType)
-
localScope
public static TigerScopedExecutor localScope()
Returns a local scope in which values can be added and code executed. This enables the use of very local values that can not (or should not) creep over into other parts of your testsuite.- Returns:
-
isRequireTigerYaml
public static boolean isRequireTigerYaml()
-
setRequireTigerYaml
public static void setRequireTigerYaml(boolean requireTigerYaml)
-
-