Class DefaultTriggerConditionExporter

java.lang.Object
com.atlassian.bamboo.trigger.export.DefaultTriggerConditionExporter
All Implemented Interfaces:
BuildTriggerConditionExporter<com.atlassian.bamboo.specs.api.model.trigger.TriggerConditionProperties>

public class DefaultTriggerConditionExporter extends Object implements BuildTriggerConditionExporter<com.atlassian.bamboo.specs.api.model.trigger.TriggerConditionProperties>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable com.atlassian.bamboo.specs.api.builders.trigger.TriggerCondition
    fromYaml(@NotNull Node node)
     
     
    @NotNull Map<String,String>
    toConfigurationMap(@NotNull com.atlassian.bamboo.specs.api.model.trigger.TriggerConditionProperties properties)
     
    <T extends com.atlassian.bamboo.specs.api.builders.trigger.TriggerCondition<T, com.atlassian.bamboo.specs.api.model.trigger.TriggerConditionProperties>>
    T
    toSpecsEntity(@NotNull Map<String,String> triggerConditionConfigurations)
    It's a requirement to return null here as we don't want default condition exporter handle raw map of trigger conditions map.
    @Nullable Node
    toYaml(@NotNull com.atlassian.bamboo.specs.api.model.trigger.TriggerConditionProperties triggerConditionProperties)
     
    @NotNull List<com.atlassian.bamboo.specs.api.validators.common.ValidationProblem>
    validate(TriggerValidationContext validationContext, com.atlassian.bamboo.specs.api.model.trigger.TriggerConditionProperties condition)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefaultTriggerConditionExporter

      public DefaultTriggerConditionExporter()
  • Method Details

    • getConfigurationKeys

      public Set<String> getConfigurationKeys()
      Specified by:
      getConfigurationKeys in interface BuildTriggerConditionExporter<com.atlassian.bamboo.specs.api.model.trigger.TriggerConditionProperties>
      Returns:
      config keys which exporter expect at configuration map.
    • toSpecsEntity

      @Nullable public <T extends com.atlassian.bamboo.specs.api.builders.trigger.TriggerCondition<T, com.atlassian.bamboo.specs.api.model.trigger.TriggerConditionProperties>> T toSpecsEntity(@NotNull @NotNull Map<String,String> triggerConditionConfigurations)
      It's a requirement to return null here as we don't want default condition exporter handle raw map of trigger conditions map.
      Specified by:
      toSpecsEntity in interface BuildTriggerConditionExporter<com.atlassian.bamboo.specs.api.model.trigger.TriggerConditionProperties>
      Returns:
      Specs builder.
    • toConfigurationMap

      @NotNull public @NotNull Map<String,String> toConfigurationMap(@NotNull @NotNull com.atlassian.bamboo.specs.api.model.trigger.TriggerConditionProperties properties)
      Specified by:
      toConfigurationMap in interface BuildTriggerConditionExporter<com.atlassian.bamboo.specs.api.model.trigger.TriggerConditionProperties>
      Returns:
      trigger condition configuration map extracted from TriggerConditionProperties.
    • validate

      @NotNull public @NotNull List<com.atlassian.bamboo.specs.api.validators.common.ValidationProblem> validate(TriggerValidationContext validationContext, com.atlassian.bamboo.specs.api.model.trigger.TriggerConditionProperties condition)
      Specified by:
      validate in interface BuildTriggerConditionExporter<com.atlassian.bamboo.specs.api.model.trigger.TriggerConditionProperties>
    • toYaml

      @Nullable public @Nullable Node toYaml(@NotNull @NotNull com.atlassian.bamboo.specs.api.model.trigger.TriggerConditionProperties triggerConditionProperties)
      Specified by:
      toYaml in interface BuildTriggerConditionExporter<com.atlassian.bamboo.specs.api.model.trigger.TriggerConditionProperties>
    • fromYaml

      @Nullable public @Nullable com.atlassian.bamboo.specs.api.builders.trigger.TriggerCondition fromYaml(@NotNull @NotNull Node node)
      Specified by:
      fromYaml in interface BuildTriggerConditionExporter<com.atlassian.bamboo.specs.api.model.trigger.TriggerConditionProperties>
      Returns:
      Specs builder.