@Singleton public class YamlReader extends Object
YamlReader
reads configuration from a yaml file and returns it as a map representing bean properties.Modifier and Type | Class and Description |
---|---|
static class |
YamlReader.YamlConversionResult
Result of YAML file conversion.
|
Constructor and Description |
---|
YamlReader() |
Modifier and Type | Method and Description |
---|---|
protected Object |
doReadWithDependencies(Resource res,
MgnlYamlConstructor.YamlConfigurationDependencyAggregator dependencyAggregator) |
protected org.yaml.snakeyaml.Yaml |
newSnakeYaml(Resource yamlResource,
MgnlYamlConstructor.YamlConfigurationDependencyAggregator dependencyAggregator) |
Object |
read(Resource res) |
protected Object |
readNoCast(Resource res) |
Map<String,Object> |
readToMap(Resource resource) |
YamlReader.YamlConversionResult |
readWithDependencies(Resource resource) |
void |
registerCustomConstruct(String tag,
org.yaml.snakeyaml.constructor.Construct construct) |
void |
registerCustomMultiConstruct(String tagPrefix,
org.yaml.snakeyaml.constructor.Construct construct) |
public void registerCustomConstruct(String tag, org.yaml.snakeyaml.constructor.Construct construct)
public void registerCustomMultiConstruct(String tagPrefix, org.yaml.snakeyaml.constructor.Construct construct)
public Object read(Resource res) throws IOException
IOException
public YamlReader.YamlConversionResult readWithDependencies(Resource resource) throws IOException
IOException
protected Object doReadWithDependencies(Resource res, MgnlYamlConstructor.YamlConfigurationDependencyAggregator dependencyAggregator) throws IOException
IOException
public Map<String,Object> readToMap(Resource resource) throws IOException
IOException
protected Object readNoCast(Resource res) throws IOException
IOException
protected org.yaml.snakeyaml.Yaml newSnakeYaml(Resource yamlResource, MgnlYamlConstructor.YamlConfigurationDependencyAggregator dependencyAggregator)
Copyright © 2003–2017 Magnolia International Ltd.. All rights reserved.