Class SystemGroovyChoiceListProvider.DescriptorImpl
- java.lang.Object
-
- hudson.model.Descriptor<ChoiceListProvider>
-
- jp.ikedam.jenkins.plugins.extensible_choice_parameter.SystemGroovyChoiceListProvider.DescriptorImpl
-
- Enclosing class:
- SystemGroovyChoiceListProvider
@Extension public static class SystemGroovyChoiceListProvider.DescriptorImpl extends Descriptor<ChoiceListProvider>
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 when this provider is selected. Provides additional configuration fields of a Extensible Choice.
-
-
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 ListBoxModel
doFillDefaultChoiceItems(Job<?,?> job, String script, boolean sandbox, boolean usePredefinedVariables)
Returns the selection of a default choice.FormValidation
doTest(Job<?,?> job, String script, boolean sandbox, boolean usePredefinedVariables)
String
getDisplayName()
the display name shown in the dropdown to select a choice provider.String
getNoDefaultChoice()
SystemGroovyChoiceListProvider
newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
Create a new instance ofSystemGroovyChoiceListProvider
from user inputs.-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, 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
-
newInstance
public SystemGroovyChoiceListProvider 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<ChoiceListProvider>
- Parameters:
req
-formData
-- Returns:
- Throws:
Descriptor.FormException
- See Also:
Descriptor.newInstance(org.kohsuke.stapler.StaplerRequest, net.sf.json.JSONObject)
-
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()
-
doFillDefaultChoiceItems
public ListBoxModel doFillDefaultChoiceItems(@AncestorInPath Job<?,?> job, @RelativePath("groovyScript") @QueryParameter String script, @RelativePath("groovyScript") @QueryParameter boolean sandbox, @QueryParameter boolean usePredefinedVariables)
Returns the selection of a default choice.- Parameters:
job
-script
-sandbox
-usePredefinedVariables
-- Returns:
- the selection of a default choice
-
getNoDefaultChoice
public String getNoDefaultChoice()
- Returns:
- the special value used for "No default choice" (use the top most)
-
doTest
public FormValidation doTest(@AncestorInPath Job<?,?> job, @RelativePath("groovyScript") @QueryParameter String script, @RelativePath("groovyScript") @QueryParameter boolean sandbox, @QueryParameter boolean usePredefinedVariables)
-
-