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