public class DynamicReferenceParameter extends AbstractCascadableParameter
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.
Modifier and Type | Class and Description |
---|---|
static class |
DynamicReferenceParameter.DescriptorImpl |
parameters
JENKINS_BUILD_VARIABLE_NAME, JENKINS_PROJECT_VARIABLE_NAME, script, SEPARATOR
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_SELECT
Constructor and Description |
---|
DynamicReferenceParameter(String name,
String description,
Script script,
String choiceType,
String referencedParameters,
Boolean omitValueField)
Deprecated.
see JENKINS-32149
|
DynamicReferenceParameter(String name,
String description,
String randomName,
Script script,
String choiceType,
String referencedParameters,
Boolean omitValueField)
Constructor called from Jelly with parameters.
|
Modifier and Type | Method and Description |
---|---|
String |
getChoicesAsStringForUI() |
String |
getChoiceType()
Gets the choice type.
|
Boolean |
getOmitValueField() |
doUpdate, getChoicesForUI, getParameters, getReferencedParameters, getReferencedParametersAsArray
getChoices, getChoices, getChoicesAsString, getChoicesAsString, getDefaultParameterValue, getScript, getVisibleItemCount
all, createValue, createValue, getDescriptor, getRandomName
copyWithDefaultValue, getDescription, getFormattedDescription, getName, getType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChoices
public DynamicReferenceParameter(String name, String description, Script script, String choiceType, String referencedParameters, Boolean omitValueField)
name
- namedescription
- descriptionscript
- scriptchoiceType
- choice typereferencedParameters
- referenced parametersomitValueField
- used in the UI to decide whether to include a hidden empty <input name=value>.
false
by default.@DataBoundConstructor public DynamicReferenceParameter(String name, String description, String randomName, Script script, String choiceType, String referencedParameters, Boolean omitValueField)
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>.
false
by default.public String getChoiceType()
AbstractUnoChoiceParameter
Gets the choice type.
This method can be called from Javascript
getChoiceType
in class AbstractUnoChoiceParameter
public Boolean getOmitValueField()
@JavaScriptMethod public String getChoicesAsStringForUI()
Copyright © 2016. All rights reserved.