Class ConfigFileSource.DescriptorImpl

java.lang.Object
hudson.model.Descriptor<JsonSource>
com.github.cyanbaz.jenkins.plugins.jsonparameter.ConfigFileSource.DescriptorImpl
All Implemented Interfaces:
Saveable, Loadable, OnMaster
Enclosing class:
ConfigFileSource

@Extension @Symbol("configFileSource") public static class ConfigFileSource.DescriptorImpl extends Descriptor<JsonSource>
Descriptor for ConfigFileSource, shown as an option in the dropdown selector.
  • Constructor Details

    • DescriptorImpl

      public DescriptorImpl()
  • Method Details

    • getDisplayName

      @NonNull public String getDisplayName()
      Returns the display name shown in the dropdown for this source type.
      Overrides:
      getDisplayName in class Descriptor<JsonSource>
      Returns:
      a human-readable label for the UI
    • doFillConfigIdItems

      @POST public ListBoxModel doFillConfigIdItems(@AncestorInPath Item item)
      Provides a list of available config file IDs for selection in the UI.

      This uses ConfigFiles.getConfigsInContext(hudson.model.ItemGroup, java.lang.Class<? extends hudson.model.Descriptor>) to collect all configs visible to the given item, including folder-scoped and global definitions.