Class TaskDefinitionExportHelper


  • public class TaskDefinitionExportHelper
    extends Object
    • Constructor Detail

      • TaskDefinitionExportHelper

        @Autowired
        public TaskDefinitionExportHelper​(TaskManager taskManager)
    • Method Detail

      • toSpecsEntity

        @NotNull
        public @NotNull com.atlassian.bamboo.specs.api.builders.task.Task toSpecsEntity​(TaskContainer taskContainer,
                                                                                        TaskDefinition taskDefinition)
      • getExporter

        public TaskDefinitionExporter getExporter​(@NotNull
                                                  @NotNull com.atlassian.bamboo.specs.api.model.task.TaskProperties properties)
      • importTaskDefinition

        @NotNull
        public @NotNull TaskDefinition importTaskDefinition​(long id,
                                                            @NotNull
                                                            @NotNull TaskContainer taskContainer,
                                                            @NotNull
                                                            @NotNull com.atlassian.bamboo.specs.api.model.task.TaskProperties taskProperties,
                                                            boolean finalTask)
                                                     throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
        Import the task definition from its properties.
        Parameters:
        id - an identifier this task shall be assigned with
        taskContainer - container of this task (for instance a job or an environment)
        taskProperties - the current task to be imported
        finalTask - whether it shall be a final task
        Returns:
        TaskDefinition
        Throws:
        com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException - if properties are invalid
      • importTaskDefinition

        @NotNull
        public @NotNull TaskDefinition importTaskDefinition​(long id,
                                                            @NotNull
                                                            @NotNull TaskContainer taskContainer,
                                                            @NotNull
                                                            @NotNull List<TaskDefinition> precedingTasks,
                                                            @NotNull
                                                            @NotNull com.atlassian.bamboo.specs.api.model.task.TaskProperties taskProperties,
                                                            @Nullable
                                                            @Nullable VcsBranch importedBranch,
                                                            boolean finalTask)
                                                     throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
        Import the task definition from its properties.
        Parameters:
        id - an identifier this task shall be assigned with
        taskContainer - container of this task (for instance a job or an environment)
        precedingTasks - lists of tasks which were declared before the current task
        taskProperties - the current task to be imported
        finalTask - whether it shall be a final task
        importedBranch - the current branch if importing a divergent branch, null otherwise
        Returns:
        TaskDefinition
        Throws:
        com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException - if properties are invalid
      • validateTaskProperties

        public void validateTaskProperties​(@NotNull
                                           @NotNull com.atlassian.bamboo.specs.api.model.plan.PlanProperties topLevelPlanProperties,
                                           @NotNull
                                           @NotNull RssPermissions rssPermissions,
                                           @Nullable
                                           @Nullable VcsBranch importedBranch)
                                    throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
        Throws:
        com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
      • validateTaskProperties

        public void validateTaskProperties​(@NotNull
                                           @NotNull com.atlassian.bamboo.specs.api.model.deployment.DeploymentProperties deploymentProperties,
                                           @NotNull
                                           @NotNull RssPermissions rssPermissions)
                                    throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
        Throws:
        com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException