Class GlobalTextareaChoiceListProvider.DescriptorImpl
java.lang.Object
hudson.model.Descriptor<ChoiceListProvider>
jp.ikedam.jenkins.plugins.extensible_choice_parameter.ChoiceListProviderDescriptor
jp.ikedam.jenkins.plugins.extensible_choice_parameter.GlobalTextareaChoiceListProvider.DescriptorImpl
- Enclosing class:
- GlobalTextareaChoiceListProvider
@Extension
public static class GlobalTextareaChoiceListProvider.DescriptorImpl
extends ChoiceListProviderDescriptor
The internal class to work with views.
Also manage the global configuration.
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 when this provider is selected. Provides additional configuration fields of a Extensible Choice.
- global.jelly
- Shown as a part of the System Configuration page. Call config.jelly of GlobalTextareaChoiceListEntry, for each set of choices.
-
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 -
Method Summary
Modifier and TypeMethodDescriptionboolean
configure
(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject formData) Store the parameters specified in the System Configuration page.Returns a list of the names of the available choice set.getChoiceList
(String name) Retrieve the set of choices entry by the name.getChoiceListEntry
(String name) Retrieve the set of choices entry by the name.The list of available sets of choices.the display name shown in the dropdown to select a choice provider.void
setChoiceListEntryList
(List<GlobalTextareaChoiceListEntry> choiceListEntryList) Set a list of available sets of choices.Methods inherited from class jp.ikedam.jenkins.plugins.extensible_choice_parameter.ChoiceListProviderDescriptor
getGlobalConfigPage, getGlobalConfigPageForChoiceListProvider, isEnabledByDefault
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Constructor Details
-
DescriptorImpl
public DescriptorImpl()Restore from the global configuration
-
-
Method Details
-
getChoiceListEntryList
The list of available sets of choices.- Returns:
- the list of GlobalTextareaChoiceListEntry
-
setChoiceListEntryList
Set a list of available sets of choices.- Parameters:
choiceListEntryList
- a list of GlobalTextareaChoiceListEntry
-
doFillNameItems
Returns a list of the names of the available choice set. Used in dropdown field of a job configuration page.- Returns:
- a list of the names of the available choice set
-
doFillDefaultChoiceItems
-
getNoDefaultChoice
- Returns:
- the special value used for "No default choice" (use the top most)
-
getChoiceListEntry
Retrieve the set of choices entry by the name. If multiple candidates exists, returns the first one.- Parameters:
name
-- Returns:
- the set of choices.
-
getChoiceList
Retrieve the set of choices entry by the name. if no entry matches, return empty list.- Parameters:
name
-- Returns:
- the list of choices. never null.
-
getDisplayName
the display name shown in the dropdown to select a choice provider.- Overrides:
getDisplayName
in classDescriptor<ChoiceListProvider>
- Returns:
- display name
- See Also:
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject formData) throws Descriptor.FormException Store the parameters specified in the System Configuration page.- Overrides:
configure
in classDescriptor<ChoiceListProvider>
- Parameters:
req
-formData
-- Returns:
- whether succeeded to store.
- Throws:
Descriptor.FormException
- See Also:
-