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 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
    • doAutoCompleteFolderPath

      @POST public AutoCompletionCandidates doAutoCompleteFolderPath(@AncestorInPath Item item, @QueryParameter String value)
      Provides auto-completion candidates for the folder path field in the UI.

      The suggestions are limited to folder names that: - Are accessible within the scope of the current item - Start with the user-typed prefix - Represent only direct folder names (no nested subfolders)

      This ensures both usability and security by limiting suggestions to folders within the current job's hierarchy.

      Parameters:
      item - the current job/item context (inferred via @AncestorInPath)
      value - the partial folder path entered by the user
      Returns:
      a list of matching folder paths for auto-completion
    • doFillConfigIdItems

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

      This method retrieves all config files defined in the Config File Provider plugin, including those defined at the folder level.

      Parameters:
      item - the current Jenkins item (job or folder) to check permissions against
      Returns:
      a ListBoxModel containing available config file IDs