Class ExtensibleChoiceParameterDefinition.DescriptorImpl
- java.lang.Object
-
- hudson.model.Descriptor<ParameterDefinition>
-
- hudson.model.ParameterDefinition.ParameterDescriptor
-
- jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition.DescriptorImpl
-
- Enclosing class:
- ExtensibleChoiceParameterDefinition
@Extension public static class ExtensibleChoiceParameterDefinition.DescriptorImpl extends ParameterDefinition.ParameterDescriptor
The internal class to work with views. The following files are used (put in main/resource directory in the source tree).- config.jelly
- shown as a part of a job configuration page.
- index.jelly
- shown when a user launches a build, and specifies parameters of the build.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
-
Field Summary
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description DescriptorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json)
FormValidation
doCheckName(String name)
protected Map<String,Boolean>
getChoiceListEnabledMap()
DescriptorExtensionList<ChoiceListProvider,Descriptor<ChoiceListProvider>>
getChoiceListProviderList()
Returns all the available methods to provide choices.String
getDisplayName()
Returns the string to be shown in a job configuration page, in the dropdown of "Add Parameter".List<Descriptor<ChoiceListProvider>>
getEnabledChoiceListProviderList()
Returns all the available methods to provide choices that are enabled in the global configuration.boolean
isProviderEnabled(Descriptor<?> d)
ExtensibleChoiceParameterDefinition
newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
Create a new instance ofSystemGroovyChoiceListProvider
from user inputs.protected void
setChoiceListEnabledMap(Map<String,Boolean> choiceListEnabledMap)
-
Methods inherited from class hudson.model.ParameterDefinition.ParameterDescriptor
getValuePage
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
setChoiceListEnabledMap
protected void setChoiceListEnabledMap(Map<String,Boolean> choiceListEnabledMap)
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) throws Descriptor.FormException
- Overrides:
configure
in classDescriptor<ParameterDefinition>
- Throws:
Descriptor.FormException
-
isProviderEnabled
public boolean isProviderEnabled(Descriptor<?> d)
-
newInstance
public ExtensibleChoiceParameterDefinition newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData) throws Descriptor.FormException
Create a new instance ofSystemGroovyChoiceListProvider
from user inputs.- Overrides:
newInstance
in classDescriptor<ParameterDefinition>
- Parameters:
req
-formData
-- Returns:
- Throws:
Descriptor.FormException
- See Also:
Descriptor.newInstance(org.kohsuke.stapler.StaplerRequest, net.sf.json.JSONObject)
-
getDisplayName
public String getDisplayName()
Returns the string to be shown in a job configuration page, in the dropdown of "Add Parameter".- Overrides:
getDisplayName
in classParameterDefinition.ParameterDescriptor
- Returns:
- a name of this parameter type.
- See Also:
ParameterDefinition.ParameterDescriptor.getDisplayName()
-
getChoiceListProviderList
public DescriptorExtensionList<ChoiceListProvider,Descriptor<ChoiceListProvider>> getChoiceListProviderList()
Returns all the available methods to provide choices.- Returns:
- DescriptorExtensionList of ChoiceListProvider subclasses.
-
getEnabledChoiceListProviderList
public List<Descriptor<ChoiceListProvider>> getEnabledChoiceListProviderList()
Returns all the available methods to provide choices that are enabled in the global configuration. Used for showing dropdown for users to select a choice provider.- Returns:
- DescriptorExtensionList of ChoiceListProvider subclasses.
-
doCheckName
public FormValidation doCheckName(@QueryParameter String name)
-
-