Interface BambooYamlSpecsService

All Known Implementing Classes:
BambooYamlSpecsServiceImpl

public interface BambooYamlSpecsService
Utility service for working with Bamboo Specs YAML files.
  • Method Details

    • splitDocuments

      @NotNull @NotNull List<Map<String,Object>> splitDocuments(@NotNull @NotNull String yamlString, @Nullable @Nullable Path yamlDirectory) throws YamlSpecsValidationException
      Splits the given yamlString into multiple documents, converting them to Map entities. No additional processing of the YAML is occurring in this step.
      Parameters:
      yamlString - YAML string representing an entire YAML file, may define multiple documents
      yamlDirectory - YAML directory in case of using include files
      Returns:
      a list of Java Maps created by parsing each YAML document
      Throws:
      YamlSpecsValidationException - if the YAML string is invalid
    • determineVersion

      @NotNull @NotNull BambooYamlVersion determineVersion(@NotNull @NotNull Map<String,Object> yamlStructure) throws YamlSpecsValidationException
      Determine YAML version in a document from the given YAML structure.
      Parameters:
      yamlStructure - structure of a parsed YAML document
      Returns:
      version of the YAML document
      Throws:
      YamlSpecsValidationException - if the version is invalid
    • determineEntityType

      @NotNull @NotNull BambooYamlEntityType determineEntityType(@NotNull @NotNull Map<String,Object> yamlStructure) throws YamlSpecsValidationException
      Determine YAML entity type which is defined in a given YAML document.
      Parameters:
      yamlStructure - structure of a parsed YAML document
      Returns:
      entity type defined in the YAML document
      Throws:
      YamlSpecsValidationException - if the entity type can't be determined