Class HungBuildPlanConfigurationPlugin

    • Constructor Detail

      • HungBuildPlanConfigurationPlugin

        public HungBuildPlanConfigurationPlugin()
    • Method Detail

      • isApplicableTo

        public boolean isApplicableTo​(@NotNull
                                      @NotNull ImmutablePlan plan)
        Description copied from interface: PlanConfigurationUiPlugin
        Checks if the plugin is applicable to a plan. Typical implementation is to check plan's type (chain, build, job).
        Specified by:
        isApplicableTo in interface PlanConfigurationUiPlugin
        Parameters:
        plan - Plan to be verified
        Returns:
        true if particular configuration is applicable to input plan
      • isConfigurationMissing

        public boolean isConfigurationMissing​(@NotNull
                                              @NotNull org.apache.commons.configuration.HierarchicalConfiguration buildConfiguration)
        Description copied from interface: BuildConfigurationAwarePlugin
        Checks if HierarchicalConfiguration objects contains plugin's configuration values. Should return true if call to addDefaultValues() is necessary to initialize HierarchicalConfiguration.
        Specified by:
        isConfigurationMissing in interface BuildConfigurationAwarePlugin
        Parameters:
        buildConfiguration - HierarchicalConfiguration object
        Returns:
        true if configuration is not present in HierarchicalConfiguration and should be set to defaults
      • getConfigurationKeys

        @NotNull
        public @NotNull Set<String> getConfigurationKeys()
        Description copied from interface: ImportExportAwarePlugin
        Return all property keys related to this plugin module which may exist in a plan's BuildConfiguration.

        The returned set may be immutable. If a plugin module doesn't have configuration, then an empty set should be returned.

        Specified by:
        getConfigurationKeys in interface ImportExportAwarePlugin<com.atlassian.bamboo.specs.api.builders.plan.configuration.ForceStopBuild,​com.atlassian.bamboo.specs.api.model.plan.configuration.ForceStopBuildProperties>
      • toSpecsEntity

        @NotNull
        public @NotNull com.atlassian.bamboo.specs.api.builders.plan.configuration.ForceStopBuild toSpecsEntity​(@NotNull
                                                                                                                @NotNull org.apache.commons.configuration.HierarchicalConfiguration buildConfiguration)
        Description copied from interface: ImportExportAwarePlugin
        Export configuration of this plugin to Bamboo Specs entity.
        Specified by:
        toSpecsEntity in interface ImportExportAwarePlugin<com.atlassian.bamboo.specs.api.builders.plan.configuration.ForceStopBuild,​com.atlassian.bamboo.specs.api.model.plan.configuration.ForceStopBuildProperties>
      • addToBuildConfiguration

        public void addToBuildConfiguration​(@NotNull
                                            @NotNull com.atlassian.bamboo.specs.api.model.plan.configuration.ForceStopBuildProperties specsProperties,
                                            @NotNull
                                            @NotNull org.apache.commons.configuration.HierarchicalConfiguration buildConfiguration)
        Description copied from interface: ImportExportAwarePlugin
        Validate and add data from specs properties to passed build configuration.
        Specified by:
        addToBuildConfiguration in interface ImportExportAwarePlugin<com.atlassian.bamboo.specs.api.builders.plan.configuration.ForceStopBuild,​com.atlassian.bamboo.specs.api.model.plan.configuration.ForceStopBuildProperties>
      • fromYaml

        @Nullable
        public @Nullable com.atlassian.bamboo.specs.api.builders.plan.configuration.ForceStopBuild fromYaml​(Node node)
                                                                                                     throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
        Description copied from interface: ImportExportAwarePlugin
        Import configuration of this plugin from YAML node to Bamboo Specs entity.
        Specified by:
        fromYaml in interface ImportExportAwarePlugin<com.atlassian.bamboo.specs.api.builders.plan.configuration.ForceStopBuild,​com.atlassian.bamboo.specs.api.model.plan.configuration.ForceStopBuildProperties>
        Parameters:
        node - yaml node
        Returns:
        Bamboo Specs entity for plugin settings.
        Throws:
        com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException - if configuration is wrong.
      • toYaml

        @Nullable
        public @Nullable Node toYaml​(@NotNull
                                     @NotNull com.atlassian.bamboo.specs.api.model.plan.configuration.ForceStopBuildProperties specsProperties)
        Description copied from interface: ImportExportAwarePlugin
        Convert configuration of this plugin from Bamboo Specs to YAML structure.
        Specified by:
        toYaml in interface ImportExportAwarePlugin<com.atlassian.bamboo.specs.api.builders.plan.configuration.ForceStopBuild,​com.atlassian.bamboo.specs.api.model.plan.configuration.ForceStopBuildProperties>
        Returns:
        YAML Node containing representation of Bamboo Specs entity.