Class BambooYamlParserImpl
- java.lang.Object
-
- com.atlassian.bamboo.configuration.external.yaml.BambooYamlParserImpl
-
- All Implemented Interfaces:
BambooYamlParser
public class BambooYamlParserImpl extends Object implements BambooYamlParser
-
-
Field Summary
Fields Modifier and Type Field Description static Predicate<com.atlassian.plugin.ModuleDescriptor<ImportExportAwarePlugin>>
IMPORT_EXPORT_AWARE_MODULE_DESCRIPTORS_PREDICATE
static Predicate<com.atlassian.plugin.ModuleDescriptor<TaskCondition>>
TASK_CONDITION_MODULE_DESCRIPTORS_PREDICATE
static Predicate<com.atlassian.plugin.ModuleDescriptor<BuildTriggerCondition>>
TRIGGER_CONDITION_MODULE_DESCRIPTOR_PREDICATE
static Predicate<com.atlassian.plugin.ModuleDescriptor<TriggerActivator>>
TRIGGER_MODULE_DESCRIPTORS_PREDICATE
-
Constructor Summary
Constructors Constructor Description BambooYamlParserImpl(BambooYamlVersion1Converter bambooYamlVersion1Converter, BambooYamlOverrider bambooYamlOverrider, I18nBeanFactory i18nBeanFactory, com.atlassian.plugin.PluginAccessor pluginAccessor, TaskManager taskManager, VcsRepositoryManager repositoryManager, CustomEnvironmentPluginExportHelper customEnvironmentPluginExportHelper)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @NotNull BranchManagementConfiguration
getDefaultBranchManagementSettings()
Values should be synchronized withcom.atlassian.bamboo.configuration.external.yaml.YamlV1ToSpecs#getDefaultPlanBranchManagement()
.@NotNull BambooYamlDeploymentDefinition
parseDeployment(@NotNull Map<String,Object> structure, @NotNull BambooYamlVersion yamlVersion, @NotNull VcsRepositoryData repository)
Constructs an instance ofBambooYamlDeploymentDefinition
based on the given YAML structure.@NotNull BambooYamlDeploymentPermissionsDefinition
parseDeploymentPermissions(Map<String,Object> structure, BambooYamlVersion yamlVersion)
Constructs an instance ofBambooYamlDeploymentPermissionsDefinition
based on the given YAML structure.@NotNull BambooYamlPlanDefinition
parsePlan(@NotNull Map<String,Object> rawYamlStructure, @NotNull BambooYamlVersion yamlVersion, @NotNull VcsRepositoryData repository, @NotNull RssExecutionOutputHandler stdout)
Constructs an instance ofBambooYamlPlanDefinition
based on the given YAML structure.@NotNull BambooYamlPlanPermissionsDefinition
parsePlanPermissions(Map<String,Object> structure, BambooYamlVersion yamlVersion)
Constructs an instance ofBambooYamlPlanPermissionsDefinition
based on the given YAML structure.
-
-
-
Field Detail
-
TRIGGER_MODULE_DESCRIPTORS_PREDICATE
public static final Predicate<com.atlassian.plugin.ModuleDescriptor<TriggerActivator>> TRIGGER_MODULE_DESCRIPTORS_PREDICATE
-
IMPORT_EXPORT_AWARE_MODULE_DESCRIPTORS_PREDICATE
public static final Predicate<com.atlassian.plugin.ModuleDescriptor<ImportExportAwarePlugin>> IMPORT_EXPORT_AWARE_MODULE_DESCRIPTORS_PREDICATE
-
TRIGGER_CONDITION_MODULE_DESCRIPTOR_PREDICATE
public static final Predicate<com.atlassian.plugin.ModuleDescriptor<BuildTriggerCondition>> TRIGGER_CONDITION_MODULE_DESCRIPTOR_PREDICATE
-
TASK_CONDITION_MODULE_DESCRIPTORS_PREDICATE
public static final Predicate<com.atlassian.plugin.ModuleDescriptor<TaskCondition>> TASK_CONDITION_MODULE_DESCRIPTORS_PREDICATE
-
-
Constructor Detail
-
BambooYamlParserImpl
@Inject public BambooYamlParserImpl(BambooYamlVersion1Converter bambooYamlVersion1Converter, BambooYamlOverrider bambooYamlOverrider, I18nBeanFactory i18nBeanFactory, com.atlassian.plugin.PluginAccessor pluginAccessor, TaskManager taskManager, VcsRepositoryManager repositoryManager, CustomEnvironmentPluginExportHelper customEnvironmentPluginExportHelper)
-
-
Method Detail
-
parsePlan
@NotNull public @NotNull BambooYamlPlanDefinition parsePlan(@NotNull @NotNull Map<String,Object> rawYamlStructure, @NotNull @NotNull BambooYamlVersion yamlVersion, @NotNull @NotNull VcsRepositoryData repository, @NotNull @NotNull RssExecutionOutputHandler stdout)
Description copied from interface:BambooYamlParser
Constructs an instance ofBambooYamlPlanDefinition
based on the given YAML structure. This method will run basic validation, e.g. that types in the YAML document match.- Specified by:
parsePlan
in interfaceBambooYamlParser
- Parameters:
rawYamlStructure
- a single YAML document converted into aMap
yamlVersion
- YAML format versionrepository
- the VCS where the YAML is fromstdout
- output handler for logging execution information- Returns:
- parsed plan properties defined in the document
-
getDefaultBranchManagementSettings
@NotNull public static @NotNull BranchManagementConfiguration getDefaultBranchManagementSettings()
Values should be synchronized withcom.atlassian.bamboo.configuration.external.yaml.YamlV1ToSpecs#getDefaultPlanBranchManagement()
.
-
parseDeployment
@NotNull public @NotNull BambooYamlDeploymentDefinition parseDeployment(@NotNull @NotNull Map<String,Object> structure, @NotNull @NotNull BambooYamlVersion yamlVersion, @NotNull @NotNull VcsRepositoryData repository)
Description copied from interface:BambooYamlParser
Constructs an instance ofBambooYamlDeploymentDefinition
based on the given YAML structure. This method will run basic validation, e.g. that types in the YAML document match.- Specified by:
parseDeployment
in interfaceBambooYamlParser
- Parameters:
structure
- a single YAML document converted into aMap
yamlVersion
- YAML format version- Returns:
- parsed deployment project properties defined in the document
-
parseDeploymentPermissions
@NotNull public @NotNull BambooYamlDeploymentPermissionsDefinition parseDeploymentPermissions(Map<String,Object> structure, BambooYamlVersion yamlVersion)
Description copied from interface:BambooYamlParser
Constructs an instance ofBambooYamlDeploymentPermissionsDefinition
based on the given YAML structure. This method will run basic validation, e.g. that types in the YAML document match.- Specified by:
parseDeploymentPermissions
in interfaceBambooYamlParser
- Parameters:
structure
- a single YAML document converted into aMap
yamlVersion
- YAML format version- Returns:
- parsed deployment project permissions properties defined in the document
-
parsePlanPermissions
@NotNull public @NotNull BambooYamlPlanPermissionsDefinition parsePlanPermissions(Map<String,Object> structure, BambooYamlVersion yamlVersion) throws YamlSpecsValidationException
Description copied from interface:BambooYamlParser
Constructs an instance ofBambooYamlPlanPermissionsDefinition
based on the given YAML structure. This method will run basic validation, e.g. that types in the YAML document match.- Specified by:
parsePlanPermissions
in interfaceBambooYamlParser
- Parameters:
structure
- a single YAML document converted into aMap
yamlVersion
- YAML format version- Returns:
- parsed plan permissions properties defined in the document
- Throws:
YamlSpecsValidationException
- if the passed YAML document is not a valid plan permissions definition
-
-