@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,
Set<String> dependencyAggregator) |
protected org.yaml.snakeyaml.Yaml |
newSnakeYaml(Resource yamlResource) |
protected org.yaml.snakeyaml.Yaml |
newSnakeYaml(Resource yamlResource,
Set<String> dependencyAggregator) |
Object |
read(Resource res) |
protected Object |
readNoCast(Resource res) |
Map<String,Object> |
readToMap(Resource resource) |
YamlReader.YamlConversionResult |
readWithDependencies(Resource resource) |
public Object read(Resource res) throws IOException
IOException
public YamlReader.YamlConversionResult readWithDependencies(Resource resource) throws IOException
IOException
protected Object doReadWithDependencies(Resource res, Set<String> 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, Set<String> dependencyAggregator)
protected org.yaml.snakeyaml.Yaml newSnakeYaml(Resource yamlResource)
Copyright © 2003–2017 Magnolia International Ltd.. All rights reserved.