public abstract class AbstractScriptableParameter extends AbstractUnoChoiceParameter implements ScriptableParameter<Map<Object,Object>>
Modifier and Type | Field and Description |
---|---|
protected static String |
JENKINS_BUILD_VARIABLE_NAME
Constant used to add the build in the environment variables map.
|
protected static String |
JENKINS_PROJECT_VARIABLE_NAME
Constant used to add the project in the environment variables map.
|
protected Script |
script
Script used to render the parameter.
|
protected static String |
SEPARATOR
Used to split values that come from the UI via Ajax POST's
|
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
Modifier | Constructor and Description |
---|---|
protected |
AbstractScriptableParameter(String name,
String description,
Script script)
Deprecated.
see JENKINS-32149
|
protected |
AbstractScriptableParameter(String name,
String description,
String randomName,
Script script)
Inherited constructor.
|
Modifier and Type | Method and Description |
---|---|
Map<Object,Object> |
getChoices() |
Map<Object,Object> |
getChoices(Map<Object,Object> parameters)
Evaluates a script and returns its result as a Map.
|
String |
getChoicesAsString() |
String |
getChoicesAsString(Map<Object,Object> parameters) |
hudson.model.ParameterValue |
getDefaultParameterValue() |
Map<Object,Object> |
getParameters()
Gets the current parameters, be it before or after other referenced parameters triggered an update.
|
Script |
getScript()
Gets the script.
|
int |
getVisibleItemCount()
Get the number of visible items in the select.
|
all, createValue, createValue, getChoiceType, getDescriptor, getRandomName
protected static final String SEPARATOR
protected static final String JENKINS_PROJECT_VARIABLE_NAME
protected static final String JENKINS_BUILD_VARIABLE_NAME
protected final Script script
protected AbstractScriptableParameter(String name, String description, Script script)
name
- namedescription
- descriptionscript
- script used to generate the list of parameter valuesprotected AbstractScriptableParameter(String name, String description, String randomName, Script script)
name
- namedescription
- descriptionrandomName
- parameter random generated name (uuid)script
- script used to generate the list of parameter valuespublic Script getScript()
public Map<Object,Object> getParameters()
public Map<Object,Object> getChoices(Map<Object,Object> parameters)
ScriptableParameter
getChoices
in interface ScriptableParameter<Map<Object,Object>>
parameters
- parameterspublic String getChoicesAsString()
public hudson.model.ParameterValue getDefaultParameterValue()
getDefaultParameterValue
in class hudson.model.ParameterDefinition
public int getVisibleItemCount()
Copyright © 2016. All rights reserved.