Class SupportAutomatedBundleConfiguration

java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
com.cloudbees.jenkins.support.config.SupportAutomatedBundleConfiguration
All Implemented Interfaces:
ExtensionPoint, Describable<GlobalConfiguration>, Saveable, Loadable, OnMaster

@Extension @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Symbol("automatedBundleConfiguration") public class SupportAutomatedBundleConfiguration extends GlobalConfiguration
Global Configuration for the Automated Support Bundle Generation, see SupportPlugin.PeriodicWorkImpl.
Author:
Allan Burdajewicz
  • Constructor Details

    • SupportAutomatedBundleConfiguration

      public SupportAutomatedBundleConfiguration()
  • Method Details

    • get

      @NonNull public static SupportAutomatedBundleConfiguration get()
      Gets the singleton instance.
      Returns:
      Singleton instance
    • getComponentIds

      public List<String> getComponentIds()
    • getDefaultComponentIds

      public static List<String> getDefaultComponentIds()
      Get the default list of Component Ids for the automated bundle generation.
      Returns:
      a list of String
    • isEnabled

      public boolean isEnabled()
    • getPeriod

      public int getPeriod()
    • isEnforcedPeriod

      public boolean isEnforcedPeriod()
      Return if the period is enforced by the System Property SupportPlugin.AUTO_BUNDLE_PERIOD_HOURS.
      Returns:
      true if enforced by system property, false otherwise
    • setComponentIds

      @DataBoundSetter public void setComponentIds(List<String> componentIds)
    • setEnabled

      @DataBoundSetter public void setEnabled(boolean enabled)
    • isEnforcedDisabled

      public boolean isEnforcedDisabled()
      Return if the enabled is enforced to false by the System Property SupportPlugin.AUTO_BUNDLE_PERIOD_HOURS. That is if the system property value is 0.
      Returns:
      true if enforced by system property, false otherwise
    • setPeriod

      @DataBoundSetter public void setPeriod(Integer period)
    • getDisplayName

      @NonNull public String getDisplayName()
      Overrides:
      getDisplayName in class Descriptor<GlobalConfiguration>
    • getComponents

      public List<Component> getComponents()
      Get the list of Component currently configured for automated bundle generation.
      Returns:
      The list of Component currently configured
    • isComponentSelected

      public boolean isComponentSelected(Component component)
    • getApplicableComponents

      public static List<Component> getApplicableComponents()
      Get the list of applicable (and therefore selectable) Component for the automated bundle generation.
      Returns:
      a list of Component
    • configure

      @POST public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) throws Descriptor.FormException
      Overrides:
      configure in class GlobalConfiguration
      Throws:
      Descriptor.FormException
    • parseRequest

      protected final List<String> parseRequest(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json)
      Parse the stapler JSON output and retrieve configured components.
      Parameters:
      req - the request
      Returns:
      the DescribableList of components
    • getCategory

      @NonNull public GlobalConfigurationCategory getCategory()
      Overrides:
      getCategory in class Descriptor<GlobalConfiguration>
    • doCheckPeriod

      public FormValidation doCheckPeriod(@QueryParameter String value)