public class EditableChoiceParameterDefinition extends SimpleParameterDefinition
| Modifier and Type | Class and Description |
|---|---|
static class |
EditableChoiceParameterDefinition.DescriptorImpl
Descriptor for
EditableChoiceParameterDefinition. |
ParameterDefinition.ParameterDescriptorExtensionPoint.LegacyInstancesAreScopedToHudsonLIST| Constructor and Description |
|---|
EditableChoiceParameterDefinition(String name)
ctor.
|
createValue, createValueall, copyWithDefaultValue, equals, getDescription, getDescriptor, getFormattedDescription, getName, getType, hashCode, isValid, setDescription@DataBoundConstructor
public EditableChoiceParameterDefinition(@NonNull
String name)
name - the name of the parameterpublic EditableChoiceParameterDefinition withDescription(@CheckForNull String description)
description - the description@DataBoundSetter
public void setChoices(@NonNull
List<String> choices)
choices - choices used as candidates@NonNull public static List<String> choicesFromText(@NonNull String text)
text - choices delimited with new linespublic static String textFromChoices(@NonNull List<String> choices)
choices - choices@DataBoundSetter
public void setChoicesWithText(@NonNull
String choicesWithText)
choicesWithText - choices with delimited with new lines@NonNull public String getChoicesWithText()
public EditableChoiceParameterDefinition withChoices(List<String> choices)
choices - choices@DataBoundSetter
public void setDefaultValue(@CheckForNull
String defaultValue)
defaultValue - the default value. The top choice is used if
null.@Exported @CheckForNull public String getDefaultValue()
null.@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class)
@DataBoundSetter
public void setWithDefaultValue(@NonNull
DefaultValue defaultValue)
DefaultValue.
Only for used with <f:optionalBlock>.
Use setDefaultValue(String) instead.defaultValue - the default value with DefaultValue@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @CheckForNull public DefaultValue getWithDefaultValue()
DefaultValue.
Only for used with <f:optionalBlock>.
Use getDefaultValue() instead.DefaultValuepublic EditableChoiceParameterDefinition withDefaultValue(@CheckForNull String defaultValue)
defaultValue - the default value@DataBoundSetter public void setRestrict(boolean restrict)
restrict - whether restrict value in choices@Exported public boolean isRestrict()
public EditableChoiceParameterDefinition withRestrict(boolean restrict)
restrict - whether restrict value in choices@DataBoundSetter
public void setFilterConfig(@CheckForNull
FilterConfig filterConfig)
filterConfig - how to filter values for input. null not to filter.@CheckForNull public FilterConfig getFilterConfig()
null not to filter.public EditableChoiceParameterDefinition withFilterConfig(@CheckForNull FilterConfig filterConfig)
filterConfig - how to filter values for input@CheckForNull public String createDefaultValue()
@CheckForNull public ParameterValue getDefaultParameterValue()
getDefaultParameterValue in class ParameterDefinitionprotected boolean checkValue(@NonNull
String value)
value - candidate inputprotected ParameterValue createValueCommon(StringParameterValue value) throws IllegalArgumentException
value - the user inputIllegalArgumentException - The value is not in choices even not
editable.public ParameterValue createValue(org.kohsuke.stapler.StaplerRequest request, net.sf.json.JSONObject jo) throws IllegalArgumentException
createValue in class ParameterDefinitionIllegalArgumentException - The value is not in choices when restricted.public ParameterValue createValue(String value) throws IllegalArgumentException
createValue in class SimpleParameterDefinitionIllegalArgumentException - The value is not in choices when restricted.Copyright © 2016–2021. All rights reserved.