Class OMAGConfigHelper
java.lang.Object
org.odpi.openmetadata.serverchassis.springboot.config.OMAGConfigHelper
@EnableConfigurationProperties(OMAGServerProperties.class)
@Configuration
public class OMAGConfigHelper
extends Object
This class provides support for loading OMAGServerConfig document from different configuration options/styles.
It supports JSON and YAML file based OMAG server configuration;
Additionally provides EXPERIMENTAL feature: configure OMAG server using native spring configuration properties.
-
Constructor Summary
ConstructorDescriptionOMAGConfigHelper
(OMAGServerProperties properties, com.fasterxml.jackson.databind.ObjectMapper jsonObjectMapper, com.fasterxml.jackson.databind.ObjectMapper yamlObjectMapper) Constructor that injects required beans such as omag application properties and jackson object mappers. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Implements logic for deciding proper configuration source and loading its content into OMAGServerConfig configuration object
-
Constructor Details
-
OMAGConfigHelper
@Autowired public OMAGConfigHelper(OMAGServerProperties properties, @Qualifier("jsonObjectMapper") com.fasterxml.jackson.databind.ObjectMapper jsonObjectMapper, @Qualifier("yamlObjectMapper") com.fasterxml.jackson.databind.ObjectMapper yamlObjectMapper) Constructor that injects required beans such as omag application properties and jackson object mappers.- Parameters:
properties
- application properties prefixed with 'omag.'jsonObjectMapper
- pre-configured object mapper bean for json processingyamlObjectMapper
- pre-configured object mapper bean for yaml processing
-
-
Method Details
-
loadConfig
Implements logic for deciding proper configuration source and loading its content into OMAGServerConfig configuration object- Throws:
OMAGServerActivationError
-
getServerProperties
-
getOmagServerConfig
-