Class JsonParameterDefinition
java.lang.Object
hudson.model.ParameterDefinition
com.github.cyanbaz.jenkins.plugins.jsonparameter.AbstractJsonParameterDefinition
com.github.cyanbaz.jenkins.plugins.jsonparameter.JsonParameterDefinition
- All Implemented Interfaces:
ExtensionPoint, Describable<ParameterDefinition>, Serializable
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDescriptor for this parameter type, defines how it is represented in Jenkins UI.Nested classes/interfaces inherited from class ParameterDefinition
ParameterDefinition.ParameterDescriptorNested classes/interfaces inherited from interface ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class ParameterDefinition
LIST -
Constructor Summary
ConstructorsConstructorDescriptionJsonParameterDefinition(String name, String defaultValue, JsonSource source, String query) Data-bound constructor called by Jenkins when binding UI input. -
Method Summary
Modifier and TypeMethodDescriptionReturns a localized message used when no options are available in the dropdown.Methods inherited from class AbstractJsonParameterDefinition
createValue, createValue, createValue, getDefaultParameterValue, getDefaultValue, getQuery, getSourceMethods inherited from class ParameterDefinition
all, copyWithDefaultValue, createValue, createValue, equals, getDescription, getDescriptor, getFormattedDescription, getName, getType, hashCode, isValid, setDescription
-
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 parameterdefaultValue- The default value used when none is providedsource- The JSON source definitionquery- JSONPath query used to extract dropdown values
-
-
Method Details
-
getPlaceholderMessage
Returns a localized message used when no options are available in the dropdown.- Returns:
- A localized empty option message
-