public class BambooYamlSpecsServiceImpl extends Object implements BambooYamlSpecsService
Constructor and Description |
---|
BambooYamlSpecsServiceImpl() |
Modifier and Type | Method and Description |
---|---|
BambooYamlEntityType |
determineEntityType(Map<String,Object> yamlStructure)
Determine YAML entity type which is defined in a given YAML document.
|
BambooYamlVersion |
determineVersion(Map<String,Object> yamlStructure)
Determine YAML version in a document from the given YAML structure.
|
List<Map<String,Object>> |
splitDocuments(String yamlString,
Path yamlDirectory)
Splits the given
yamlString into multiple documents, converting them to Map entities. |
@NotNull public List<Map<String,Object>> splitDocuments(@NotNull String yamlString, @Nullable Path yamlDirectory)
BambooYamlSpecsService
yamlString
into multiple documents, converting them to Map
entities.
No additional processing of the YAML is occurring in this step.splitDocuments
in interface BambooYamlSpecsService
yamlString
- YAML string representing an entire YAML file, may define multiple documentsyamlDirectory
- YAML directory in case of using include filesMap
s created by parsing each YAML document@NotNull public BambooYamlVersion determineVersion(@NotNull Map<String,Object> yamlStructure) throws YamlSpecsValidationException
BambooYamlSpecsService
determineVersion
in interface BambooYamlSpecsService
yamlStructure
- structure of a parsed YAML documentYamlSpecsValidationException
- if the version is invalid@NotNull public BambooYamlEntityType determineEntityType(@NotNull Map<String,Object> yamlStructure) throws YamlSpecsValidationException
BambooYamlSpecsService
determineEntityType
in interface BambooYamlSpecsService
yamlStructure
- structure of a parsed YAML documentYamlSpecsValidationException
- if the entity type can't be determinedCopyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.