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
All Implemented Interfaces:
Saveable, Loadable, OnMaster
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.
  • Constructor Details

    • DescriptorImpl

      public DescriptorImpl()
      Restore from the global configuration
  • Method Details

    • 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 class Descriptor<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 class Descriptor<ChoiceListProvider>
      Parameters:
      req -
      formData -
      Returns:
      whether succeeded to store.
      Throws:
      Descriptor.FormException
      See Also: