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 Constructor Description DescriptorImpl()
Restore from the global configuration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
Store the parameters specified in the System Configuration page.ListBoxModel
doFillDefaultChoiceItems(String name)
ListBoxModel
doFillNameItems()
Returns a list of the names of the available choice set.List<String>
getChoiceList(String name)
Retrieve the set of choices entry by the name.GlobalTextareaChoiceListEntry
getChoiceListEntry(String name)
Retrieve the set of choices entry by the name.List<GlobalTextareaChoiceListEntry>
getChoiceListEntryList()
The list of available sets of choices.String
getDisplayName()
the display name shown in the dropdown to select a choice provider.String
getNoDefaultChoice()
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, calcAutoCompleteSettings, calcFillSettings, configure, 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, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
getChoiceListEntryList
public List<GlobalTextareaChoiceListEntry> getChoiceListEntryList()
The list of available sets of choices.- Returns:
- the list of GlobalTextareaChoiceListEntry
-
setChoiceListEntryList
public void setChoiceListEntryList(List<GlobalTextareaChoiceListEntry> choiceListEntryList)
Set a list of available sets of choices.- Parameters:
choiceListEntryList
- a list of GlobalTextareaChoiceListEntry
-
doFillNameItems
public ListBoxModel 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
public ListBoxModel doFillDefaultChoiceItems(@QueryParameter String name)
-
getNoDefaultChoice
public String getNoDefaultChoice()
- Returns:
- the special value used for "No default choice" (use the top most)
-
getChoiceListEntry
public GlobalTextareaChoiceListEntry getChoiceListEntry(String name)
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
public List<String> getChoiceList(String name)
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
public String getDisplayName()
the display name shown in the dropdown to select a choice provider.- Overrides:
getDisplayName
in classDescriptor<ChoiceListProvider>
- Returns:
- display name
- See Also:
Descriptor.getDisplayName()
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest 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:
Descriptor.configure(org.kohsuke.stapler.StaplerRequest, net.sf.json.JSONObject)
-
-