Class DynamicReferenceParameter
- All Implemented Interfaces:
ExtensionPoint, Describable<ParameterDefinition>, Serializable, CascadableParameter<Map<Object,Object>>, ScriptableParameter<Map<Object, Object>>, UnoChoiceParameter
Provides a dynamic reference parameter for users. This is a not so elegant solution, since we are using a ParameterDefinition extension point, but it actually doesn't provide any parameter value.
This kind of parameter is only for reference. An use case is when you have several job parameters, but your input values may vary depending on previous executions. You can get the previous executions by accessing from your Groovy code the jenkinsProject variable.
Its options are retrieved from the evaluation of a Groovy script.
- Since:
- 0.1
- Author:
- Bruno P. Kinoshita
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class ParameterDefinition
ParameterDefinition.ParameterDescriptorNested classes/interfaces inherited from interface ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class AbstractCascadableParameter
parametersFields inherited from class AbstractScriptableParameter
EQUALS, JENKINS_BUILD_VARIABLE_NAME, JENKINS_PARAMETER_VARIABLE_NAME, JENKINS_PROJECT_VARIABLE_NAME, script, SEPARATORFields inherited from class AbstractUnoChoiceParameter
DEFAULT_MAX_VISIBLE_ITEM_COUNT, ELEMENT_TYPE_FORMATTED_HIDDEN_HTML, ELEMENT_TYPE_FORMATTED_HTML, ELEMENT_TYPE_ORDERED_LIST, ELEMENT_TYPE_TEXT_BOX, ELEMENT_TYPE_UNORDERED_LIST, LOGGER, PARAMETER_TYPE_CHECK_BOX, PARAMETER_TYPE_MULTI_SELECT, PARAMETER_TYPE_RADIO, PARAMETER_TYPE_SINGLE_SELECTFields inherited from class ParameterDefinition
LIST -
Constructor Summary
ConstructorsConstructorDescriptionDynamicReferenceParameter(String name, String description, String randomName, Script script, String choiceType, String referencedParameters, Boolean omitValueField) Constructor called from Jelly with parameters.DynamicReferenceParameter(String name, String description, Script script, String choiceType, String referencedParameters, Boolean omitValueField) Deprecated.see JENKINS-32149 -
Method Summary
Modifier and TypeMethodDescriptionGets the choice type.booleanMethods inherited from class AbstractCascadableParameter
doUpdate, getChoicesForUI, getParameters, getReferencedParameters, getReferencedParametersAsArrayMethods inherited from class AbstractScriptableParameter
detectProject, getCacheDefaultValue, getChoices, getChoices, getChoicesAsString, getChoicesAsString, getDefaultParameterValue, getItemCount, getScript, getVisibleItemCount, setCacheDefaultValueMethods inherited from class AbstractUnoChoiceParameter
createValue, createValue, getDescriptor, getRandomNameMethods inherited from class SimpleParameterDefinition
createValue, createValueMethods inherited from class ParameterDefinition
all, copyWithDefaultValue, createValue, createValue, equals, getDescription, getFormattedDescription, getName, getType, hashCode, isValid, setDescriptionMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ScriptableParameter
getChoices
-
Constructor Details
-
DynamicReferenceParameter
@Deprecated public DynamicReferenceParameter(String name, String description, Script script, String choiceType, String referencedParameters, Boolean omitValueField) Deprecated.see JENKINS-32149Constructor called from Jelly with parameters.- Parameters:
name- namedescription- descriptionscript- scriptchoiceType- choice typereferencedParameters- referenced parametersomitValueField- used in the UI to decide whether to include a hidden empty <input name=value>.falseby default.
-
DynamicReferenceParameter
@DataBoundConstructor public DynamicReferenceParameter(String name, String description, String randomName, Script script, String choiceType, String referencedParameters, Boolean omitValueField) Constructor called from Jelly with parameters.- Parameters:
name- namedescription- descriptionrandomName- parameter random generated name (uuid)script- scriptchoiceType- choice typereferencedParameters- referenced parametersomitValueField- used in the UI to decide whether to include a hidden empty <input name=value>.falseby default.
-
-
Method Details
-
getChoiceType
Description copied from class:AbstractUnoChoiceParameterGets the choice type.
This method can be called from Javascript
- Specified by:
getChoiceTypein classAbstractUnoChoiceParameter- Returns:
- choice type
-
getOmitValueField
public boolean getOmitValueField() -
getChoicesAsStringForUI
-