Class ArtifactDownloaderTaskExporter

java.lang.Object
com.atlassian.bamboo.plugins.artifact.export.ArtifactDownloaderTaskExporter
All Implemented Interfaces:
TaskDefinitionExporter

public class ArtifactDownloaderTaskExporter extends Object implements TaskDefinitionExporter
  • Constructor Details

    • ArtifactDownloaderTaskExporter

      public ArtifactDownloaderTaskExporter()
  • Method Details

    • toTaskConfiguration

      @NotNull public @NotNull Map<String,String> toTaskConfiguration(@NotNull @NotNull TaskContainer taskContainer, @NotNull @NotNull com.atlassian.bamboo.specs.api.model.task.TaskProperties taskProperties)
      Description copied from interface: TaskDefinitionExporter
      Converts properties to Bamboo task configuration. Can use all Bamboo server side services and can access DB if necessary. Should throw a runtime exception if conversion fails.
      Specified by:
      toTaskConfiguration in interface TaskDefinitionExporter
      Parameters:
      taskContainer - current task container (a job or an environment for instance)
      taskProperties - the current task
      Returns:
      task configuration
    • toTaskConfiguration

      @NotNull public @NotNull Map<String,String> toTaskConfiguration(@NotNull @NotNull TaskContainer taskContainer, @NotNull @NotNull List<TaskDefinition> precedingTasks, @NotNull @NotNull com.atlassian.bamboo.specs.api.model.task.TaskProperties taskProperties, @Nullable @Nullable VcsBranch importedBranch)
      Description copied from interface: TaskDefinitionExporter
      Converts properties to Bamboo task configuration. Can use all Bamboo server side services and can access DB if necessary. Should throw a runtime exception if conversion fails.
      Specified by:
      toTaskConfiguration in interface TaskDefinitionExporter
      Parameters:
      taskContainer - current task container (a job or an environment for instance)
      precedingTasks - list of tasks declared before the current one
      taskProperties - the current task
      importedBranch - imported branch if importing a divergent branch
      Returns:
      task configuration
    • toSpecsEntity

      @NotNull public @NotNull com.atlassian.bamboo.specs.builders.task.ArtifactDownloaderTask toSpecsEntity(@NotNull @NotNull TaskDefinition taskDefinition)
      Description copied from interface: TaskDefinitionExporter
      Create Bamboo Specs object representing this task. Implementors don't need to handle common task properties like e.g. enabled/disabled, but must task specific configuration.
      Specified by:
      toSpecsEntity in interface TaskDefinitionExporter
    • toSpecsEntity

      @NotNull public @NotNull com.atlassian.bamboo.specs.builders.task.ArtifactDownloaderTask toSpecsEntity(@NotNull @NotNull TaskContainer taskContainer, @NotNull @NotNull TaskDefinition taskDefinition)
      Description copied from interface: TaskDefinitionExporter
      Create Bamboo Specs object representing this task. Implementors don't need to handle common task properties like e.g. enabled/disabled, but must task specific configuration.
      Specified by:
      toSpecsEntity in interface TaskDefinitionExporter
    • validate

      @NotNull public @NotNull List<com.atlassian.bamboo.specs.api.validators.common.ValidationProblem> validate(@NotNull @NotNull TaskValidationContext taskValidationContext, @NotNull @NotNull com.atlassian.bamboo.specs.api.model.task.TaskProperties taskProperties)
      Description copied from interface: TaskDefinitionExporter
      Validates task properties in context of enclosing plan or deployment properties. Should check for any inconsistencies between task definition and the rest of plan or deployment content, as it is provided in the validation context. Returns list of validation errors or empty if everything is ok.

      Should check RSS permissions if necessary.

      Specified by:
      validate in interface TaskDefinitionExporter
    • toYaml

      @Nullable public <T extends com.atlassian.bamboo.specs.api.model.task.TaskProperties> @Nullable Node toYaml(@NotNull T genericTaskProperties)
      Description copied from interface: TaskDefinitionExporter
      Convert task definition to YAML node. Bamboo might modify returned node to add information about task conditions or other general task settings. To make it compatible with future versions returned value should be StringNode or MapNode (String, Map). Structure MapNode (String, String) can't be enriched with additional elements and cause runtime failures for some cases.
      Specified by:
      toYaml in interface TaskDefinitionExporter
      Returns:
      YAML representation of the task.
    • fromYaml

      @Nullable public @Nullable com.atlassian.bamboo.specs.builders.task.ArtifactDownloaderTask fromYaml(@NotNull @NotNull Node node, @NotNull @NotNull TaskValidationContext context)
      Description copied from interface: TaskDefinitionExporter
      Parse YAML node to Task Specs builder.
      Specified by:
      fromYaml in interface TaskDefinitionExporter
      Parameters:
      node - YAML node from user input. In general case it's same node generated by TaskDefinitionExporter.toYaml(TaskProperties) method, but in some cases it might contain additional general task elements, like conditions. These elements should be ignored by method implementation and will be handled by Bamboo code. In such case MapNode handler should be implemented even if TaskDefinitionExporter.toYaml(TaskProperties) produces StringNode.
      context - task validation context
    • setPlanManager

      public void setPlanManager(PlanManager planManager)
    • setArtifactDefinitionManager

      public void setArtifactDefinitionManager(ArtifactDefinitionManager artifactDefinitionManager)
    • setDeploymentProjectService

      public void setDeploymentProjectService(DeploymentProjectService deploymentProjectService)
    • setBambooPermissionManager

      public void setBambooPermissionManager(BambooPermissionManager bambooPermissionManager)
    • setBambooAuthenticationContext

      public void setBambooAuthenticationContext(BambooAuthenticationContext bambooAuthenticationContext)