public class ChoiceParameterDefinition extends SimpleParameterDefinition
Modifier and Type | Class and Description |
---|---|
static class |
ChoiceParameterDefinition.DescriptorImpl |
ParameterDefinition.ParameterDescriptor
ExtensionPoint.LegacyInstancesAreScopedToHudson
Modifier and Type | Field and Description |
---|---|
static String |
CHOICES_DELIMETER |
LIST
Constructor and Description |
---|
ChoiceParameterDefinition(String name,
String[] choices,
String description) |
ChoiceParameterDefinition(String name,
String choices,
String description) |
Modifier and Type | Method and Description |
---|---|
static boolean |
areValidChoices(String choices) |
ParameterDefinition |
copyWithDefaultValue(ParameterValue defaultValue)
Create a new instance of this parameter definition and use the passed
parameter value as the default value.
|
ParameterValue |
createValue(org.kohsuke.stapler.StaplerRequest req,
net.sf.json.JSONObject jo)
Create a parameter value from a form submission.
|
StringParameterValue |
createValue(String value)
Creates a
ParameterValue from the string representation. |
List<String> |
getChoices() |
String |
getChoicesText() |
StringParameterValue |
getDefaultParameterValue()
Returns default parameter value for this definition.
|
createValue, createValue
all, getDescription, getDescriptor, getFormattedDescription, getName, getType
public static final String CHOICES_DELIMETER
@DataBoundConstructor public ChoiceParameterDefinition(String name, String choices, String description)
public static boolean areValidChoices(String choices)
public ParameterDefinition copyWithDefaultValue(ParameterValue defaultValue)
ParameterDefinition
copyWithDefaultValue
in class ParameterDefinition
public String getChoicesText()
public StringParameterValue getDefaultParameterValue()
ParameterDefinition
getDefaultParameterValue
in class ParameterDefinition
public ParameterValue createValue(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject jo)
ParameterDefinition
This method is invoked when the user fills in the parameter values in the HTML form and submits it to the server.
createValue
in class ParameterDefinition
public StringParameterValue createValue(String value)
SimpleParameterDefinition
ParameterValue
from the string representation.createValue
in class SimpleParameterDefinition
Copyright © 2015. All rights reserved.