Class TagTriggerDefinitionExporter

    • Constructor Detail

      • TagTriggerDefinitionExporter

        public TagTriggerDefinitionExporter()
    • Method Detail

      • toTriggerConfiguration

        @NotNull
        public @NotNull Map<String,​String> toTriggerConfiguration​(@NotNull
                                                                        @NotNull com.atlassian.bamboo.specs.api.model.trigger.TriggerProperties triggerProperties,
                                                                        @NotNull
                                                                        @NotNull Triggerable triggerable)
        Returns tag trigger configuration. All TriggerProperties properties and RepositoryBasedTriggerProperties properties are handled by "the framework".
        Specified by:
        toTriggerConfiguration in interface TriggerDefinitionExporter
        Returns:
        trigger configuration
      • toSpecsEntity

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

        @NotNull
        public @NotNull List<com.atlassian.bamboo.specs.api.validators.common.ValidationProblem> validate​(@NotNull
                                                                                                          @NotNull TriggerValidationContext triggerValidationContext,
                                                                                                          @NotNull
                                                                                                          @NotNull com.atlassian.bamboo.specs.api.model.trigger.TriggerProperties triggerProperties)
        Description copied from interface: TriggerDefinitionExporter
        Validates trigger properties in context of enclosing plan or deployment properties. Should check for any inconsistencies between trigger 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 TriggerDefinitionExporter
      • toYaml

        @Nullable
        public <T extends com.atlassian.bamboo.specs.api.model.trigger.TriggerProperties> @Nullable Node toYaml​(@NotNull
                                                                                                                T triggerProperties)
        Description copied from interface: TriggerDefinitionExporter
        Convert trigger definition to YAML node. Bamboo might modify returned node to add information about trigger conditions or other general trigger 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 TriggerDefinitionExporter
        Returns:
        YAML representation of the trigger.