Class SystemGroovyChoiceListProvider
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<ChoiceListProvider>
-
- jp.ikedam.jenkins.plugins.extensible_choice_parameter.ChoiceListProvider
-
- jp.ikedam.jenkins.plugins.extensible_choice_parameter.SystemGroovyChoiceListProvider
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<ChoiceListProvider>
,Serializable
public class SystemGroovyChoiceListProvider extends ChoiceListProvider
A choice provider whose choices are determined by a Groovy script.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SystemGroovyChoiceListProvider.ConverterImpl
static class
SystemGroovyChoiceListProvider.DescriptorImpl
The internal class to work with views.-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description SystemGroovyChoiceListProvider(String scriptText, String defaultChoice)
SystemGroovyChoiceListProvider(String scriptText, String defaultChoice, boolean usePredefinedVariables)
SystemGroovyChoiceListProvider(org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript groovyScript, String defaultChoice, boolean usePredefinedVariables)
Constructor instantiating with parameters in the configuration page.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<String>
getChoiceList()
Returns the list of choices the user specified in the job configuration page.String
getDefaultChoice()
Returns the default choice.org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript
getGroovyScript()
protected Job<?,?>
getProject()
Return the project where this is configured.String
getScriptText()
Deprecated.boolean
isUsePredefinedVariables()
protected void
setProject(AbstractProject<?,?> project)
Deprecated.protected void
setProject(Job<?,?> project)
-
Methods inherited from class jp.ikedam.jenkins.plugins.extensible_choice_parameter.ChoiceListProvider
all, onBuildCompletedWithValue, onBuildTriggeredWithValue, requiresBuildPermission
-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Constructor Detail
-
SystemGroovyChoiceListProvider
@DataBoundConstructor public SystemGroovyChoiceListProvider(org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript groovyScript, String defaultChoice, boolean usePredefinedVariables)
Constructor instantiating with parameters in the configuration page.- Parameters:
groovyScript
-defaultChoice
-usePredefinedVariables
-- Since:
- 1.4.0
-
SystemGroovyChoiceListProvider
public SystemGroovyChoiceListProvider(String scriptText, String defaultChoice, boolean usePredefinedVariables)
-
-
Method Detail
-
getChoiceList
public List<String> getChoiceList()
Returns the list of choices the user specified in the job configuration page.- Specified by:
getChoiceList
in classChoiceListProvider
- Returns:
- the list of choices.
- See Also:
ChoiceListProvider.getChoiceList()
-
getScriptText
@Deprecated public String getScriptText()
Deprecated.
-
getGroovyScript
public org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript getGroovyScript()
- Returns:
- script to generate choices.
- Since:
- 1.4.0
-
getDefaultChoice
public String getDefaultChoice()
Returns the default choice.- Overrides:
getDefaultChoice
in classChoiceListProvider
- Returns:
- the default choice
- See Also:
ChoiceListProvider.getDefaultChoice()
-
isUsePredefinedVariables
public boolean isUsePredefinedVariables()
- Returns:
- whether to use predefined variables
-
setProject
protected void setProject(Job<?,?> project)
- Parameters:
project
-
-
setProject
@Deprecated protected void setProject(AbstractProject<?,?> project)
Deprecated.
-
getProject
protected Job<?,?> getProject()
Return the project where this is configured. This is set only whenisUsePredefinedVariables()
is true.- Returns:
- project
-
-