Class JsonParameterDefinition

All Implemented Interfaces:
ExtensionPoint, Describable<ParameterDefinition>, Serializable

public class JsonParameterDefinition extends AbstractJsonParameterDefinition
Represents a custom Jenkins parameter definition that extracts values from a JSON source (either from a local config file or a remote URL) using a JSONPath expression.

This class integrates with Jenkins' build parameters system and provides dynamic dropdown population via the UI or CLI.

Author:
Caner Yanbaz
See Also:
  • Constructor Details

    • JsonParameterDefinition

      @DataBoundConstructor public JsonParameterDefinition(String name, String defaultValue, JsonSource source, String query)
      Data-bound constructor called by Jenkins when binding UI input.
      Parameters:
      name - The name of the parameter
      defaultValue - The default value used when none is provided
      source - The JSON source definition
      query - JSONPath query used to extract dropdown values
  • Method Details

    • getPlaceholderMessage

      public String getPlaceholderMessage()
      Returns a localized message used when no options are available in the dropdown.
      Returns:
      A localized empty option message