public class ExtensibleChoiceParameterDefinition
extends hudson.model.SimpleParameterDefinition
| Modifier and Type | Class and Description |
|---|---|
static class |
ExtensibleChoiceParameterDefinition.DescriptorImpl
The internal class to work with views.
|
static class |
ExtensibleChoiceParameterDefinition.DescriptorVisibilityFilterImpl |
static class |
ExtensibleChoiceParameterDefinition.EditableType
How to display choices for input values
|
| Constructor and Description |
|---|
ExtensibleChoiceParameterDefinition(String name,
ChoiceListProvider choiceListProvider,
boolean editable,
String description)
Constructor instantiating with parameters in the configuration page.
|
| Modifier and Type | Method and Description |
|---|---|
hudson.model.ParameterValue |
createValue(org.kohsuke.stapler.StaplerRequest request,
net.sf.json.JSONObject jo)
Decide a value of this parameter from the user input.
|
hudson.model.ParameterValue |
createValue(String value)
Decide a value of this parameter from the user input.
|
protected hudson.model.ParameterValue |
createValueCommon(hudson.model.StringParameterValue value)
Test passed ParameterValue and return.
|
List<String> |
getChoiceList()
Return choices available for this parameter.
|
ChoiceListProvider |
getChoiceListProvider()
The choice provider the user specified.
|
List<String> |
getChoicesForRestApi()
Expose choices to REST web API
Expose choices to trigger builds from programs,
in the same way to built-in choice parameters.
|
hudson.model.ParameterValue |
getDefaultParameterValue()
Returns the default value of this parameter.
|
ExtensibleChoiceParameterDefinition.EditableType |
getEditableType() |
ChoiceListProvider |
getEnabledChoiceListProvider() |
static Pattern |
getNamePattern()
Deprecated.
|
boolean |
isEditable()
Is this parameter value can be set to a value not in the choices?
|
void |
setEditableType(ExtensibleChoiceParameterDefinition.EditableType editableType) |
@DataBoundConstructor public ExtensibleChoiceParameterDefinition(String name, ChoiceListProvider choiceListProvider, boolean editable, String description)
name - the name of this parameter (used as a variable name).choiceListProvider - the choice providereditable - whether this parameter can be a value not in choices.description - the description of this parameter. Used only for the convenience of users.@Deprecated public static Pattern getNamePattern()
public boolean isEditable()
@Nonnull public ExtensibleChoiceParameterDefinition.EditableType getEditableType()
@DataBoundSetter public void setEditableType(ExtensibleChoiceParameterDefinition.EditableType editableType)
editableType - How to display choices for input valuespublic ChoiceListProvider getChoiceListProvider()
public ChoiceListProvider getEnabledChoiceListProvider()
ExtensibleChoiceParameterDefinition.DescriptorImpl.isProviderEnabled(Descriptor)public List<String> getChoiceList()
@Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) @Exported(name="choices") public List<String> getChoicesForRestApi()
null if no Item/Build permission.protected hudson.model.ParameterValue createValueCommon(hudson.model.StringParameterValue value)
value - a value to test.public hudson.model.ParameterValue createValue(org.kohsuke.stapler.StaplerRequest request,
net.sf.json.JSONObject jo)
createValue in class hudson.model.ParameterDefinitionrequest - jo - the user inputParameterDefinition.createValue(org.kohsuke.stapler.StaplerRequest, net.sf.json.JSONObject)public hudson.model.ParameterValue createValue(String value) throws IllegalArgumentException
createValue in class hudson.model.SimpleParameterDefinitionvalue - the user inputIllegalArgumentException - The value is not in choices even the field is not editable.SimpleParameterDefinition.createValue(java.lang.String)public hudson.model.ParameterValue getDefaultParameterValue()
getDefaultParameterValue in class hudson.model.ParameterDefinitionParameterDefinition.getDefaultParameterValue()Copyright © 2016–2020. All rights reserved.